mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
some api methods
This commit is contained in:
-1
@@ -24,5 +24,4 @@ import org.jetbrains.plugins.groovy.lang.psi.GroovyPsiElement;
|
||||
* @author ilyas
|
||||
*/
|
||||
public interface GrCondition extends GroovyPsiElement {
|
||||
public static final GrCondition[] EMPTY_ARRAY = new GrCondition[0];
|
||||
}
|
||||
|
||||
+1
-2
@@ -23,7 +23,6 @@ import org.jetbrains.plugins.groovy.lang.psi.api.auxiliary.GrCondition;
|
||||
* @author ilyas
|
||||
*/
|
||||
public interface GrLoopStatement extends GrStatement {
|
||||
|
||||
GrCondition replaceBody (GrCondition statement) throws IncorrectOperationException;
|
||||
GrCondition getBody();
|
||||
GrStatement getBody();
|
||||
}
|
||||
|
||||
+2
@@ -34,4 +34,6 @@ public interface GrVariableDeclaration extends GrStatement, GrMembersDeclaration
|
||||
|
||||
@Nullable
|
||||
GrTypeElement getTypeElementGroovyForVariable(GrVariable var);
|
||||
|
||||
GrTupleDeclaration getTupleDeclaration();
|
||||
}
|
||||
|
||||
+6
-7
@@ -115,7 +115,11 @@ public abstract class GrVariableDeclarationBase extends GrStubElementBase<EmptyS
|
||||
|
||||
@Override
|
||||
public boolean isTuple() {
|
||||
return findChildByClass(GrTupleDeclaration.class) != null;
|
||||
return getTupleDeclaration() != null;
|
||||
}
|
||||
|
||||
public GrTupleDeclaration getTupleDeclaration() {
|
||||
return findChildByClass(GrTupleDeclaration.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -173,18 +177,13 @@ public abstract class GrVariableDeclarationBase extends GrStubElementBase<EmptyS
|
||||
return "Multiple variable definitions";
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public GrTupleDeclaration getTuple(){
|
||||
return findChildByClass(GrTupleDeclaration.class);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public GrExpression getInitializerGroovy(){
|
||||
return findChildByClass(GrExpression.class);
|
||||
}
|
||||
|
||||
public GrVariable[] getVariables() {
|
||||
return getTuple().getVariables();
|
||||
return getTupleDeclaration().getVariables();
|
||||
}
|
||||
|
||||
public GrMember[] getMembers() {
|
||||
|
||||
Reference in New Issue
Block a user