UI Tools in Indigo Release Train: WindowBuilder
Part five of Ekkehard Gentz’s Indigo Highlights series focues on UI tooling.
This 5th part of my Indigo Highlights series focuses on UI Tooling. It doesn’t matter if you’re developing Eclipse SWT, Swing, GWT or RCP/RAP applications – you’re always looking for a UI Designer Tool. So, what’s new in the Indigo Release (Eclipse 3.7) ?
WindowBuilder – an old friend
I don’t know how many years have gone by since the first time I searched for an UI Designer tool to design SWT applications. Also, I don’t know how many years ago Eric Clayberg of Instantiations becomes a friend of mine. Instantiations has developed the SWTDesigner as part of a product family:
- SWTDesigner to design UI of SWT / RCP applications
- SwingDesigner to design UI of Swing applications
- GWTDesigner to design UI of GWT applications
… all packaged as WindowBuilder. SWTDesigner always was one of the less non-Open-Source products I used in my daily work.
In August 2010, Google took over WindowBuilder together with the crew of developers and founders of Instantiations. Some months later there was a split: Google integrated GWTDesigner into their GWT Tooling and donated the rest as the new WindowBuilder project to the Eclipse Foundation. WindowBuilder is now one of the new projects being a part of the Release Train for the first time – I never imagined that one day SWTDesigner would become part of Eclipse’s open source projects. Not every takeover will have such a happy ending!
Where do I find the WindowBuilder ?
Working with WindowBuilder is easy and intuitive, but perhaps it’s not so easy to find and to install into Indigo – so I’ll explain this in detail.
First, what comes to mind when you have to install something, is the new and comfortable Eclipse Marketplace. If you have installed one of the Eclipse EPP Packages, you’ll usually find the Marketplace as part of the help menu. But….. if you’re using Eclipse SDK (Classic Package) there’s no Market Place pre-installed. To be able to install the Marketplace into Eclipse Classic Package you have to add the Update Site of Eclipse Marketplace Client (MPC):
Then you’ll find the Marketplace as expected, as part of the help menu. Searching for “WindowBuilder” immediately shows two products: WindowBuilder and GWT Designer.
We’re only interested in WindowBuilder – unfortunately the new Drag’n’Drop installation doesn’t work, so we click “learn more” and get some details:
Attention: the green arrow promises to point to the updatesite, but it’s an old one (as of today). Please DON’T use this update site – the new sites can be found here.
Using the Indigo (3.7) updatesite you’ll get all available features – choose what you need – in this example I only wanted to install SWTDesigner.
After restarting Eclipse you should really look at the details from preferences, where you can configure how the generated code should look. There are so many properties – I’m sure you’ll be able to find one suited to your own individual style.
WindowBuilder works bi-directionally: You can change the design using Drag’n’Drop or type into the source code – the other part will be dynamically changed. The easiest way to try it out is to create a SWT/JFace Java project and then inside this project a RCP ViewPart. WindowBuilder provides many powerful wizards.
Opening the ViewPart inside the Designer Editor, you’ll find all the UI elements inside a palette, from there you can drag them into the design area. Properties of all elements can be edited in detail.
There’s also a tree view to display the structure of your components.
If you would like to see the results of your design ‘live’ – it’s only one mouse click away.
Also switching between source, design and databinding is easy.
Without entering one line of code WindowBuilder has generated:
You’re developing RAP applications ? No problem: WindowBuilder also allows you to design RAP applications.
If you don’t know WindowBuilder yet, you should try it out soon – WindowBuilder is flexible and complex, but easy to use.
The next part will be focussed on the large X – I mean Xtext 2, Xbase, Xtend2. Using these frameworks, generating code becomes easy. Since the old days of openArchitectureWare so many new cool things were developed. It makes sense to take a deeper look at this. Stay tuned!