Have you tried working with the new cloud features of CICS TS 5.1? If you have, you'll be familiar with creating application projects, platform projects, and application binding projects to bind your application to your platform.
Sometimes, you might find that your CICS Explorer workspace gets a bit cluttered with all the different application, platform and application binding projects, not to mention CICS bundle projects, which form the real substance of your applications. This is especially the case when you've got more than one application on the go at the same time. In this post, we'll take a look at working sets - what they are, and how they can help to organise your workspace.
Working Sets - The Overview
Working sets are nothing new - they're existed as a core part of Eclipse (and therefore CICS Explorer) for many years. However, it's surprisingly easy to never discover that they exist.
Each working set forms a logical grouping of resources in your Eclipse workspace. This can go down to the granularity of individual files and folders, but we're just going to look at how working sets can be used to group your projects.
Once you've created working sets, you can then choose which working sets to display in your navigator - which might be the Package Explorer or Project Explorer, to narrow down your view. All of a sudden, everything's a lot simpler.
Imagine a scenario - I've got two platforms - one for test, and one for production. I've also got two applications - one called banking, and one called insurance. Each of my applications has its own data, logic, and web bundles, and they also share two other bundles for their logic and web resources. I've decided that I want both applications to be running on both platforms, so for each application I've created two application bindings. My CICS Explorer workspace now looks something like this:
It's already getting pretty complex, isn't it? For your benefit, I've tried to name all of the projects in a sensible way, but that's not always the way things happen. The workspace is starting to get a little bit heavy to wield.
Creating Your Working Sets
It's time to create our first working set. The great thing about working sets is that you can create as many as you like to take different 'slices' through your workspace, with each one viewing a different useful subset of your projects. For our first working set, I want to group together everything that's related to the 'banking' application.
Use the downward arrow at the top of your Project Explorer view (next to the Refresh button) to access that view's menu, and press 'Select Working Set...'. You'll be presented with the 'Select Working Set' dialog:
Press 'New...' to make one, and the 'New Working Set' dialog will appear. First give the working set a name (I've called it 'The Banking Application'). This name is used in the Eclipse workspace to present your working sets, and is not read by CICS - it's purely for your use. Go through all the projects, ticking all that apply to the 'banking' application.
When you're done, click 'Finish'. Your working set will now appear in the 'Select Working Set' dialog. While we're here, I'm going to make another 'New...' working set - this time, for things related to the 'insurance' application. I now have two working sets, and it's time to learn a bit more about the 'Select Working Set' dialog. If you select 'No Working Sets', your Project Explorer will show everything. If you select 'Selected Working Sets', only the ticked working sets will be shown. So for example, if I just tick 'The Banking Application', I get the following in my Project Explorer:
Whereas if I go back to that dialog and tick just 'The Insurance Application', I get this:
Using working sets has very quickly allowed me to just show certain projects that I'm interested in, hiding all others. If I ticked both of my working sets, I'd see the projects relating to either the insurance application or the banking application.
Another powerful part of working sets is that I can change the way that the navigator is shown. Use the downwards arrow at the top of the Project Explorer view again, and click Top Level Elements -> Working Sets. This will make any selected working sets the top-level elements in your Project Explorer, which you can then expand to see the contents. This provides better grouping in the Project Explorer, and means you can keep everything on-screen still without feeling cramped. Here, I've expanded the banking working set, but not the insurance working set:
Note that the shared bundles appear under both the banking application and the insurance application.
Extending Your Working Sets
Now that you've got some working sets, you can start to see the benefit of them. I've only just started to brush the surface, here - there are number of different slices you can take through your workspace to get different groups of projects that you might wish to see, such as separating by type. Here are some starters:
Working sets allow you to quickly simplify and navigate your Project Explorer, making your experience in CICS Explorer (or any other Eclipse product) easier. Use them whenever your workspace is starting to get overbearing.
What did you think of this blog post? Are there any aspects of Eclipse or CICS Explorer that you're puzzled by, and could do with a post? Add comments and let me know.