| Summary: | [search] Search Engine still reports potential matches on missing types although they have bindings | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Frederic Fusier <frederic_fusier> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P5 | CC: | david_audel, jerome_lanneluc |
| Version: | 3.4 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
|
Description
Frederic Fusier
Following example may be better:
public class X {
Unknown foo;
}
class Y {
X x;
void foo(X param) {
if (this.x.foo.equals(param.foo)) {
// ...
}
}
}
Where Search Engine find 2 potential matches.
Finally, I don't think that taking missing types into account will bring a great benefit for search engine... The reason is that the missing type qualification is set to the package of the compilation unit where the missing type is encountered. Hence, if search engine tried to match the missing type in comment 1, then it would report an exact match. However, as soon as the missing type would not be in the package where the match was found, then search engine would still need to report a potential match as the missing type had the wrong qualification. E.g. the following test case: A.java: package a; class A {} B.java package b; import a.A; class B { A a; } The type A is not visible from B, hence an error on the import and the reference to A flagged as a missing type. Here the missing type does not help to resolve the potential match :-( IMO, this kind of situation is the most common one. The comment 1 test case is only a pure theoretic case to show what could be done but should be rare in the real life... So, close as WONTFIX Reopened The test case of comment 1 seems still valid In this test case the place where is really the missing type has no importance. As the declaring type is not unknown it seems possible to find all the references of one of his field. 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. If you have further information on the current state of the bug, please add it. 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. |