Blogs

In an OSGi-based system, there are cases when you want to do some heavy refactoring but run the risk of breaking downstream clients. For example, let's say you have plug-in A, it exports the com.company.util package. Now let's pretend this package contains utility methods for math functions and logging. Now let's say you have a request to break apart the math and logging code into...

Read More

I was catching up with a colleague today at a coffee shop about his OSGi-based product and the topic of versioning came up (he also bribed me with free espresso shots). My colleague's company recently released the "2.0" version of their product and were ready to move to the next release (3.0). The common pattern they were using was to simply artificially synchronize all plug-in...

Read More

Ever use the OSGi console included in Eclipse (i.e., run the eclipse executable with -console)? Ever wanted to add your own console commands for your application? If so, the process is pretty easy and straightforward. The first step is to implement the CommandProvider interface. Here is a simple and fun example: [code lang="java"] package com.code9.examples.console; import org.eclipse.osgi.framework.console.CommandInterpreter; import org.eclipse.osgi.framework.console.CommandProvider; public class MyCommandProvider implements CommandProvider { public Object _iddqd(CommandInterpreter intp) { intp.println("Immortal mode enabled"); ...

Read More

I had to help someone internationalize their RCP application today and I didn't really have a straight forward simple example to point them to so I figure I'd share something here for everyone's benefit. I'll use the famous RCP mail example to get things started. The first step in internalization is making sure our strings are externalized so translators can actually do something with them....

Read More