tips Tag

Eclipse/OSGi has a strict versioning scheme consisting of 4 parts, separated by dots. This is well-known to Eclipse developers, and thus in the Eclipse/OSGi world the versioning problems are solved. In the past few months references to the Semantic Versioning scheme became more and more frequent. It seems similar to the Eclipse versioning, but is not quite the same. Thus a small overview is in order....

Read More

I always wanted to write a blog post with a title consisting of just acronyms and numeronyms - here it is! Obviously, this post is about internationalizing web applications based on the Eclipse Remote Application Platform (RAP), using property files encoded with UTF-8 character encoding. Usually, Eclipse developers use resource bundles (pure Java) or message bundles (when working on Eclipse) to internationalize strings. Both approaches have the limitation that...

Read More

With all of the current mobile and desktop operating systems we use all day, most users expect a great deal from an application user interface. People take things like animated transitions, gesture-based navigation, transparent controls and high resolution graphics, for granted. Yes, SWT recently added Touch- and Gesture Listeners. And yes, you can set alpha on a shell. And yes, you can use a FormLayout to have overlapping UI elements. But...

Read More

Part 3: Cross-Widget Scripting The most glaring limitation of ClientScripting since it's inception was that a listener can only manipulate the widget that fired the current event. Consider, for example, an onscreen number keypad like this: The obvious (non-ClientScripting) implementation would be to attach selection listeners to the buttons that insert the given character into the text field. In RAP this would normally cause a slight delay...

Read More

Part 2: How to Pass Data to Your ClientListener A ClientListener is executed in a completely different environment to a traditional SWT listener. The only data it has access to is the event object, which in turn has a reference to the ClientScripting-version of the widget that fired the event. Until now, the almost only way to pass any data to a ClientListener was to hard-code...

Read More

Part 1: RAP 2.1 and Client Scripting The RAP ClientScripting add-on was introduced with RAP 1.5/Juno to enable more responsive input validation on text widgets. The basic idea is that while most components of a RAP application can run exclusively on the server, some surface-level behavior is best implemented to run on the client. ClientScripting allows this by adding support for SWT-style event listeners written in...

Read More

EasyMock is a powerful framework to create mock objects to use in Java JUnit tests. When used in an OSGi environment (e.g. to write Eclipse PDE tests), the creation of class extensions can cause trouble. This post describes a problematic use case and possible solutions. The use case Imagine the following situation: an Eclipse RCP application has a bundle A containing a class MyClass. This class has...

Read More

Unit tests often stop being useful where concurrency is involved. A special case is thread safety which can be tested relatively easily with the use of a simple JUnit rule. Suppose middle earth wants to keep track of the dragons that were slain over the centuries. The dragons are tracked in one list, and reports come in from different dwarfs, humans or elves. Sometimes, a dragon...

Read More

[caption id="" align="alignright" width="320"] Image via CC from Paul Gorbould[/caption] Recently I fell into the lost exception pitfall - when an exception thrown in a try block gets lost because another exception is thrown in the finally block. It wasn't that I was not aware of the problem, but rather that I underestimated and therefore ignored it. This post describes an example where suppressed exceptions have...

Read More

Reading the title, you might ask why this could be a problem. Good news: in most cases it isn't. However it can be problem if you use native code in your Eclipse plug-in and run on an older version of Equinox (3.7.2 and earlier). This post describes the problem and possible solutions. The problem On older Windows versions, our Eclipse RCP/RAP application works fine. On Windows 8...

Read More