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?
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
.
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
Click on three dots on project explorer toolbar -> Package representation -> select
Hierarchical
[Eclipse Image][1] [1]: https://i.stack.imgur.com/qTGqm.png
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.