DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Coding
  3. Frameworks
  4. Eclipse Working Sets Explained

Eclipse Working Sets Explained

Erich Styger user avatar by
Erich Styger
·
May. 31, 12 · Interview
Like (0)
Save
Tweet
Share
61.74K Views

Join the DZone community and get the full member experience.

Join For Free

eclipse comes with a large set of different views: they allow the developer to represent the information in various forms and with different angles. most of these views are navigation oriented: a perfect example for this is the projects view or the outline view . but over time i add more projects, more resources to my project, and at a certain time things get overwhelming. i have a lot of projects, and i do not want to switch between workspace too often. yes, i can open and close projects, but this gets cumbersome too. thankfully, there is a solution in eclipse: working sets .

working sets allow me to group elements for display in views. with that, i can do operations on a set of elements in that working set. especially as i’m using many projects the same time, working sets are a big help to focus on the right set of things at a time. i can define a set of things i want to look at, work with, or whatever: it allows me to get be productive in the universe of my environment.

building/compiling a working set

a nice feature of using working sets is to build a set of projects. instead of selecting a set of projects and then to compile them together, i use a working set.

i use the menu project > build working set > select working set… to create or change working sets:

menu to select working set

menu to select working set

if i have no working set defined, then this will show the following dialog where i can press new… to create a new one:

creating new working set

creating new working set

to create a working set of c/c++ projects, i select c/c++ and press next :

new c c++ working set

new c c++ working set

next i give a name and select the project(s) which shall be in my working set, and press finish :

defining working set

defining working set

to build my set of projects, i can select the working set and press ok :

selected working set

selected working set

search in a working set

it is possible to limit the search to a working set. for this i can choose a working set as scope in the search dialogs:

search in a working set

search in a working set

managing working sets

to manage working sets, i press ctrl+3 (see quick access ) and choose manage working sets… :

ctrl+3 with manage working sets...

ctrl+3 with manage working sets…

note: i can add extra tool-bars and menus for working sets too (this is explained later).

then i can manage my working sets:

manage working set configuration

manage working set configuration

project view filtering with working sets

i can filter the projects shown in the project view based on working sets. for this i select the small triangle and select/define a working set or choose one from the most recently used sets:

working sets for project view

working sets for project view

with this i can easily filter and focus on a subset of projects:

project view with applied working set

project view with applied working set

really cool :-)

tip: i’m using working sets as well to avoid too many workspaces. instead of having projects spread over different workspaces, i can keep them in one workspace and use working sets instead. there is an added benefit of using working sets: having too many projects open at the same time in eclipse can slow down the ide: using working sets allows me just to switch quickly between the set of projects i’m working on.

but it does not stop at filtering by projects: you can filter even things inside the project structure. i simply deselect things i don’t want to see and can focus on what is important for me:

filtering project files

filtering project files

export and import of working sets

note: import and export of working sets is not part of the standard codewarrior eclipse distribution. you get the import/export feature installed with the mqx plugins (www.freescale.com/mqx) or with the anyedit plugins (http://andrei.gmxhome.de/anyedit/index.html).

to export a working set, i use the menu file > export > other > export working set :

export working set

export working sets with mqx plugins

note: the anyedit plugins come as well with an import/expert working set wizard. the file format is different, and the mqx plugin allows drag&drop of the file into eclipse.

this gives the following dialog where i can specify the file name and the root of projects:

export working set dialog

export working set dialog

this will store the settings in an xml file.

importing the working set is done with file > import > other > import working set .

tip: i’m using *.wsd extension for working sets. that way i can simply drag&drop the file into eclipse to import it.

other kinds of working sets

working sets do not stop at projects and files:

select working set type

select working set type

i can create working sets of breakpoints or analysis/trace points. or i can create working sets of any resource files or tasks. the possibilities are nearly endless and depend as well on the extra plugins installed.

window working sets

and now back to the really cool part. one question remains: what are window working sets?

window working sets

window working sets

the thing is that every view and dialog has its own working set setting. in my example below i use a working set ‘coldfire’ for the projects view, but my search dialog has a ‘kinetis’ working set configured:

two different working sets

two different working sets

sometimes i want this, but not always. what i need is a ‘global’ working set. and here the window working sets comes to rescue me. for this i’m going to add some menus and toolbars to make it really easy…

for this i choose the menu window > customize perspecti ve. in the command groups i enable ‘window working set’. additionally it is a good idea to enable ‘working set manipulation’ as well:

window working set commands

window working set commands

the same way i can enable the toolbar and menu visibility. this gives me added tool-bars to switch between working sets and to add/remove things from a working set quickly:

working set toolbars

working set toolbars

in a similar way, it gives me menu access as well:

working sets menu

working sets menu

and here is the trick: using ‘ window working set ‘ really means ‘ using the global workbench working set ‘. to select the global workbench working set, i use the toolbar icon to switch between window (or workbench) working sets:

selecting global window or workbench working set

selecting global window or workbench working set

in the individual views i choose to use the window working sets instead a selection of working sets:

selected global window or workbench working set

selected global window or workbench working set

now my working set settings are shared and common for all views: if i switch the working set, it will switch for all views where i have set it to ‘window working set’:

window working set applied to multiple views

window working set applied to multiple views

that way my working set is the same across views, and switching between different project settings is done with a simple mouse click.

summary

working sets are an extremely powerful feature to get focus on a subset of things inside eclipse, based on my workflow. as with many great eclipse features, i need to know about it until you really appreciate the power of it. who knows how many other hidden treasures are buried in eclipse ;-)

i hope this article helps to save you a few mouse clicks.

happy work-setting :-) but over time i add more projects, more resources to my project, and at a certain time things get overwhelming. i have a lot of projects, and i do not want to switch between workspace too often.

Eclipse

Published at DZone with permission of Erich Styger, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Spring Boot, Quarkus, or Micronaut?
  • Front-End Troubleshooting Using OpenTelemetry
  • 5 Software Developer Competencies: How To Recognize a Good Programmer
  • Key Elements of Site Reliability Engineering (SRE)

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: