Java search (was Re: jEdit/Eclipse Interface Tools) [message #1749014] |
Thu, 01 December 2016 02:42  |
Eclipse User |
|
|
|
Hi
A search that I trust and understand would be good. I'm afraid that I use Java search very sparingly since I do not understand it. It variously returns far too much or far too little. I raised a Bugzilla a while back about the scope of Project search and just got a response that I should use Hierarchy. But I remain confused. I often resort to File search.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=440203#c3
For instance, if I select a use of the org.eclipse.ocl.pivot.TypedElement.getType() operation, and then Find References, I want all references to my getType(). I am not interested in references from org.eclipse.jdt.internal.corext.dom.ASTFlattener to org.eclipse.jdt.core.dom.AnnotationTypeMemberDeclaration.getType(), which obviously cannot reference the selected getType(). JDT is actually doing a File Search. But I do not see references to org.eclipse.uml2.uml.TypedElement.getType(), so it is an incomplete File Search. Useful when you get the hit that you want but not to be trusted for definitive results.
The only search that I find really reliable is to corrupt the spelling/signature of the search target and then look for the compilation errors that result.
Regards
Ed Willink
|
|
|
|
|
|
|
|
|
|
Re: Java search (was Re: jEdit/Eclipse Interface Tools) [message #1750156 is a reply to message #1749719] |
Fri, 16 December 2016 09:12  |
Eclipse User |
|
|
|
Hi
Just revisited this using M4.
@David: I just discovered the "Potential Matches" option. No it was not selected.
@Stephan: I tried menu finds on a method in an EMF base class and one of its derived classes
void ShadowExpCS::setValue(String value);
Declarations in Workspace: 94 (3 correct, 91 spurious)
Declarations in Project: 57 (3 correct, 54 spurious)
Declarations in Hierarchy: 3 (3 correct)
References in Workspace: 13 (5 correct, 8 spurious)
References in Project: 8 (5 correct, 3 spurious)
References in Hierarchy: 5 (5 correct)
void ShadowExpCSImpl::setValue(String value);
Declarations in Workspace: 94 (3 correct, 91 spurious)
Declarations in Project: 57 (3 correct, 54 spurious)
Declarations in Hierarchy: 2 (2 correct, 1 missing)
References in Workspace: 10 (2 correct, 3 missing, 8 spurious)
References in Project: 5 (2 correct, 3 missing, 3 spurious)
References in Hierarchy: 2 (2 correct, 3 missing)
Regards
Ed Willink
|
|
|
Powered by
FUDForum. Page generated in 0.06900 seconds