Summary: | [1.5][enum] IType of anonymous enum declaration says isLocal() == false | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> |
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | jarthana |
Version: | 3.1 | ||
Target Milestone: | 3.2 M3 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Markus Keller
2005-02-15 12:42:25 EST
The local type inside the outline is hidden when I filter out local types. So why do you say that the type is not local? The local types filter (MemberFilter#isLocalType(IType)) does not query #isLocal(), but checks whether an IType's parent is a non-IType IMember. I found the bug when trying to delete an anonymous enum from the outline view: - set a breakpoint in ASTNodeDeleteUtil 1.17, line 45 - delete the enum "{...}" from the outline view Changed SourceType#isLocal() to handle the case where the parent is an IField. Added regression test LocalElementTests#testAnonymousType6(). Verified for 3.2 M3 using build I20051025-0800+JDT/Core v_618a See bug 339337, comment #2. The JLS §14.3 says this: "A local class is a nested class (§8) that is not a member of any class and that has a name." And the example given in comment #0 seems satisfy this condition. Should it still be considered a local type? |