| Summary: | IType.getFullyQualifiedName() from newTypeHierarchy's not consistent | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | kurt <kurt2002> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | kurt2002 |
| Version: | 4.5 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | stalebug | ||
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Depending on some interal state of Eclipse and/or IType the method IType.getFullyQualifiedName() of a IType.newTypeHierarchy-list results in wrong or different names of the elements. I am using a similar code as follows to find subclasses of a given class. IType t = ... find the IType of the class ... ITypeHierarchy th = t.newTypeHierarchy(null); for (IType it: th.getAllClasses()) System.out.println(it.getFullyQualifiedName()); For the given testclasses (see below) the wrong results is: ebug.AnyClass$1 ebug.AnyClass$1 ebug.AnyClass$1 After opening the involved classes in Java-Editor the names seem to be ok: ebug.AnyClass$1 ebug.AnyClass$2 ebug.AnyClass$3 To reproduce the problem close and reopen the project containing the classes or close and start Eclipse again. The test-classes should not be open in any editor ! Running the testcode should give you the above results. Open the classes in Java-Editor and running the testcode should now give the correct results. Testclasses: package ebug; public class ToSubclass { public ToSubclass() { super(); } public void overrideMe() { /*empty*/ } } package ebug; public class AnyClass { public void m1() { new ToSubclass() { @Override public void overrideMe() { super.overrideMe(); } }.overrideMe(); } public void m2() { new ToSubclass() { @Override public void overrideMe() { super.overrideMe(); } }.overrideMe(); } public void m3() { new ToSubclass() { @Override public void overrideMe() { super.overrideMe(); } }.overrideMe(); } }