mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-169780 Show parameter types in implement/override popup
This commit is contained in:
+3
-1
@@ -162,7 +162,9 @@ public class JavaGenerateMemberCompletionContributor {
|
||||
PsiType type = substitutor.substitute(prototype.getReturnType());
|
||||
String signature = modifiers + (type == null ? "" : type.getPresentableText() + " ") + methodName;
|
||||
|
||||
String parameters = PsiFormatUtil.formatMethod(prototype, substitutor, PsiFormatUtilBase.SHOW_PARAMETERS, PsiFormatUtilBase.SHOW_NAME);
|
||||
String parameters = PsiFormatUtil.formatMethod(prototype, substitutor,
|
||||
PsiFormatUtilBase.SHOW_PARAMETERS,
|
||||
PsiFormatUtilBase.SHOW_NAME | PsiFormatUtilBase.SHOW_RAW_TYPE | PsiFormatUtilBase.SHOW_TYPE);
|
||||
|
||||
String overrideSignature = " @Override " + signature; // leading space to make it a middle match, under all annotation suggestions
|
||||
LookupElementBuilder element = LookupElementBuilder.create(prototype, signature).withLookupString(methodName).
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
class Super {
|
||||
void foo1() {}
|
||||
@Deprecated
|
||||
void foo2() {}
|
||||
void foo2(int x) {}
|
||||
}
|
||||
|
||||
class Sub extends Super {
|
||||
|
||||
+2
-2
@@ -1514,7 +1514,7 @@ class XInternalError {}
|
||||
|
||||
def p = LookupElementPresentation.renderElement(item)
|
||||
assert p.itemText == 'public void run'
|
||||
assert p.tailText == '(t, myInt) {...}'
|
||||
assert p.tailText == '(String t, int myInt) {...}'
|
||||
assert p.typeText == 'Foo'
|
||||
|
||||
lookup.currentItem = item
|
||||
@@ -1552,7 +1552,7 @@ class XInternalError {}
|
||||
|
||||
p = LookupElementPresentation.renderElement(setter)
|
||||
assert p.itemText == setter.lookupString
|
||||
assert p.tailText == '(field) {...}'
|
||||
assert p.tailText == '(int field) {...}'
|
||||
assert !p.typeText
|
||||
|
||||
lookup.currentItem = getter
|
||||
|
||||
Reference in New Issue
Block a user