Bug 38679 - Search for class ref shows local class containing a match on an import [search]
Summary: Search for class ref shows local class containing a match on an import [search]
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-09 21:58 EDT by Nick Edgar CLA
Modified: 2003-12-17 11:14 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Edgar CLA 2003-06-09 21:58:25 EDT
build I20030605

With UI in source and rest in binary, 
search for all refs to org.eclipse.ui.views.tasks.TaskList.

Among others, it matches:
org.eclipse.pde.internal.ui.editor.manifest.AlertSection.checkMarkers
(Composite, FormWidgetFactory) (2 matches)
org.eclipse.pde.internal.ui.editor.manifest.AlertSection$1

Double-click on the match for AlertSection$1.
It selects the corresponding import, which is not in a local class.

Note that the match in checkMarkers is in a local class.
Comment 1 Dani Megert CLA 2003-06-10 12:31:37 EDT
Can you explain which plug-ins/projects you consider "UI"?
Comment 2 Nick Edgar CLA 2003-06-10 13:16:53 EDT
I have the platform-ui module loaded, which contains source for:
org.eclipse.jface
org.eclipse.jface.text
org.eclipse.text
org.eclipse.ui
org.eclipse.ui.editors
org.eclipse.ui.views
org.eclipse.ui.workbench
org.eclipse.ui.workbench.texteditor

In addition, I had the following projects in source:
org.eclipse.ui.versioncheck (I've asked for this to be added to the module)
org.eclipse.ui.examples.javaeditor
org.eclipse.ui.examples.multipageeditor
org.eclipse.ui.examples.propertysheet
org.eclipse.ui.examples.readmetool
org.eclipse.ui.tests




Comment 3 Dani Megert CLA 2003-06-12 10:52:15 EDT
I assume that's a bug in the search engine. Instead of reporting an import
declaration it returns a type as enclosing element while start/end matches the
import declaration in the source.
Comment 4 Kent Johnson CLA 2003-11-24 12:57:36 EST
I tried to reproduce this using a M1 drop (20030605) and never saw the match 
org.eclipse.pde.internal.ui.editor.manifest.AlertSection$1

Instead I saw a valid match to the import statement from AlertSection.java.

Running the M1 workspace on top of M5 and trying the search again also worked 
fine.
Comment 5 Nick Edgar CLA 2003-11-25 12:16:50 EST
Their code has changed.
In M5, try searching for refs to org.eclipse.ui.views.markers.MarkerViewUtil.
Comment 6 Kent Johnson CLA 2003-11-25 15:16:50 EST
Need PDE imported from binary to see it.

The original match was found to a method in a local type. We answered the local 
type instead of the top-level type for the match to the import statement, since 
there no JavaElements for import statements in .class files.
Comment 7 Frederic Fusier CLA 2003-12-17 11:14:42 EST
Verified for 3.0 M6 with build I200312162000