What is the difference between the Eclipse Package Explorer and the Eclipse 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 the Project Explorer nearly looks and behaves 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 the web tools installed and you have a Dynamic Web Project, the Project Explorer shows you additional tree nodes like Deployment Descriptor and JavaScript Resources. You can see (and configure) all available contributions in Project Explorer / Customize View... / Content.
For example using SpringSource Tool Suite 2.1.0 I have additional nodes for web projects, spring beans and web services. Because of this I favor using the Project Explorer.
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:
- In Project Explorer, context menu > New gives common Java artifacts, like Class, Interface, Enum, package... In Package Explorer, I see various kind of Projects, Web service, Folder, File, etc.
- In Package Explorer, I can drag'n'drop a class file between two packages, it will automatically do the refactoring (move and change package, and imports in other classes). Project Explorer just won't allow me to do a drag'n'drop.
- And as said, Project Explorer shows more information, eg. a Deployment Description, JavaScript resources, Deployed Resources, etc. whereas the Package Explorer is Java-centric.
That's why I keep the two tabs side-by-side. :-)