Summary: | Searching for field references with SearchEngine returns some incorrect results | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Lance Walton <lance> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | RESOLVED WORKSFORME | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.1 | ||
Target Milestone: | 2.1 RC2 | ||
Hardware: | Macintosh | ||
OS: | Mac OS X - Carbon (unsup.) | ||
Whiteboard: |
Description
Lance Walton
2003-03-02 11:46:14 EST
My report seems to be missing it's end. Here is the rest: We search SearchEngineTest using: SearchEngine searchEngine = new SearchEngine(); searchEngine.search( workspace, SearchEngine.createSearchPattern("*", IJavaSearchConstants.FIELD, IJavaSearchConstants.REFERENCES, false), SearchEngine.createJavaSearchScope(new ICompilationUnit[] {compilationUnit}), resultCollector ); where compilationUnit is the compilation unit of the test class above and resultCollector is some implementation of IJavaSearchResultCollector. The accept() method of IJavaSearchResultCollector gets called with start and end indexes that identify 'System' and 'out' as referenced fields. 'out' is understandable but 'System' is not. Also, if we insert a space before 'out' in the SearchEngineTest class above, then this space is included in the range specified by the 'start' and 'end' parameters in the accept() method. Lance Which build are you using? In latest integration build (I20030227), I see the correct source range reported for 'out' and 'System' is not reported as a match. I'm using 200302061700 (on Mac) Lance - Can you reproduce it on latest integration build ? Nope. The latest integration build fixes it. Taa, Lance Thanks, closing |