Bug 14106 - Declarations in Hierarchy does not find declarations in hierarchy
Summary: Declarations in Hierarchy does not find declarations in hierarchy
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: Other other
: P3 normal (vote)
Target Milestone: 2.0 M6   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-18 09:55 EDT by Steve Northover CLA
Modified: 2002-04-19 11:43 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Northover CLA 2002-04-18 09:55:18 EDT
In Eclipse M5 Windows (but probably happens everywhere):

0) Get the source for SWT into Eclipse
1) In Hierarchy view select Control.isTabGroup()
2) Declarations->Hierarchy
3) You only get Control.isTabGroup() (WRONG)
4) Declarations->Workspace
5) You get Control.isTabGroup() and Decorations.isTabGroup() (CORRECT)

Decorations is a subclass of Control so I expected that it would be found.

So, I went to Decorations.isTabGroup() and tried the same thing and it found 
both.  If the definition of "Hiearchy" is to look up the hierarchy, then please 
remove this search feature as it is harmful.  I get the same "look up the 
hierarchy" feature by turning on "show inherited" feature.

This "bug/feature" has already caused me to introduce a bug in my code because 
I was looking for everyone that was affected by my change to a method in the 
super class and incorrectly thought nobody reimplemented the method.
Comment 1 Adam Kiezun CLA 2002-04-18 11:55:15 EDT
i do see Decorations.isTabGroup()
(i have swt in binary - would that make the difference?)
Comment 2 Erich Gamma CLA 2002-04-18 11:59:43 EDT
Search in hierarchy should both search in super and subclasses for 
declarations. The fact that it works for binaries indicates that the UI calls 
the search engine correctly.

Moving to JDT CORE.
Comment 3 Jerome Lanneluc CLA 2002-04-19 10:15:30 EDT
Problem happens only if an editor is opened on Decorations.
The hierarchy scope is not flexible enough and should accept results in the 
original compilation unit as well.
Comment 4 Jerome Lanneluc CLA 2002-04-19 10:46:08 EDT
Made the hierarchy scope more tolerant and accept types in working copies that 
are present in the original compilation units.
Comment 5 Steve Northover CLA 2002-04-19 10:54:00 EDT
Thanks Jerome.  Seems really wierd that have a UI open on a class somewhere 
should affect the search somehow.
Comment 6 Jerome Lanneluc CLA 2002-04-19 10:59:57 EDT
It is because the search engine now supports finding matches in editors (e.g. 
if you define a new method and have not saved it yet, it will find it).
Comment 7 Steve Northover CLA 2002-04-19 11:43:44 EDT
Amazing.  I would never have asked or expected anyone to implement this feature 
but that's just me.  Very strange, searching my unsaved work in progress.  
Whatever.  Thanks again for fixing the bug.