mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
LightTypeElement#getText: include annotations
Otherwise JavaChangeInfoImpl.fillOldParams thinks that old parameter type has no annotation, so if we removed an annotation, it's considered unchanged Fixes IDEA-235090 "Change signature" action removing @NotNull does nothing GitOrigin-RevId: 419990f23330090fc5bd8f92500328db7bd5e15b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cdc2649bc5
commit
218a25f776
@@ -24,7 +24,7 @@ public class LightTypeElement extends LightElement implements PsiTypeElement {
|
||||
|
||||
@Override
|
||||
public String getText() {
|
||||
return myType.getPresentableText();
|
||||
return myType.getPresentableText(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import java.lang.annotation.*;
|
||||
|
||||
class X {
|
||||
void <caret>test(@Foo int x) {}
|
||||
|
||||
@Target(ElementType.TYPE_USE)
|
||||
@interface Foo
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import java.lang.annotation.*;
|
||||
|
||||
class X {
|
||||
void test(int x) {}
|
||||
|
||||
@Target(ElementType.TYPE_USE)
|
||||
@interface Foo
|
||||
}
|
||||
@@ -560,6 +560,13 @@ public class ChangeSignatureTest extends ChangeSignatureBaseTest {
|
||||
};
|
||||
}, false);
|
||||
}
|
||||
|
||||
public void testRemoveAnnotation() {
|
||||
doTest(null, null, null, method -> new ParameterInfoImpl[]{
|
||||
ParameterInfoImpl.create(0).withName("x").withType(PsiType.INT)
|
||||
}, false);
|
||||
|
||||
}
|
||||
|
||||
/* workers */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user