Category Archives : Eclipse

Home  >>  Eclipse

How to manage Git Submodules with JGit

On April 16, 2014, Posted by , In Eclipse, By ,, , With 2 Comments

For a larger project with Git, you may find yourself wanting to share code among multiple repositories. Whether it is a shared library between projects or perhaps templates and such used among multiple different products. The Git built-in answer to this problem is submodules. They allow putting a clone of…

Efficient Code Coverage with Eclipse

On April 7, 2014, Posted by , In Eclipse, By ,,,, , With 1 Comment

There is a saying that a fool with a tool is still a fool. But how to use a tool most efficiently is not always obvious to me. Because of this I typically spend some time to check out new playgrounds1 that promise to increase my work speed without impairing…

Slim Down SWT FormLayout Usage

On March 31, 2014, Posted by , In Eclipse, By ,,,, , With 2 Comments

Always on the quest for efficiency I reconsidered the usability of SWT FormLayout lately. Although it is one of my favored core layouts with respect to flexibility, I had to recognize that it is only reluctantly used by most of my fellow workers. Proposing it for an appropriate task sometimes…

Clean SWT Listener Notifcations with SWTEventHelper

On March 10, 2014, Posted by , In Eclipse, By ,,,,,, , With 2 Comments

Writing tests for SWT based UIs often requires to notify widget listeners programmatically. Unfortunately, the code to create, initialize and finally to trigger the event is a bit verbose and distracts from the actual purpose of the test. After writing similar initialization routines a couple of times I came up…

SWT: Do You Know the Difference between Tree#select and Tree#setSelection?

On March 5, 2014, Posted by , In Eclipse, By ,,,,,, , With 3 Comments

Actually I did not, neither did Google and the API documentation seems to miss out one crucial point – which took me some time to figure out. So I decided to be a nice boy scout and share my findings as my good deed of the day 1. According to…

Using the AutoValue Code Generator in Eclipse

On March 4, 2014, Posted by , In Eclipse, By , With 6 Comments

My colleague Moritz of EclipseSource recently came across Google Auto, a collection of Java code generators. AutoValue is one of them and generates Java code for immutable objects. It provides an annotation and an annotation processor to generate Java code for immutable value objects. The current version is labelled RC1…

A JUnit Rule to Ease SWT Test Setup

On February 25, 2014, Posted by , In Eclipse,JUnit, By ,,,,, , With Comments Off on A JUnit Rule to Ease SWT Test Setup

Rüdiger and I have written a lot of SWT test cases for our current RCP project lately. Most of the time we can execute them as plain JUnit tests. Still they also have to run in a RCP integration environment. Long story short we wrote a DisplayHelper fixture to reduce…

Responsive UIs with Eclipse and SWT

On February 24, 2014, Posted by , In Eclipse, By ,,,,,, , With 1 Comment

Recently I had the problem that my ‘well-conceived’ view design did not scale down reasonably. I realized that the flexibility to arrange viewparts in stacks of arbitrary sizes in an Eclipse workbench window does not exactly ease the development of appealing UIs. At least if you strive for more than…

Mockito Templates for Eclipse

On February 10, 2014, Posted by , In Eclipse,JUnit, By ,,,, , With Comments Off on Mockito Templates for Eclipse

Sometimes I miss the forest for the trees – and that for a disturbingly long time. I just became aware of this once again recently, typing one of the more verbose mockito expressions for the umpteenth time. The statement in question was a doAnswer(Answer) construct which always feels a bit…

More Units with MoreUnit

Just over a year ago I wrote a post about working with JUnit in Eclipse. One of the commenters recommended MoreUnit in order to increase testing efficiency even more. Giving it a try I was delighted and the plugin’s keyboard shortcuts were immediately memorized by my autonomic nervous system… Additionally,…

An Introduction to the JGit Sources

On October 28, 2013, Posted by , In Eclipse, By ,, , With 10 Comments

JGit is a pure Java library implementing the Git version control system. It is an Eclipse project and started out as the Git library for EGit, which provides a Git integration into the Eclipse IDE. Meanwhile, JGit has further adopters like in Gerrit, GitBlit, GitClient Plugin for Jenkins (work in…

Configure Your OSGi Services with Apache Felix File Install

On October 25, 2013, Posted by , In Eclipse,OSGi, By , With Comments Off on Configure Your OSGi Services with Apache Felix File Install

A recent post about Managed Services reminded me of a feature in Apache Felix File Install that I found worth mentioning. While working on a project with Holger, I learned from him that File Install cannot only be used to manage bundles. It also monitors configuration files and updates Managed…

An Automated OSGi Test Runner

On July 4, 2013, Posted by , In Eclipse,JUnit,OSGi, By ,, , With 2 Comments

Among my fellow team members, I was known for notoriously forgetting to maintain the (JUnit) test suite. I just can’t get this extra step of manually adding a test to a suite into my fingers. Fortunately, there are continuous integration servers that collect tests by a naming pattern. If one…

Working Efficiently with JUnit in Eclipse

On November 26, 2012, Posted by , In Eclipse,JUnit, By ,,,, , With 11 Comments

Recently I was dragged into a discussion1 with some test infected2 fellows about how we use JUnit within the Eclipse IDE. Surprisingly the conversation brought up some ‘tips and tricks’ not everybody was aware of. This gave me the idea to write this post doing a sum up of our…

A Simple way to extend SWTBot

On October 26, 2012, Posted by , In Eclipse, By ,, , With Comments Off on A Simple way to extend SWTBot

SWTBot is an Eclipse project that enables you to write functional tests for SWT and Workbench based applications in Java. It has API to remote control the application under test and matcher to find widgets and examine their state. For each widget, there is a corresponding bot class with methods…

Running HTTP/REST Integration Tests efficiently in Eclipse

On September 10, 2012, Posted by , In Eclipse,JUnit, By ,,,,, , With 8 Comments

Lately I had a chance to use the OSGi-JAX-RS-Connector library written by my dear fellow Holger Staudacher. The connector enables you to publish resources easily by registering @Path annotated types as OSGi services – which actually works quite nicely. While it is natural for me to write the service classes…

RAP: Adapt Your Style

On August 14, 2012, Posted by , In Eclipse, By ,,,, , With 4 Comments

I really like the new RAP default theme introduced with the  RAP 1.5 Release (see New and Noteworthy). It looks much more sophisticated and refined thus making RAP applications look ‘desgned for the web’, rather than ‘ported to the web’ as before. However, while working on my last customer project,…

How do you import static in Eclipse?

On March 28, 2012, Posted by , In Eclipse, By , With 13 Comments

Long story short, I just discovered that Ctrl+Shift+M (Source > Add Import) can not only be used to add missing imports. It can also help with static imports. Executed on a reference to a qualified member (read Class.member), the refactoring will add a static import for the defining class and…

Eclipse Archive Utilities

On March 15, 2012, Posted by , In Eclipse, With 2 Comments

A little while ago I started a side project to support working with (zip) archive files in the Eclipse IDE. Initially it was more meant to revive my plug-in development knowledge and play around with some technologies like Tycho or SWTBot. But in the end, I though it might be…

Code Centric Trainings with the Samples Manager

On December 1, 2011, Posted by , In Eclipse, By , With 2 Comments

I recently gave a training course on – you guess it – RAP/RWT. And as it seems natural for a training targeted at developers it was very code centric and had many hands-on exercises. For hands-on exercises I find it useful to give a starting point so that tedious steps…