Summary: | Search results in .class files don't select reference | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Peter Burka <peter_burka> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P1 | ||
Version: | 2.0 | ||
Target Milestone: | 2.0 M6 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Peter Burka
2002-04-30 16:54:35 EDT
Test case was not very accurate. It works for class files which are in an internal JAR but not for class files coming from outside Eclipse i.e. external JARs like JDK. This problem was fixed some time ago and now seems to be back for some reason. Asking the Kai (editor) for comment. The bug is also in build 20020501 The problem is in JavaCore.isReferencedBy(...): because the handle identifier contains the project name even for external resources we get false for the same external element if it comes from a different project. This can happen if I search for X and J Core finds X in project A while the editor already opened X but from/via project B. This can be fixed a) if the handle identifier for external classes would not contain the project b) if isReferencedBy would ignore the project when comparing external resources NOTE: isReferencedBy should be improved because the Javadoc does not match the code: the code only works for binary Java elements while the javadoc speaks for all Java elements. Moving to J Core Fixed by regenerating a marker/markerDelta element from the handleID. Element comparison supports matching external ones. Note that this hasn't changed recently, and was thus wrong since day one when we adopted this helper method from UI land. Fixed Fixed. |