Reputation: 1395
In eclipse, I would like to see packages as a folder structure rather than the flattened look provided by the Package Explorer
default settings, is there a way to do this?
Upvotes: 13
Views: 41251
Reputation: 1
Click on three dots on project explorer toolbar -> Package representation -> select
Hierarchical
[Eclipse Image][1] [1]: https://i.sstatic.net/qTGqm.png
Upvotes: 0
Reputation: 20442
Eclipse offers the Navigator
view which will display your project in the way you are asking. To open this view select Window > Show View > Navigator
.
Upvotes: 25
Reputation: 16047
Select the first package in the package explorer. Press Alt-Shift-N to open the new item context menu. Click "Package."
Make sure that the new package name is a sub-package of the original package. For example, if your original package is com.example
, the new package might be com.example.gui
.
EDIT: If you want to see the nested packages, Eugene says that you can do this:
Package Explorer / View Menu (Ctrl-F10) / Package Presentation... / Hierarchical
Upvotes: 14