mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-84963 Disprefer annotations in autocomplete at places where they cannot be used
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Z<caret>
|
||||
@interface Foo {
|
||||
}
|
||||
|
||||
@Target({ElementType.ANNOTATION_TYPE})
|
||||
@interface ZMetaAnno {}
|
||||
|
||||
@Target({ElementType.LOCAL_VARIABLE})
|
||||
@interface ZLocalAnno {}
|
||||
+4
@@ -342,6 +342,10 @@ public class NormalCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
checkPreferredItems 0, 'serial', 'superExpressionInIllegalContext'
|
||||
}
|
||||
|
||||
public void testPreferApplicableAnnotations() throws Throwable {
|
||||
checkPreferredItems 0, 'ZMetaAnno', 'ZLocalAnno'
|
||||
}
|
||||
|
||||
public void testJComponentAddNewWithStats() throws Throwable {
|
||||
final LookupImpl lookup = invokeCompletion("/../smartTypeSorting/JComponentAddNew.java");
|
||||
assertPreferredItems(0, "FooBean3", "JComponent", "Component");
|
||||
|
||||
Reference in New Issue
Block a user