Search code examples
javaeclipseautomationworking-set

Automatically load dependencies into an Eclipse working set


I have 5 packages in my workspace. One is the "core" package that holds the critical java files for my application, and the name of this package also happens to be the name that I want the working set that contains it to be. The other packages in the workspace (4 of them) are on the build path and provide convenience methods and the like. I want to create a working set based on this core package and have all the other packages on its build path automatically enter its working set.

How do I achieve this without manually setting these extraneous packages to the working set, and then manually updating the working set when the dependencies change?

In my real life setting I have numerous working sets I need to manage so this quite quickly becomes overly tedious.


Solution

  • I don't think you can unless you provide an external script. Eclipse help file states

    Newly created resources are not automatically included in the active working set. They are implicitly included in a working set if they are children of an existing working set element. If you want to include other resources after you have created them you have to explicitly add them to the working set.