Bug 472701

Summary: [open type] Sorting
Product: [Eclipse Project] JDT Reporter: Marvin Fröhlich <eclipse>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P5 CC: daniel_megert, Dirk.Steinkamp, gautier.desaintmartinlacaze, knut.wannheden, misc, siegmaralber, thomas.cataldo
Version: 4.5Keywords: bugday, helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 28899, 100714    
Bug Blocks:    

Description Marvin Fröhlich CLA 2015-07-15 05:18:38 EDT
The "Open Type" dialog (CTRL+T) isn't too smart and could do better.

It could prefer classes from the "current" project (based on focus) or event classes from recently used projects.
It should sort classes coming from jars to the bottom.
It should sort classes coming from JDK event more to the bottom.
Classes from my workspace are always more likely, what I want.
Comment 1 Dani Megert CLA 2015-07-15 07:22:59 EDT
Given that one can quickly filter makes the alphabetical sorting the best choice. Also note that we do sort source types before binary types if the names match.

We won't work on this but if someone contributes a new sort option then we'll consider it.
Comment 2 Dani Megert CLA 2018-05-20 10:09:54 EDT
*** Bug 534901 has been marked as a duplicate of this bug. ***
Comment 3 Knut Wannheden CLA 2019-09-12 03:41:54 EDT
Please note that the dialog already shows previously opened types at the top of the list, so the list is already now not strictly alphabetically sorted. I *think* that this is what the --- Workspace matches --- divider is there for, although I am unsure as I often see unexpected results above it.

IMHO it would be nice if there were a way to also have a divider which separates "true" workspace matches from other matches (from classpath containers, etc.).
Comment 4 Nathan Sweet CLA 2022-02-26 17:03:09 EST
I respectfully but strongly disagree that alphabetical is best because of filtering. I always want to see classes in my projects before any others. It is extremely rare to open anything else.

Remembering previous results is good, but does not solve the usability issue. In fact, when I mistakenly choose the wrong class I then have to do more work to remove it from the list, else I will have to look at and avoid the wrong class every time I want my class.

These things are minor but important because "open type" is used many hundreds of times per day.