Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sorting by type in Project Explorer in Eclipse?

Tags:

eclipse

I recently upgraded to Helio SR2 and the sort order for the package explorer is now sorting by name no matter the type. Is there any way to specify the sort order?

Example

  • JAX-WS Web Service
  • Deployment Descriptor
  • Java Resources
  • pom.xml (File)
  • src (Folder)
    • main (Folder)
    • java (Folder)
    • webapp (Folder)
      • a.jsp (File)
      • b (Folder)
      • c.jsp (File)
      • WEB-INF (Folder)
      • z.jsp (File)

In the example above, the files and folders are not sorted by type and then sorted by name (like in Windows Explorer).

Expected

  • JAX-WS Web Service
  • Deployment Descriptor
  • Java Resources
  • src (Folder)
    • main (Folder)
    • java (Folder)
    • webapp (Folder)
      • b (Folder)
      • WEB-INF (Folder)
      • a.jsp (File)
      • c.jsp (File)
      • z.jsp (File)
  • pom.xml (File)

Previous versions were sorting it this way - I'm just not sure how to set it back.

like image 384
Jared Pearson Avatar asked Mar 18 '11 13:03

Jared Pearson


People also ask

How do I sort package explorer in eclipse?

Package Explorer > View menu (the triangle) > Configure Working Sets... There you can configure the ordering or choose auto-sorting.

How do I sort a project in Eclipse?

There is a Sort menu when you click on the arrow on the top left of the view, you can select sort by name or sort by type.

How do I search project explorer in eclipse?

To view the project explorer, click on Window menu then, click on Show View and select Project Explorer. There is simpler way to open project explorer, when you are in the editor press alt + shift + w and select project explorer.


2 Answers

Double check you are not using "Project Explorer", it sorts alphabetically. BUT,

  • "Package Explorer" sorts files the way you want.
  • "Navigator" also sorts the way your asking and will show hidden files in OSX and Win folders.

You can access these views via Window->Show View->Other

like image 71
Cliff Ribaudo Avatar answered Sep 22 '22 12:09

Cliff Ribaudo


I did it in some other way as the given solution does not worked for me. I went to the customize view option as shown in

Customize View

and then wen to Content tab as shown in

enter image description here

and then unchecked the "Resources" check box.

like image 42
Ravindra Gullapalli Avatar answered Sep 20 '22 12:09

Ravindra Gullapalli