mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-126334 Correct declaration scope for light parameters and getReturnTypeElementGroovy for light methods
This commit is contained in:
+5
-1
@@ -200,7 +200,11 @@ public class GrLightMethodBuilder extends LightElement implements GrMethod, Ori
|
||||
|
||||
@Override
|
||||
public GrTypeElement getReturnTypeElementGroovy() {
|
||||
return null;
|
||||
PsiType returnType = getReturnType();
|
||||
if (returnType == null) {
|
||||
return null;
|
||||
}
|
||||
return new GrLightTypeElement(returnType, getManager());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -64,9 +64,9 @@ public class GrLightParameterListBuilder extends LightElement implements GrParam
|
||||
return myCachedParameters;
|
||||
}
|
||||
|
||||
public void copyParameters(@NotNull PsiMethod method, PsiSubstitutor substitutor) {
|
||||
public void copyParameters(@NotNull PsiMethod method, PsiSubstitutor substitutor, PsiMethod scope) {
|
||||
for (PsiParameter parameter : method.getParameterList().getParameters()) {
|
||||
GrLightParameter p = new GrLightParameter(StringUtil.notNullize(parameter.getName()), substitutor.substitute(parameter.getType()), this);
|
||||
GrLightParameter p = new GrLightParameter(StringUtil.notNullize(parameter.getName()), substitutor.substitute(parameter.getType()), scope);
|
||||
|
||||
if (parameter instanceof GrParameter) {
|
||||
p.setOptional(((GrParameter)parameter).isOptional());
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ public class GrMethodWrapper extends GrLightMethodBuilder implements PsiMirrorEl
|
||||
|
||||
getModifierList().copyModifiers(method);
|
||||
|
||||
getParameterList().copyParameters(method, substitutor);
|
||||
getParameterList().copyParameters(method, substitutor, this);
|
||||
|
||||
if (method instanceof OriginInfoAwareElement) {
|
||||
setOriginInfo(((OriginInfoAwareElement)method).getOriginInfo());
|
||||
|
||||
Reference in New Issue
Block a user