It seems to me these two views are virtually identical, especially since Galileo. Is this true, or am I missing out on some features of one or the other?
An Eclipse project has nothing to do with Java. It is a feature of Eclipse to organize and configure your different projects. A Java package is a language feature of Java. You can use them to structure your project and control visibility between different classes.
The Package Explorer view, shown by default in the Java perspective, shows the Java element hierarchy of the Java projects in your workbench. It provides you with a Java-specific view of the resources shown in the Navigator. The element hierarchy is derived from the project's build paths.
In Eclipse, if the Project Explorer pane is not already open, click the Show View icon in the lower left corner of Eclipse, then click Project Explorer.
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.
According to the Eclipse help, the Project Explorer
provides a hierarchical view of the artifacts in the Workbench, which is customized by the specific configuration of your Workbench.
With only the Java Developer Tools (JDT) installed, Project Explorer nearly looks and behaves same for Java Projects as the Package Explorer (including refactoring and other source code operations in the Context Menu). But Project Explorer is usable for other languages and project types as well.
Additional plugins contributes "extra information" to the Project Explorer view making it much more "sophisticated".
For example: if you have Dynamic Web Project and web tools installed, Project Explorer shows you additional tree nodes like Deployment Descriptor & JavaScript Resources. You can see (and configure) all available contributions in Project Explorer / Customize View... / Content. If you use SpringSource Tool Suite 2.1.0, have additional nodes for web projects, spring beans and web services.
I believe the Project Explorer is meant as the successor for the Navigator, and is (for the most part) language-agnostic.
The Package Explorer is specifically for Java projects, that's why it has stuff like refactoring in its context menus. The Package Explorer also shows Java classes and packages (as the name implies), while the Project Explorer shows folders and .java files.
Some differences I see (in Juno) on a Java project:
That's why I keep the two tabs side-by-side. :-)
My Project Explorer hides folders that belong to a source code management system while the Package Explorer shows e.g. the .git
folder. Also, the Package Explorer offers more options that work with the source code, e.g. the refactoring stuff.
One thing I just noticed is that, at least when developing Java Android apps, Projects will not show up in the Package Explorer if their project.properties file is borked or non-existent.
I had only been using the Package Explorer and had the Project Explorer hidden, and I was pulling my hair out trying to figure out why my imported project wouldn't show up. My console was saying the project had no .properties file but it was not visible for me to right click -> fix properties
. Then I opened the Project explorer and it was there as it should be.
One reason for preferring the Package Explorer is it is the only explorer that appears in the list when you select "Show In" on a file that is being edited or has been found in the Search view.
CommonNavigator
that is provided by the org.eclipse.ui.navigator.resources
plugin. It provides a view of the workspace and has a large number of NCEs(Navigator Content Extensions ) contributed for resources, Java, C, Web Tools, Data Tools, PHP, etc. Source If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With