mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-158416 Deprecated methods are not striked through in implements/override completion
This commit is contained in:
+3
@@ -168,6 +168,9 @@ public class JavaGenerateMemberCompletionContributor {
|
||||
LookupElementBuilder element = LookupElementBuilder.create(prototype, signature).withLookupString(methodName).
|
||||
withLookupString(signature).withLookupString(overrideSignature).withInsertHandler(insertHandler).
|
||||
appendTailText(parameters, false).appendTailText(" {...}", true).withTypeText(typeText).withIcon(icon);
|
||||
if (prototype.isDeprecated()) {
|
||||
element = element.setStrikeout(true);
|
||||
}
|
||||
element.putUserData(GENERATE_ELEMENT, true);
|
||||
return element;
|
||||
}
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class Super {
|
||||
void foo1() {}
|
||||
@Deprecated
|
||||
void foo2() {}
|
||||
}
|
||||
|
||||
class Sub extends Super {
|
||||
foo<caret>
|
||||
}
|
||||
+7
@@ -1410,6 +1410,13 @@ class XInternalError {}
|
||||
checkResult()
|
||||
}
|
||||
|
||||
public void testStrikeOutDeprecatedSuperMethods() {
|
||||
configure()
|
||||
myFixture.assertPreferredCompletionItems 0, 'void foo1', 'void foo2'
|
||||
assert !LookupElementPresentation.renderElement(lookup.items[0]).strikeout
|
||||
assert LookupElementPresentation.renderElement(lookup.items[1]).strikeout
|
||||
}
|
||||
|
||||
public void testAccessorViaCompletion() {
|
||||
configure()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user