mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-54220 Code Completion for value() method in @interfaces could be added
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
@interface Some {
|
||||
String v<caret>
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
@interface Some {
|
||||
String value()<caret>
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public class Foo {
|
||||
public void a() {
|
||||
int i = createStylesheetCombobox();
|
||||
}
|
||||
|
||||
private int createStylesheetCombobox<caret>
|
||||
}
|
||||
+1
-1
@@ -94,7 +94,7 @@ public class HeavyNormalCompletionTest extends JavaCodeInsightFixtureTestCase {
|
||||
myFixture.configureByFile("/codeInsight/completion/normal/" + getTestName(false) + ".java");
|
||||
assertInstanceOf(myFixture.getFile().getVirtualFile().getFileSystem(), LocalFileSystem.class); // otherwise the completion copy won't be preserved which is critical here
|
||||
myFixture.completeBasic();
|
||||
assertOrderedEquals(myFixture.getLookupElementStrings(), "gAnInt", "getAaa", "getBbb");
|
||||
assertOrderedEquals(myFixture.getLookupElementStrings(), "getAaa", "getBbb");
|
||||
myFixture.getEditor().getCaretModel().moveToOffset(myFixture.getEditor().getCaretModel().getOffset() + 2);
|
||||
assertNull(myFixture.completeBasic());
|
||||
}
|
||||
|
||||
+6
-2
@@ -138,8 +138,7 @@ public class VariablesCompletionTest extends LightFixtureCompletionTestCase {
|
||||
public void testUnresolvedMethodName() throws Exception {
|
||||
configureByFile(FILE_PREFIX + "locals/" + "UnresolvedMethodName.java");
|
||||
complete();
|
||||
checkResultByFile(FILE_PREFIX + "locals/" + "UnresolvedMethodName.java");
|
||||
assert myFixture.lookupElementStrings.containsAll(["creAnInt", "createStylesheetCombobox"])
|
||||
checkResultByFile(FILE_PREFIX + "locals/" + "UnresolvedMethodName_after.java");
|
||||
}
|
||||
|
||||
public void testArrayMethodName() throws Throwable {
|
||||
@@ -172,6 +171,11 @@ public class VariablesCompletionTest extends LightFixtureCompletionTestCase {
|
||||
configureByFile(FILE_PREFIX + getTestName(false) + ".java")
|
||||
}
|
||||
|
||||
public void testAnnotationValue() {
|
||||
configure()
|
||||
checkResultByFile(FILE_PREFIX + getTestName(false) + "_after.java")
|
||||
}
|
||||
|
||||
public void testConstructorParameterName() {
|
||||
configure()
|
||||
assertStringItems("color");
|
||||
|
||||
Reference in New Issue
Block a user