Community
Participate
Working Groups
Created attachment 283474 [details] Result Code Mining triggered search results in wrong search results To test: 1.) Open JavaManipulationPlugin 2.) Activate code mining 3.) Select public static void log(IStatus status) { method 4.) Trigger search -> Two results: org.apache.tools.ant.taskdefs.optional.ssh.ScpFromMessageBySftp.class -> Wrong
I've see similar behaviour. It does indicate it's a "potential match" though. What happens if you go into General -> Search and enable "Ignore potential matches". Are there any other clearly incorrect results ? Looking through JavaReferenceCodeMining it looks like it will include potential mathes if that is what the preferences have configured. I think this was mainly to align with things like a call hierarchy search.
@Lars. Any additional info here, or can it be closed ? Code minings does respect the setting on that "ignore potential matches" checkbox.
Marking as CLOSED (WORKSFORME) for now. If I've misunderstood the issue, or another such reference comes up that is clearly wrong and not marked as "potential match", then feel free to re-open.
Thanks Roland, indeed the search results seem identical and if I remove this setting things behave more to my expectations.
The Open Call Hierarchy results in a different result if "Ignore potential matches" is not flagged. Code minings shows x matches Select method and call "Open Call Hierarchy" -> results in no hits for unused method Is that correct? If I set the "Ignore potential matches" flag both are correct, e.g. zero. Is this a bug in "Open Call Hierarchy"?
I think https://bugs.eclipse.org/bugs/show_bug.cgi?id=543289#c4 still applies here, in that call hierarchy results might be a bit different. The closest thing to code mining references on a symbol, would be performing a workspace search for references of the same symbol (CTRL + SHIFT + G). So if those 2 are the same then we should be fine. For example, call hierarchy certainly wouldn't catch javadoc references but code mining and workspace references do.
Thanks Roland for the explanation. Makes sense.