Package Explorer是否支持项目层级视图?仍是Java开发首选吗?
Hey there! Let's break down your two questions about Eclipse Oxygen's Package Explorer and how it stacks up against Project Explorer.
Does Package Explorer have a hierarchical project view like Project Explorer?
Absolutely! While Project Explorer shows the full project structure (including non-Java files, build configs, etc.) with hierarchical navigation out of the box, Package Explorer can mirror that exact feature for your Java packages. Here's how to turn it on:
- Click the tiny dropdown arrow in the Package Explorer view's title bar (top-right corner of the view)
- Hover over
Package Presentation - Switch from the default
Flatmode toHierarchical
Once enabled, your Java packages will display in a nested, tree-like structure just like you see in Project Explorer. Package Explorer just hides this option by default to keep the interface minimal for basic Java work.
Is Package Explorer still the preferred tool for Java development?
It comes down to your workflow, but yes, many Java developers still stick with Package Explorer for daily work. Here's why:
- It's lightweight and focused: Unlike Project Explorer, which shows every single file and folder in your project, Package Explorer prioritizes Java packages, classes, and code-related resources. This keeps the view clean and cuts down on clutter when you're deep in Java logic.
- Familiarity: Longtime Eclipse users have built habits around Package Explorer, so it feels intuitive and efficient for their routine tasks.
That said, Project Explorer has its strengths too—especially for multi-module projects (like Maven/Gradle), web apps, or projects loaded with non-Java configuration files. It gives you a complete, unfiltered overview of your entire project structure, which can be handy for cross-file management.
At the end of the day, it's all about preference. If you like Package Explorer's focused vibe and just need that hierarchical package display, the setting I mentioned above will make it work exactly how you want.
内容的提问来源于stack exchange,提问作者JF Meier

