I'll try answering from the perspective as a plugin developer. From the API:
A working set is intended to group elements for presentation to the user or for operations on a set of elements.
This can be any kind of element and does not have to be a project. Working sets are provided by plugins, which can decide what kind of elements can be added and which provide wizards for adding elements as well as operations that can be performed.
It doesn't really matter for a project in which working set(s) it is in. A Java project is still a Java project if it in a resource working set. It only affects some views, dialogs and operations that filter for certain types of working sets.
Besides Java and Resource working sets, there are also Breakpoint, Task, Plugin and C/C++ working sets (depending on your Eclipse setup of course). Some views only show certain types of working sets while other views don't seem to filter them. For example the "Open Type" and "Open Resource" dialogs seem to display all types of working sets. The "Open task" dialog only shows task working sets.
So what is the actual difference between Java and Resource working sets? I haven't seen any functional differences yet. All standard views and dialogs either seem to handle both or none of these two working set types. Most plugins don't seem to care about the distinction at all - but that doesn't mean some plugin could handle both types differently.
On the other hand resource working sets seem to be a catch-all for any type of project, so it makes sense that most plugins don't make a distinction here. For example if I were to create a plugin that provides an option to analyze Java projects, I would add that operation to the context menu of Java working sets but certainly not to C/C++ working sets. But some people might use resource working sets because they have both Java and C projects in the same working set. So I have to add the Java-specific operation to the context menu of resource working sets too.
One difference between the working sets is that they provide different editing wizards (as stated here: http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Fconcepts%2Fcworkset.htm). If you edit a resource working set and a java working set respectively you will see they use different screens for selecting which resources/projects are included.
Apart from this I haven't found any other difference. It also does not seem to differ which resources you can choose in any way. So to answer your question which one would be recommended I would answer "it doesn't matter" since they behave the same way.
A working set is a subset of your workspace and is a way to organise all your projects. With the different types of working sets you have also different types of editing wizards as described here.
For java projects the Java working set is a more comfortable way to work. Let's assume you have a bunch of java projects in a java working set and you have just opend the editing wizard of the Java Working set:
First of all you can see everything what is in the working set at the moment in the right table. If you now want to include another project you can simply select the project(s) and press CTRL+a. To remove a project you can press CTRL+r
In the Properties of a Resources Working set you don't know what is in the working set until you have scrolled to the bottom of the tree view. This is impossible for people who have 300+ projects in their workspace.
A benefit from having two types of working sets is structure. There are situations in a daily workflow where it is useful to have different types of working sets, because they have different icons. If you have resources like config files you can create a Resource working set namend 'config files' and put all the files in there.
Afterwards you can open your File Search and search in your config files. This is possible because you can define a working set as a scope for a search.
There are several parts in Eclipse where you can select your working set with the Select working set dialog.
A working set in the context of eclipse is a logical grouping of related projects to ease search and organize views within the IDE.
The Java working set is a different working set (it is NOT a subset of a resource working set!) which captures only those java files which belong to a source folder and are being compiled into the classpath, or those java files which belong to a module (library) in the build path. Hence, it lets you lookup java "classes" which are in the classpath. Note that all java file in your project may not necessarily be built into the classpath (for example when you exclude a java source file, it does not get built any more). But a java source file which is not included in your classpath can still be detected by a resource working set (you will notice that the icon for an included java source file is a solid J, while for an excluded java source, it is a hollow J).
Example: Say you have two projects p1 and p2 of which p1 belongs to the working set but p2 does not. So:
MyClass.java (belongs to p1 and included in build path) - Shows up in java type search (Ctrl + T) and also in resource search (Ctrl + R).
MyOtherClass.java (belongs to p2 and included in build path) - Does not show up in java type search nor in resource search.
MyExcludedClass.java (belongs to p1 and excluded from build path) - Does not show up in java type search but shows up in resource search.
MyExcludedClass.class (belongs to a dependency jar in the build path of p1) - Shows up in java type search but does not show up in resource search.
MyWebPage.html (belongs to p1) - Does not show up in java working set but in resource working set.
MyOtherWebPage.html (belongs to p2) - Does not show up in java type search nor in resource search.
MyConfig.xml (belongs to p1) - Does not show up in java type search but shows up in resource search.
So, in the context of a Java developer's use: I use Java working sets to look up types / classes defined in Java, whereas the resources working set to lookup all different types.
It sounds like this should have answered the question:
A Working Set is a subset of your Eclipse projects. You can create different Working Sets and then select which Working Set to display in the Navigator view.
"Working set" (in this particular context), is an "Eclipse thing"
The purpose of Eclipse working sets is to help organize your projects
A project consists of "stuff": source code, bitmap graphics files, WSDL's, CSS style sheets - just about anything imagineable.
Consequently, Eclipse projects are organized (glancing at my J2EE perspective, for example) into subsections like "src", "WebContent", "Services" and so on. A project itself can be one of many different types: a "Java project", a "Java Swing Design project", and "Dynamic Web Project" and so on.
Similarly, an Eclipse Working set can be one of several different types: a "Java working set", a "Breakpoint working set ... and a "Resource working set".
As with Eclipse "Views" and Perspectives", you can usually access any project resource you need any time you need it. Selecting one or another perspective simply makes the object (e.g. "Problems pane" or "Build list") easier to get to.
Which kind of "Working Set" you choose - or whether or not you use working sets at all - is largely just a matter of personal preference and convenience.
Please let us know if you still have any further questions.
PS: Additional links:
As mentioned, many developers load all their projects into a single Eclipse workspace. It's convenient, but it can sometimes create too much clutter. In addition to closing unnecessary projects, you can define working sets: groups of elements (projects, folders, classes, etc.). Eclipse can use working sets in different views (such as Package Explorer) and operations (like searching).
- Difference between Java working set and Resource working set in Eclipse
- What is the difference between Eclipse for Java (EE) Developers and Eclipse Classic?
- difference between clean and clean working directory in Eclipse WTP with Tomcat
- What is the difference between Eclipse and Netbeans if I want to use only the Java in it?
- Difference between Eclipse IDE for Java EE Developers and Eclipse Juno
- Eclipse Java EE: Difference between R and M1 packages
- What is the difference between Eclipse IDE for Java EE Developer and Eclipse for Mobile Developer?
- What's the difference between Eclipse Classic and Eclipse for Java Developers?
- Difference between Indigo and Europa versions of Eclipse for Java EE
- Eclipse Team Synchronization - Difference between Workspace and Java Workspace (SVN)
- What is the difference between Eclipse for Java and RCP?
- difference between `run as java application` in eclipse and `java -jar yyy.jar` from cmd line?
- What is the difference between javac and the Eclipse compiler?
- What is the difference between the Eclipse Package Explorer and the Eclipse Project Explorer?
- Java Eclipse: Difference between exporting as a JAR and exporting as a Runnable JAR
- Difference between Ctrl+Shift+F and Ctrl+I in Eclipse
- What is the difference between Eclipse 3.7 and Eclipse 4.1?
- What is the difference between rollback, backout and strip in the Mercurial Eclipse plugin?
- What is the difference between Eclipse with Spring IDE plugin and Spring Tool Suite alone?
- What's the difference between "Push..." and "Push to upstream..." in Eclipse
- How to delete a java working set in Eclipse
- Difference between static and dynamic web project in eclipse
- What the difference between Eclipse 3.7, 3.8 and 4.2?
- Eclipse Compare Editor: difference between the 'next difference' and 'next change' buttons?
- Difference between 32 and 64 bit Eclipse
- Difference between Eclipse Build Project and Maven Compile command
- What is the difference between Eclipse "Import" and "Create project from existing source" for Android projects?
- Difference between green and blue comments in eclipse
- Eclipse - how to simultaneously switch working set for project explorer, call hierarchy, and search?
More Query from same tag
- Eclipse: starting custom eclipse app under linux returns to the command line prompt instantly
- how can I have eclipse auto insert subversion revision number into my code
- VM error while Build Cordova PhoneGap
- How can I download the Eclipse CVS plugin for the Eclipse 20221-09 separate from Eclipse?
- ArrayList is not behaving as expected in for loop
- ClassNotFoundException: HttpServletRequest with Struts2 in Eclipse
- How do I exclude devices with no rear facing camera?
- error in aspectj Project as change the Compilation Level
- Gradle dependency declared (JSR310), but LocalDateTimeDeserializer not importable
- Git push project with referenced libraries
- Java debug mode: how to get return value of function call
- Locate text in webpage and click - Eclipse Selenium
- Spring Autowiring issue - "required a bean that could not be found"
- Moving static code analysis from a separate process to an Eclipse plug-in
- Eclipse - Error: Could not find or load main class
- Eclipse Map and Reduce Plugin & Hadoop Tutorial
- Catch any Eclipse IDE event
- Android SDK - warnings in Hello World
- Where is the Eclipse Plugin update error log?
- Performance issues when initializing each class member?
- How to add SQLite C++ library to Eclipse (C++ version)
- How to reenable compiler warnings in Eclipse?
- Button shape with Image in Eclipse
- Importing Worklight Modules
- Java: Calling values from another class
- Is there a way to reset the perspective in Eclipse and avoid the dialog that confirms it?
- Eclipse Java 6 with Mysql 8
- Configuring and Using NDK in eclipse on mac os Lion
- Directing robot framework results using Eclipse