op4j: Bending the Java spoon

The tagline of op4j is very interesting: ‘Bending the Java spoon’, which implies that the library offer magic to Java programming. And indeed it does. The basic idea of the library is to use Fluent Interface to a much greater use. To do this, the developer basically try to provide as much general functions as …

Little Java Generic Quiz

Let say I have following code: Can you guess what are the answers for following questions? TestGeneric will be reported as error by Java 6 (true/false) TestGeneric will be reported as error by Java 7 (true/false) TestGeneric will be reported as error by Eclipse 3.5 using Java 6 (true/false) TestGeneric will be reported as error …

Eclipse plugin: Introduce Static Imports

The Static Import guide from Sun states: So when should you use static import? Very sparingly! Only use it when you’d otherwise be tempted to declare local copies of constants, or to abuse inheritance (the Constant Interface Antipattern). In other words, use it when you require frequent access to static members from one or two …

multitail: colorize your log files

Love watching those log file flying on your screen? How about having that WITH color? MultiTail is small program that exactly does that. This application is available in *nix system and mac users can even use it from Macports. According to the website, the program is released with many color schemes for different log formats …

My Eclipse Code Formatter

A consistent code format across the project is one sign of a maintainable project. Almost all of Java IDEs provide a way to format your code, but in my opinion, Eclipse does deliver the most customizable Java formatter. Many aspects from the code can be configured using the tools. Lately the format used by Kevin …

Computing Map on Google Collections

Google always makes interesting projects. My toy nowadays is Google Collections. I don’t think I need to reintroduce it as it has been nicely covered on several blog posts: Introduction to Google Collections A series from CodeMunchies Beautiful code with Google Collections, Guava, and Static Imports Diving Into the Google Guava Library Functional Java Filtering …

Eclipse RCP: Creating dynamic menu

Have you ever want to create a dynamic menu to your RCP application? Do you want to compute the contents of the menu on-the-fly at runtime? This is possible and many hacks can be done to do that. But to do the correct thing is probably what annoyed your head every day. And actually, this …

Embedding Jetty Server in Eclipse RCP

Eclipse has a nice tutorial on how to embed a Jetty server in an OSGI framework. Unfortunately, this tutorial doesn’t help you if you want to run the server in a standalone Eclipse RCP application. One use case where you need to have a web server in your RCP application is when your application need …