Summary: | [search] for implementors does not find subclasses of binary classes | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> | ||||||
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | benno.baumgartner, jerome_lanneluc, philippe_mulet | ||||||
Version: | 3.2 | ||||||||
Target Milestone: | 3.2 RC1 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Markus Keller
2006-01-20 09:37:44 EST
You're right for the first point. I mean, Search engine find the implementors because it does not use indexing for working copy. For the second point (ie. anonymous) it's a little bit more complicated... Search engine find reference due to fix of bug 3442 in method notifySourceElementRequestor(TypeDeclaration, boolean, TypeDeclaration) of SourceElementParser (line 1224). In case of anonymous without superinterface, the parser sets it with expression type. This has for consequence that indexer store a key with interface flavor for Exception super type and so return Test.java as a candidate CU for the search request (note that this fix sounds really strange as it puts a class in superinterface table... It was done a long time ago on 2.0, so I have to double-check with Olivier if this was intentional or he missed this case at that time...). Looking at all code concerning implementors search request, it seems that my conclusion in bug 12442 comment 11 was wrong (again). I discovered that indexer have filters to exclude superclasses since the beginning (bug 1G5HBQA: ITPJUI:WINNT). This seems to prove that Search Engine initial design was not to report superclasses while searching for class implementors but unfortunately have some bugs in implementation which make me thought the opposite... I'll talk with Philippe and Jerome to see whether we finally decide to keep initially intended design or change it to accept to find superclasses... Re "anonymous of a class has super interface", see also bug 86313 (type kind of anonymous can't be determined without resolving). I think it's a good candidate for RC1 +1 Created attachment 38302 [details]
Patch to implement this change
Contains patch file + jar for tests.
Created attachment 38387 [details]
Tests have been rewritten to match exactly the bug test case
Previous tests pass but didn't match exactly the test case as the searched class were not a binary one.
I've rewrite them and search implementors for a binary class both in source and binary files...
Jar files are unchanged from previous patch (so it's not completely obsolete...)
Patch released in HEAD. Verified for 3.2 RC1 using build I20060413-0010 |