mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-74716 Groovy: IOE at PsiJavaParserFacadeImpl.createExpressionFromText() on Change Signature Refactoring -> Add Parameter without default value, if method is used in Java code
This commit is contained in:
+1
-2
@@ -103,8 +103,7 @@ public class GrParameterInfo implements JavaParameterInfo {
|
||||
}
|
||||
|
||||
public PsiExpression getValue(PsiCallExpression callExpression) {
|
||||
return JavaPsiFacade.getInstance(callExpression.getProject()).getElementFactory()
|
||||
.createExpressionFromText(myDefaultValue, callExpression);
|
||||
return JavaPsiFacade.getElementFactory(callExpression.getProject()).createExpressionFromText(getDefaultValue(), callExpression);
|
||||
}
|
||||
|
||||
public boolean isVarargType() {
|
||||
|
||||
+4
@@ -240,6 +240,10 @@ public class ChangeSignatureTest extends ChangeSignatureTestCase {
|
||||
doTest(new SimpleInfo("newName", 0), new SimpleInfo(1));
|
||||
}
|
||||
|
||||
public void testDefaultInitializerInJava() {
|
||||
doTest(new SimpleInfo("p", -1, "", "1", ""));
|
||||
}
|
||||
|
||||
private PsiType createType(String typeText) {
|
||||
return JavaPsiFacade.getElementFactory(getProject()).createTypeByFQClassName(typeText, GlobalSearchScope.allScope(getProject()));
|
||||
}
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class GClass {
|
||||
public void tes<caret>t() {}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class JClass {
|
||||
void doTest() {
|
||||
new GClass().test();
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class GClass {
|
||||
public test(def p = 1) {}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class JClass {
|
||||
void doTest() {
|
||||
new GClass().test(1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user