| Summary: | IType#resolveType(String) on binary type with attached source doesn't find imported type | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Dani Megert <daniel_megert> |
| Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | amj87.iitr, manju656, markus.kell.r, noopur_gupta |
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Dani Megert
That's because IType#resolveType(String) doesn't find the typeName "FileModificationValidator" on the IType IFileModificationValidator. You can also reproduce this in the JavaElement view when you focus on FileModificationValidator and then use context menu > resolveType(String)... . Works fine if I pass the fully-qualified name "org.eclipse.core.resources.team.FileModificationValidator". The problem could be that FileModificationValidator.class doesn't need to contain the IFileModificationValidator type at all, since it is only referenced in Javadoc. Encountered the same issue in the following case also: 1. Open 'org.eclipse.core.runtime.Preferences' as .class file 2. Hover over the type declaration (Preferences) 3. In the Javadoc, click on the link 'IEclipsePreferences' ==> nothing happens. The fix is probably to remove the workaround in org.eclipse.jdt.internal.ui.viewsupport.JavaElementLinks#resolveType(IType, String), see bug 206597. (In reply to comment #2) > The fix is probably to remove the workaround in > org.eclipse.jdt.internal.ui.viewsupport.JavaElementLinks#resolveType(IType, > String), see bug 206597. Sorry, I suggested this, but that's not actually the problem. That method already calls IType#resolveType(String) first. The problem is that bug 206597 was not resolved completely. IType#resolveType(String) still doesn't seem to consider imports from attached source when we pass a simple name that has been imported. Adapted bug summary. *** This bug has been marked as a duplicate of bug 245689 *** |