mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Closure has GrParameters instead of PsiParameters
This commit is contained in:
+1
-2
@@ -17,7 +17,6 @@
|
||||
package org.jetbrains.plugins.groovy.lang.psi.api.statements.blocks;
|
||||
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiParameter;
|
||||
import com.intellij.psi.PsiType;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrParametersOwner;
|
||||
@@ -43,7 +42,7 @@ public interface GrClosableBlock extends GrExpression, GrCodeBlock, GrParameters
|
||||
@Nullable
|
||||
PsiType getReturnType();
|
||||
|
||||
PsiParameter[] getAllParameters();
|
||||
GrParameter[] getAllParameters();
|
||||
|
||||
@Nullable
|
||||
PsiElement getArrow();
|
||||
|
||||
+5
-5
@@ -51,7 +51,7 @@ import org.jetbrains.plugins.groovy.refactoring.GroovyNamesUtil;
|
||||
* @author ilyas
|
||||
*/
|
||||
public class GrClosableBlockImpl extends GrBlockImpl implements GrClosableBlock {
|
||||
private volatile PsiParameter mySyntheticItParameter;
|
||||
private volatile GrParameter mySyntheticItParameter;
|
||||
private GrVariable myOwner;
|
||||
|
||||
public GrClosableBlockImpl(@NotNull ASTNode node) {
|
||||
@@ -124,9 +124,9 @@ public class GrClosableBlockImpl extends GrBlockImpl implements GrClosableBlock
|
||||
return GrParameter.EMPTY_ARRAY;
|
||||
}
|
||||
|
||||
public PsiParameter[] getAllParameters() {
|
||||
public GrParameter[] getAllParameters() {
|
||||
if (hasParametersSection()) return getParameters();
|
||||
return new PsiParameter[]{getSyntheticItParameter()};
|
||||
return new GrParameter[]{getSyntheticItParameter()};
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -168,9 +168,9 @@ public class GrClosableBlockImpl extends GrBlockImpl implements GrClosableBlock
|
||||
mySyntheticItParameter = null;
|
||||
}
|
||||
|
||||
public PsiParameter getSyntheticItParameter() {
|
||||
public GrParameter getSyntheticItParameter() {
|
||||
if (mySyntheticItParameter == null) {
|
||||
PsiParameter fresh = new ClosureSyntheticParameter(this);
|
||||
GrParameter fresh = new ClosureSyntheticParameter(this);
|
||||
synchronized (this) {
|
||||
if (mySyntheticItParameter == null) {
|
||||
mySyntheticItParameter = fresh;
|
||||
|
||||
Reference in New Issue
Block a user