Bug 100714 - Open type should sort matches from source before matches from binary.
Summary: Open type should sort matches from source before matches from binary.
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 472701
  Show dependency tree
 
Reported: 2005-06-18 22:22 EDT by Gui Forget CLA
Modified: 2015-07-15 07:22 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gui Forget CLA 2005-06-18 22:22:12 EDT
When searching a class in the "Open Type" dialog, when there are multiple
matching types for the same name, they are ordered alphabetically based on their
path whereas I would expect to have the ones for which I have the source in the
project to be returned first.

I set up my project as follow:
project name: EclipseProject
the source of my class my.package.MyClass, is part of a linked resource named
source.
And I also have a binary version of my class under
d:\EclipseWorkspace\EclipseProject\classes\myzipfile.zip

When searching for the type MyClass the matching types are ordered as follow:
MyClass - my.package - D:\EclipseWorkspace\EclipseProject\classes\myzipfile.zip
MyClass - my.package - EclipseProject/source

If I rename my project to AProject then the result is much better:
MyClass - my.package - AProject/source
MyClass - my.package - D:\EclipseWorkspace\AProject\classes\myzipfile.zip
Comment 1 Gui Forget CLA 2005-06-18 22:26:02 EDT
Note that this was not the case in Eclipse 3.0 and that this is affecting any UI
that helps the navigation within the project: when my project name is
EclipseProject, selecting a type in the Hierarchy window always open the type
from the zip file and thus it does not contain the source.
Comment 2 Dani Megert CLA 2005-06-19 05:07:56 EDT
Tested under R3.0: the binary types come after the source ones and the source
type path is sorted alphabetically i.e. the types are not sorted by the position
in the build path.
Comment 3 Dirk Baeumer CLA 2005-06-19 17:56:36 EDT
Eclipse never had code to sort types from source before types from binaries. If
this happened in 3.0 this was pure coincidence.

Sorting types by the position of the build path can't be done either since open
type considers the whole workspace instead of single projects.

What changed in 3.0.2 regarding sorting is the fact that lower case characters
aren't sorted after upper case anymore. This caused lots of confusion. May be
this "resulted" in the affect you saw.

Gui, to eliminated duplicate types the new open type dialog now supports working
sets (available via the dialogs view menu). You can define a working set that
doesn't contain the zip file. Hence the types will never show up in the dialog.

However, your current setup looks strange to me. Having types two times on the
build path is asking for trouble when debugging, while searching and in
refactoring. Why do you have this setup ?
Comment 4 Dirk Baeumer CLA 2005-06-22 04:23:42 EDT
Post 3.1.
Comment 5 Eclipse Webmaster CLA 2009-08-30 02:36:05 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.