Bug 488824 - [package explorer] Make it possible to sort by file name in Java packages using Project/Package Explorer
Summary: [package explorer] Make it possible to sort by file name in Java packages usi...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5.2   Edit
Hardware: PC All
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-02 03:49 EST by Stefan Snooc CLA
Modified: 2016-03-03 19:32 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Snooc CLA 2016-03-02 03:49:58 EST
I am using GWT where you have for views a .java file and a .ui.xml file. The problem is that Eclipse is sorting them like this:

AModule.java
APresenter.java
BModule.java
BPresenter.java
AView.ui.yml
BView.ui.xml

This is annoying as the project gets larger. It would be awesome if the files were sorted like this:

AModule.java
APresenter.java
AView.ui.yml
BModule.java
BPresenter.java
BView.ui.xml

I've asked if that is possible on stackoverflow but the only possibility so far is opening the Navigator for this but is it possible to add this feature to the Package / Project Explorer?

See my question on stackoverflow: http://stackoverflow.com/questions/35669324/eclipse-gwt-associate-ui-xml-with-corresponding-java-file/35739779#35739779
Comment 1 Brian de Alwis CLA 2016-03-02 20:58:03 EST
That seems to be the JavaElementComparator, which sorts elements by category and then alphabetically.
Comment 2 Dani Megert CLA 2016-03-03 03:53:37 EST
The Navigator view offers this.
Comment 3 Stefan Snooc CLA 2016-03-03 19:30:50 EST
(In reply to Dani Megert from comment #2)
> The Navigator view offers this.

Yes but the navigator cannot display projects hierarchically and also does not use the "Java Package" icon for the packages but instead just the "Folder" icon.
Comment 4 Stefan Snooc CLA 2016-03-03 19:32:37 EST
(In reply to Brian de Alwis from comment #1)
> That seems to be the JavaElementComparator, which sorts elements by category
> and then alphabetically.

Well, I am not familiar with the internals of Eclipse. ^^

All I can say is that this would make my life a little easier and that I am longing for this feature for quite a while. :)