Tag: eclipse ide

I for one welcome our new e4 overlords

As an Eclipse user, I have to say that having all those views in various stacks can really start taking away from the amount of space dedicated to just editing a file. Even at full screen, there’s portions of the UI that I could do without. For example, the status bar that sits at the bottom of the workbench takes up quite a bit of space for something that is rarely used. It has a progress bar built in, but I can always just refer to the progress view. The only real loss would appear to be the status line indicator for various things such as file privileges, line number/offset. Even these things don’t deserve a horizontal bar all to themselves.  Luckily this is a blog post, so naturally there’s something in the form of a solution coming up.


Someone introduced me to the Eclipse 4 CSS Spy . There’s also a quick tutorial of it in action here . With this plugin, we can get a nice visualization of the e4 model hierarchy, along with an indication of where each model element is located in the workbench window (<ALT> + <SHIFT> + <F5> to activate ). I have to say, it’s rather shameful that I haven’t used this sooner, especially since it was probably mentioned at one of the DemoCamps I hosted in the past.


Just by clicking around the e4 model, we can easily see that we need to disable the MTrimbar with id ‘org-eclipse-ui-trim-status’ by setting its ‘visibility’ property to some attribute that would disable it. Looking around the Eclipse platform code base, under  eclipse.platform.ui/bundles, we find that the property we want is ‘hidden’. (See AbstractCSSPropertyClassificationHandler for the reference to ‘visibility’ and applyCSSPropertyVisibility in CSSPropertyClassificationSWTHandler for the implementation mentioning ‘hidden’)

With that discovered, we can finally write our selector. We just add the following to the theme file we’re using. Since I’m running Fedora Eclipse, this is in :


and we’ll add the following line :

#org-eclipse-ui-trim-status { visibility: hidden; }

If you use keyboard shortcuts for most things, you can probably get rid of the main toolbar as well.

#org-eclipse-ui-main-toolbar { visibility: hidden; }


Being able to customize the Eclipse workbench to this extent, so easily is really awesome.


Toronto Eclipse DemoCamp (November 2012)

This week, I hosted an Eclipse DemoCamp at the Red Hat office in Toronto. Details about it can be found at http://wiki.eclipse.org/Eclipse_DemoCamps_November_2012/Toronto.

It’s my second time hosting one of these events, and I would have to say it’s always a fun thing for me to organize. Getting to see people interested in the Eclipse IDE present/listen/comment on the state of things is always a positive experience, and as a committer it definitely offers some motivation. In addition it was a great opportunity to present about some new features for the release of the Linux Tools Project.

Elliot Baron also gave a presentation of some of his work to bring the Thermostat GUI client to the Eclipse IDE as a plugin.

Andrew Ross gave a talk on CBI and how it’s being used to build the Eclipse platform. If you’re interested in trying this out for yourself, there are some great instructions here. It can pretty much all be done with 3 commands!

Brian De Alwis presented on tiling editors using the e4 model. In addition he demonstrated how one can easily customize the look and feel of Eclipse applications with just a little CSS. I haven’t looked too much into e4, or how its model compares with the old 3.x approach, but I’m interested to see if it can be used to make life easier for UI testing. Maybe SWTBot can take advantage of some of these features?

Sami Wagialla gave a presentation on the Eclipse SystemTap plugin and how it makes life easier for writing scripts. My biggest issue with SystemTap scripting in the past was having to look up particular tapsets to figure out which variables were available in a probe’s context. The Eclipse plugin makes this information readily available through auto-completion.

The DemoCamp ended with a change of venue to the Fox & Firkin bar across the street for some refreshments.

Keeping it Classy

If you’re like me, and developing/maintaining Eclipse plugins, you’ve probably grown accustomed to looking up various classes that are a part of the Eclipse platform. Imagine my surprise when I started using a fresh version of Juno and saw this as I tried to open up the Type Hierarchy :

Ok, so maybe I haven’t got any projects in the workspace, but that shouldn’t mean I can’t at least browse around. If you create a plug-in project, you’ll still only get access to the Eclipse platform classes that are referenced by your project (and their dependencies it seems). I guess this explains why I never .. ever had to deal with this issue. I almost always have a bunch of plugin projects ready, and loaded before doing any kind of source browsing. As a result, the set of dependencies was large enough that it probably looked like I had the full platform’s sources available for viewing.

I guess that’s better than nothing, but what if you want to the comfort of knowing you’ve got the Eclipse platform’s classes at the ready for your viewing pleasure?

Not too long ago a colleague of mine had a similar problem, and shared the solution. They were having problems accessing a class that they knew was part of the Eclipse platform. From what I recall, it was referenced in another class that was viewable, but the source was not browsable. Either way, the solution was this :

So provided you have your target platform set, you’ll want to select the “Include all plugins from target in Java search” option. If your target platform isn’t set for some reason, just go to Windows -> Preferences -> Plug-in Development -> Target Platform, and add one based on the currently running platform, which should be the default option.

Once that’s done, you’ll have to apply the changes, and wait just a bit for the classes to be indexed. After that you’ll finally be able to browse all the platform sources regardless of the contents in your workspace.