Cleanup (formatting; warnings)

This commit is contained in:
Roman Shevchenko
2016-04-19 19:35:01 +02:00
parent cb339bf590
commit 6c39a86407
2 changed files with 26 additions and 27 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,12 +32,11 @@ import java.util.Map;
* Service for creating instances of Java, JavaDoc, JSP and XML PSI elements which don't have
* an underlying source code file.
*
* @see com.intellij.psi.JavaPsiFacade#getElementFactory()
* @see JavaPsiFacade#getElementFactory()
*/
public interface PsiElementFactory extends PsiJavaParserFacade, JVMElementFactory {
class SERVICE {
private SERVICE() {
}
private SERVICE() { }
public static PsiElementFactory getInstance(Project project) {
return ServiceManager.getService(project, PsiElementFactory.class);
@@ -230,7 +229,7 @@ public interface PsiElementFactory extends PsiJavaParserFacade, JVMElementFactor
/**
* The same as {@link #createTypeByFQClassName(String, GlobalSearchScope)}
* with {@link GlobalSearchScope#allScope(com.intellij.openapi.project.Project)}.
* with {@link GlobalSearchScope#allScope(Project)}.
*
* @param qName the full-qualified name of the class to create the reference to.
* @return the class type instance.
@@ -464,7 +463,7 @@ public interface PsiElementFactory extends PsiJavaParserFacade, JVMElementFactor
/**
* Create a lightweight PsiElement of given element type in a lightweight non-physical PsiFile (aka DummyHolder) in a given context.
* Element type's language should have a parser definition which supports parsing for this element type (first
* parameter in {@link com.intellij.lang.PsiParser#parse(com.intellij.psi.tree.IElementType, com.intellij.lang.PsiBuilder)}.
* parameter in {@link com.intellij.lang.PsiParser#parse(IElementType, com.intellij.lang.PsiBuilder)}.
* @param text text to parse
* @param type node type
* @param context context
@@ -489,4 +488,4 @@ public interface PsiElementFactory extends PsiJavaParserFacade, JVMElementFactor
@Override
@NotNull
PsiExpression createExpressionFromText(@NotNull String text, @Nullable PsiElement context) throws IncorrectOperationException;
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@ public interface PsiJavaParserFacade {
*
* @param docTagText the text of the JavaDoc tag.
* @return the created tag.
* @throws com.intellij.util.IncorrectOperationException if the text of the tag is not valid.
* @throws IncorrectOperationException if the text of the tag is not valid.
*/
@NotNull
PsiDocTag createDocTagFromText(@NotNull String docTagText) throws IncorrectOperationException;
@@ -42,7 +42,7 @@ public interface PsiJavaParserFacade {
*
* @param docCommentText the text of the JavaDoc comment.
* @return the created comment.
* @throws com.intellij.util.IncorrectOperationException if the text of the comment is not valid.
* @throws IncorrectOperationException if the text of the comment is not valid.
*/
@NotNull
PsiDocComment createDocCommentFromText(@NotNull String docCommentText) throws IncorrectOperationException;
@@ -54,7 +54,7 @@ public interface PsiJavaParserFacade {
* @param docCommentText the text of the JavaDoc comment.
* @param context the PSI element used as context for resolving references inside this javadoc
* @return the created comment.
* @throws com.intellij.util.IncorrectOperationException if the text of the comment is not valid.
* @throws IncorrectOperationException if the text of the comment is not valid.
*/
@NotNull
PsiDocComment createDocCommentFromText(@NotNull String docCommentText, @Nullable PsiElement context) throws IncorrectOperationException;
@@ -66,7 +66,7 @@ public interface PsiJavaParserFacade {
* @param context the PSI element used as context for resolving references which cannot be resolved
* within the class.
* @return the created class instance.
* @throws com.intellij.util.IncorrectOperationException if the text is not a valid class body.
* @throws IncorrectOperationException if the text is not a valid class body.
*/
@NotNull
PsiClass createClassFromText(@NotNull @NonNls String text, @Nullable PsiElement context) throws IncorrectOperationException;
@@ -77,7 +77,7 @@ public interface PsiJavaParserFacade {
* @param text the text of the field to create.
* @param context the PSI element used as context for resolving references from the field.
* @return the created field instance.
* @throws com.intellij.util.IncorrectOperationException if the text is not a valid field body.
* @throws IncorrectOperationException if the text is not a valid field body.
*/
@NotNull
PsiField createFieldFromText(@NotNull @NonNls String text, @Nullable PsiElement context) throws IncorrectOperationException;
@@ -89,7 +89,7 @@ public interface PsiJavaParserFacade {
* @param context the PSI element used as context for resolving references from the method.
* @param languageLevel the language level used for creating the method.
* @return the created method instance.
* @throws com.intellij.util.IncorrectOperationException if the text is not a valid method body.
* @throws IncorrectOperationException if the text is not a valid method body.
*/
@NotNull
PsiMethod createMethodFromText(@NotNull @NonNls String text, @Nullable PsiElement context, LanguageLevel languageLevel) throws IncorrectOperationException;
@@ -100,7 +100,7 @@ public interface PsiJavaParserFacade {
* @param text the text of the method to create.
* @param context the PSI element used as context for resolving references from the method.
* @return the created method instance.
* @throws com.intellij.util.IncorrectOperationException if the text is not a valid method body.
* @throws IncorrectOperationException if the text is not a valid method body.
*/
@NotNull
PsiMethod createMethodFromText(@NotNull @NonNls String text, @Nullable PsiElement context) throws IncorrectOperationException;
@@ -111,7 +111,7 @@ public interface PsiJavaParserFacade {
* @param text the text of the parameter to create.
* @param context the PSI element used as context for resolving references from the parameter.
* @return the created parameter instance.
* @throws com.intellij.util.IncorrectOperationException if the text is not a valid parameter body.
* @throws IncorrectOperationException if the text is not a valid parameter body.
*/
@NotNull
PsiParameter createParameterFromText(@NotNull @NonNls String text, @Nullable PsiElement context) throws IncorrectOperationException;
@@ -122,7 +122,7 @@ public interface PsiJavaParserFacade {
* @param text the text of the resource to create.
* @param context the PSI element used as context for resolving references from the resource.
* @return the created resource instance.
* @throws com.intellij.util.IncorrectOperationException if the text is not a valid resource definition.
* @throws IncorrectOperationException if the text is not a valid resource definition.
*/
@NotNull
PsiResourceVariable createResourceFromText(@NotNull String text, @Nullable PsiElement context) throws IncorrectOperationException;
@@ -134,7 +134,7 @@ public interface PsiJavaParserFacade {
* declaration or the name of a class).
* @param context the PSI element used as context for resolving the reference.
* @return the created type instance.
* @throws com.intellij.util.IncorrectOperationException if the text does not specify a valid type.
* @throws IncorrectOperationException if the text does not specify a valid type.
*/
@NotNull
PsiType createTypeFromText(@NotNull @NonNls String text, @Nullable PsiElement context) throws IncorrectOperationException;
@@ -146,7 +146,7 @@ public interface PsiJavaParserFacade {
* declaration or the name of a class).
* @param context the PSI element used as context for resolving the reference.
* @return the created type element.
* @throws com.intellij.util.IncorrectOperationException if the text does not specify a valid type.
* @throws IncorrectOperationException if the text does not specify a valid type.
*/
@NotNull
PsiTypeElement createTypeElementFromText(@NotNull @NonNls String text, @Nullable PsiElement context) throws IncorrectOperationException;
@@ -158,7 +158,7 @@ public interface PsiJavaParserFacade {
* declaration or the name of a class).
* @param context the PSI element used as context for resolving the reference.
* @return the created reference element.
* @throws com.intellij.util.IncorrectOperationException if the text does not specify a valid type.
* @throws IncorrectOperationException if the text does not specify a valid type.
*/
@NotNull
PsiJavaCodeReferenceElement createReferenceFromText(@NotNull @NonNls String text, @Nullable PsiElement context) throws IncorrectOperationException;
@@ -169,7 +169,7 @@ public interface PsiJavaParserFacade {
* @param text the text of the code block to create.
* @param context the PSI element used as context for resolving references from the block.
* @return the created code block instance.
* @throws com.intellij.util.IncorrectOperationException if the text does not specify a valid code block.
* @throws IncorrectOperationException if the text does not specify a valid code block.
*/
@NotNull
PsiCodeBlock createCodeBlockFromText(@NotNull @NonNls String text, @Nullable PsiElement context) throws IncorrectOperationException;
@@ -180,7 +180,7 @@ public interface PsiJavaParserFacade {
* @param text the text of the statement to create.
* @param context the PSI element used as context for resolving references from the statement.
* @return the created statement instance.
* @throws com.intellij.util.IncorrectOperationException if the text does not specify a valid statement.
* @throws IncorrectOperationException if the text does not specify a valid statement.
*/
@NotNull
PsiStatement createStatementFromText(@NotNull @NonNls String text, @Nullable PsiElement context) throws IncorrectOperationException;
@@ -191,7 +191,7 @@ public interface PsiJavaParserFacade {
* @param text the text of the expression to create.
* @param context the PSI element used as context for resolving references from the expression.
* @return the created expression instance.
* @throws com.intellij.util.IncorrectOperationException if the text does not specify a valid expression.
* @throws IncorrectOperationException if the text does not specify a valid expression.
*/
@NotNull
PsiExpression createExpressionFromText(@NotNull @NonNls String text, @Nullable PsiElement context) throws IncorrectOperationException;
@@ -202,7 +202,7 @@ public interface PsiJavaParserFacade {
* @param text the text of the comment to create.
* @param context the PSI element used as context for resolving references from the comment.
* @return the created comment instance.
* @throws com.intellij.util.IncorrectOperationException if the text does not specify a valid comment.
* @throws IncorrectOperationException if the text does not specify a valid comment.
*/
@NotNull
PsiComment createCommentFromText(@NotNull String text, @Nullable PsiElement context) throws IncorrectOperationException;
@@ -213,7 +213,7 @@ public interface PsiJavaParserFacade {
* @param text the text of the type parameter to create.
* @param context the context for resolving references.
* @return the created type parameter instance.
* @throws com.intellij.util.IncorrectOperationException if the text does not specify a valid type parameter.
* @throws IncorrectOperationException if the text does not specify a valid type parameter.
*/
@NotNull
PsiTypeParameter createTypeParameterFromText(@NotNull @NonNls String text, @Nullable PsiElement context) throws IncorrectOperationException;
@@ -224,7 +224,7 @@ public interface PsiJavaParserFacade {
* @param annotationText the text of the annotation to create.
* @param context the context for resolving references from the annotation.
* @return the created annotation instance.
* @throws com.intellij.util.IncorrectOperationException if the text does not specify a valid annotation.
* @throws IncorrectOperationException if the text does not specify a valid annotation.
*/
@NotNull
PsiAnnotation createAnnotationFromText(@NotNull @NonNls String annotationText, @Nullable PsiElement context) throws IncorrectOperationException;
@@ -242,4 +242,4 @@ public interface PsiJavaParserFacade {
*/
@NotNull
PsiType createPrimitiveType(@NotNull String text, @NotNull PsiAnnotation[] annotations) throws IncorrectOperationException;
}
}