Bug 534901 - Prefer project classes in "Open Type" dialog sort order
Summary: Prefer project classes in "Open Type" dialog sort order
Status: CLOSED DUPLICATE of bug 472701
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7.3   Edit
Hardware: PC Mac OS X
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-20 10:00 EDT by Siegmar Alber CLA
Modified: 2018-05-20 10:10 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 Siegmar Alber CLA 2018-05-20 10:00:06 EDT
(I don't know if Platform/IDE or JDT/UI or something else is the correct component, please move if necessary.)

Most of the time when I use "Open Type" I want to open a type in my current project. It would be great if those are listed before all other types (i.e. before other projects types and more importantly before types in dependencies and JDK).

Example:
Searching for "LU" is very specific in my project for "ListUtils" but this is only listed on position 31 currently, after lots of types from JDK (each of those 3 times, as I have different projects with JDK versions 8/9/10 open at the same time) and after types from other dependencies.

Related:
* bug 59479: Describes the same but closed as "LATER" (as of 2004) which was later merged into "WONTFIX".
* bug 329160: Allows *filtering* for types from different scopes, but this is about ordering the search results. But both features may be combined.
* bug 360468: This is specifically about sort order of camel case search results in the similar "Open Resource" dialog.
* https://www.eclipse.org/forums/index.php/t/165073/: Describes exactly this issue (from 2010).
* https://stackoverflow.com/q/9396420: Describes exactly this issue (from 2012).

Ideas for solutions:
* Basic: List types from open workspace projects first, all other types after.
* Advanced: Allow more fine grained control, possibly configurable:
  * Types from current project
  * Types from current window working set
  * Types from direct dependencies of current project (including JDK)
  * Types from transitive (Maven) dependencies of current project
  * Types from other open projects
  * Types from dependencies of other projects

I guess the basic solution would already help a lot and does not seem too difficult to implement.
The advanced solution may later be combined with the filtering of bug 329160 but is probably somewhat more complex.

I never developed for Eclipse, but if I get some pointers I could try to look into the basic solution…
Comment 1 Dani Megert CLA 2018-05-20 10:09:54 EDT

*** This bug has been marked as a duplicate of bug 472701 ***