Conversation
Sorting by Display Name was a UI BugFirst and foremost let me state that the sorting by display name never really worked at scale. It might have worked for few opened projects at the beginning. While user sees them all (at least in collapsed state) then the ordering doesn't really matter. However sorting projects of bigger sizes like Glassfish, Helidon or Maven always felt random to me. This randomness was even multiplied by the fact that display name was used for sorting, not a real folder name on disk. As such the order of projects in Sorting by display name might have worked well for demos in 2004 when two or three independent Ant projects were open, but it never helped anyone working on large, nested project structures of real Maven or Gradle projects that have become standard later. With such amount of projects the sorting felt like chaos. Haven't you felt the same when using the NetBeans IDE with such large projects? |
Sorting by Display Name as an APIIs the change of the sorting order of There might be someone building an application on top of NetBeans Platform using the I don't think such a scenario is likely, but if we wanted to support the old sorting in NetBeans Platform based applications, then a "branding API" (e.g. a key in |
Sorting by Name for Advanced UsersJust like in the "Sorting by Display Name as an API" case, it is possible that some of advanced NetBeans IDE users, might structure their projects and give them alphabetically sorted display names. Something like I find such scenario unlikely (I would never rename a project to sort well in my IDE myself), but if it was to be supported and there should be a way to turn such a display name sorting order on again, then these users would probably be fine with a |
| "LBL_NoneMainProject_Name=&None" | ||
| }) | ||
| private void createSubMenu(Project[] projects) { | ||
| Arrays.sort(projects, OpenProjectList.projectByDisplayName()); |
There was a problem hiding this comment.
- while implementing b1f3e7d
- I realized there are three places when ordering of projects is used
- my expectation is: at all places the sorting order should be the same
- e.g. whatever configuration option is offered, applies to all those places at once
There was a problem hiding this comment.
Please, let me show an annecdoctical evidence of the randomness of the sorting by display name. Sometimes I am mixing projects from multiple repositories. Today I had projects from NetBeans own code base, as well as projects from GraalVM repository open. This is how it looks like in NetBeans 31:
It is easy to recognize what projects are coming from which repository as they have different icons. But the order! Because the projects are sorted by display name, those two independent sets of projects are intermixed with each other. The ordering is random, basically.
Today I decided to switch to the latest development version and voilá:
The ordering by path makes sense! First of all there is a group of projects from the GraalVM repository, then there is the group of projects from the NetBeans repository. There is no nesting in the hierarchy of those groups (that'd be subject of #9624 for example), but even the grouping by path is a tremendous step forward.
PS: I've been so shocked realizing how better the ordering is! I've just had to install the (already deleted) old NetBeans again to take the picture. As it speaks for thousand of words.
There was a problem hiding this comment.
Please, let me show an annecdoctical evidence of the randomness of the sorting by display name
I believe seeing somewhere lazy/non-blocking init mechanisms where display names were used only when available. If its there it is used, if not it falls back to something else. I an imagine - if used for sorting - it can be placed at the wrong spot initially - until the full list is refreshed.
the group-by-project dropdown of the file list behaves similarly. If it can't list all projects fast enough it will display a simple list on very first open. Once the cached, it will properly group. NB has a lot of caching behind the scenes.
The ordering by path makes sense!
yes I agree. I thought about this and tested that already back when I looked at #9602 (comment)
Since it sorts by String path, it should produce pretty good results. (Path.compareTo() would have been slightly more dangerous - I remember the showstopper #6361 which was hard to debug since the cause was completely removed from the symptom (that one was about weird File instances - Path may be backed by different file systems))
|
My 2 cents: somtimes I like to sort by project type so that I can see if I have a lot of open projects, what is PHP, Java, HTML etc. |
Uh oh!
There was an error while loading. Please reload this page.