Export Eclipse Working Sets

07 December 2007 ~ blog java

I came across a question related to this on EclipseZone where I posted a
response (and a follow-up). It seemed like
something that I should blog about for future reference.

Export Working Set Definition

If you just want to share your working set definition with other members on your team, it's very easy.

  1. Via the menu bar: File > "Export..."
  2. Select "General" / "Working Sets"
  3. Click "Next >"
  4. Select the working set(s) you want to export and where you want to export the file.
  5. Click "Finish" to perform the export.

You will have a file containing the project-based definition of your working set. This can be imported by your team so
that they can have the same working set, as long as they have the files that it represents with the same paths.
Generally, this is probably a safe assumption for people on the same team using the same IDE.

Export Working Set Files

If you want to export the actual files contained in your working set, the steps are a little different, but they make
sense once you think about it.

Note: I generally have the "Top Level Emements" of my views set to "Working Sets", so this is based on that
assumption. It is easy to toggle (View arrow menu).

  1. Right-click on the working set you want to export
  2. Select "Export..."
  3. Select "File System" (jar and archive will probably work with this too)
  4. You will then have the File system export dialog with your working set pre-populated.
  5. Select the directory you want to export to
  6. You can either export only the directories explicitly defined in your working set using "Create only selected directories" or you can create any missing parent directories using "Create directory structure for files".
  7. Click Finish and you have your exported files.

This method does not export the working set definition, just the files themselves. Using both methods you could export
the working set and the files so that your team can have everything they need. These techniques are useful when sharing
files or when you want to extract a component and create a new project from it.


Creative Commons License CoffeaElectronica.com content is copyright © 2016 Christopher J. Stehno and available under a Creative Commons Attribution-ShareAlike 4.0 International License.