Community
Participate
Working Groups
Build ID: I20080330-1350 Steps To Reproduce: 1. Type '@' and press CTRL+Space to activate the content assist above a Method 2. It will show all annotations, even those whose target is set to "ElementType.TYPE" More information: The content assist should check if the annotation is actually possible at the current location and not provide it otherwise.
All annotations are proposed but annotations whose target is set to ElementType.METHOD are proposed first. ---------------------------- @Target(ElementType.TYPE) public @interface MyAnnot1 { } ---------------------------- Target(ElementType.METHOD) public @interface MyAnnot2 { } ---------------------------- public class Test { @MyAnnot| // do ctrl+space at | location public void foo() {} } ---------------------------- With this test case MyAnnot1 and MyAnnot2 are proposed but MyAnnot2 is at the top of the list of proposals. MyAnnot1 must not be filtered because perhaps the user want to type: public class Test { @MyAnnot1 class X {} public void foo() {} } I close this bug as INVALID because it works as designed.
You are right David, I did not thought of this use-case. Well done!
Was verified for 3.4M7 by reporter (comment 2)