mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix compilation
This commit is contained in:
@@ -125,5 +125,6 @@ public interface JVMElementFactory {
|
||||
@NotNull
|
||||
PsiAnnotation createAnnotationFromText(@NotNull @NonNls String annotationText, @Nullable PsiElement context) throws IncorrectOperationException;
|
||||
|
||||
PsiElement createExpressionFromText(String text, PsiElement ctx) throws IncorrectOperationException;
|
||||
@NotNull
|
||||
PsiElement createExpressionFromText(@NotNull @NonNls String text, @Nullable PsiElement context) throws IncorrectOperationException;
|
||||
}
|
||||
|
||||
@@ -453,4 +453,7 @@ public interface PsiElementFactory extends PsiJavaParserFacade, JVMElementFactor
|
||||
*/
|
||||
@NotNull
|
||||
PsiCatchSection createCatchSection(@NotNull PsiType exceptionType, @NotNull String exceptionName, @Nullable PsiElement context) throws IncorrectOperationException;
|
||||
|
||||
@NotNull
|
||||
PsiExpression createExpressionFromText(@NotNull String text, PsiElement context) throws IncorrectOperationException;
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2011 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.
|
||||
@@ -106,7 +106,8 @@ public abstract class GroovyPsiElementFactory implements JVMElementFactory {
|
||||
return createExpressionFromText(exprText, null);
|
||||
}
|
||||
|
||||
public abstract GrExpression createExpressionFromText(String exprText, @Nullable PsiElement context);
|
||||
@NotNull
|
||||
public abstract GrExpression createExpressionFromText(@NotNull String exprText, @Nullable PsiElement context);
|
||||
|
||||
public abstract GrVariableDeclaration createFieldDeclaration(String[] modifiers, String identifier, @Nullable GrExpression initializer, @Nullable PsiType type);
|
||||
public abstract GrVariableDeclaration createFieldDeclarationFromText(String text);
|
||||
|
||||
+2
-1
@@ -141,7 +141,8 @@ public class GroovyPsiElementFactoryImpl extends GroovyPsiElementFactory {
|
||||
return createReferenceExpressionFromText(text);
|
||||
}
|
||||
|
||||
public GrExpression createExpressionFromText(String text, PsiElement context) {
|
||||
@NotNull
|
||||
public GrExpression createExpressionFromText(@NotNull String text, PsiElement context) {
|
||||
GroovyFileImpl file = (GroovyFileImpl)createGroovyFile(text, false, context);
|
||||
GrTopStatement[] topStatements = file.getTopStatements();
|
||||
if (topStatements.length == 0 || !(topStatements[0] instanceof GrExpression)) {
|
||||
|
||||
Reference in New Issue
Block a user