Community
Participate
Working Groups
Created attachment 112327 [details] This is the source for a plugin that demonstrates the problem Build ID: I20080617-2000 Steps To Reproduce: 1. I will attach a simple plugin (1 action that invokes a search) that shows the problem. I'll also attach a jar file that holds classes that should be found by the search. 2. Install the plugin, create a project that references the attached jar, and invoke the plugin's search action. It will report zero matches found. 3. If desired, you can configure a project as describe in plugin comments (referencing jar through a variable) and see that then the files ARE found by the search. More information: See attached plugin.zip and test jar file
Created attachment 112328 [details] This is the file to search (should find 3 matches)
Realized I didn't add sufficient detail on the 'invoke the plugin's search action'. This plugin installs a right-click action that will be enabled when the selection in the project explorer view is a Project. The action is labeled 'DEBUG PLUGIN Search this project'. In my case I set up different projects that included the attached jar files in different ways -- as a local component (/lib subdirectory), as an external jar (referring to C:\tmp\<testjar>, as a component of a dependent project, etc. In all cases, the jar itself is visible (I dump out the SearchScope in each case and see that it is present), and the IType within the jar that we use as the base class for the search is always located. But the types within the jar that extend the base class are not returned when we do a search for implementors (or even when we do a search for all occurrences).
I'll investigate
The reason why search engine does not find any match is because of the jar file does not have any source attached (see bug 127442). Is it the case in your initial test case or did you forget to attach it when creating your test case?
That was, in fact, the problem. Somewhere I'd gotten the idea that the search could work against .class files and didn't need the source. Once I created a source attachment for the jar files, the search is now returning the expected results. OK to close or mark invalid. Thanks!
(In reply to comment #5) > That was, in fact, the problem. Somewhere I'd gotten the idea that the search > could work against .class files and didn't need the source. Once I created a > source attachment for the jar files, the search is now returning the expected > results. > > OK to close or mark invalid. > > Thanks! > Instead of closing this bug, I'll use it to track work around this peculiar issue.
Created attachment 112559 [details] Patch got from bug 127442 This patch currently intends to find fields and methods references in .class files which have no attached source. It's neither finalized nor have any regression tests...
I surely have no time to continue to work on this problem during 3.5 dvpt process, hence set its priority to P5. Anyone who wanted to complete the provided patch would be very welcomed :-) TIA
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.
This bug has an advanced patch (carried over from bug 127442). It would be a waste of efforts to totally ignore this.