Twitter github

Posts Tagged with “osgi”

Pushing Pixels and I-Build Goodies

There’s been a lot of hustle and bustle for the latest Eclipse I-build. The p2 guys are pushing hard to get things in and the API Tools camp is making their debut. From the PDE UI camp, I was on an icon conquest today with improving icons in the schema editor:

It’s funny that I agonize over things like icons when probably only a few people in the Eclipse community really care about pushing pixels. In the end, I lost my battle with overlays so another redesign of the schema editor icons will happen in the future to make them more overlay friendly:

I also had fun trying to come up with icons representing OSGi services but I’m going to save that rant for tomorrow.

Another item coming from PDE is a filterable launch configuration:

This is incredibly useful if you want to filter for a set of plug-ins and either enable or disable them. For example, say you wanted no org.apache* plug-ins in your launch config, simply filter for them and click ‘Deselect All’ (it’s filter-sensitive now). No more going through and checking things individually! Everyone can thank Ian Bull for his persistence in getting this enhancement in.

The other thing I’m looking forward to in the upcoming I-build is improved colored label support. Look for PDE to adopt this in things like the ‘Open Plug-in Artifact’ dialog and other places that make sense. If you’re interested in test driving this functionality, look for a class called StyledCellLabelProvider in the 3.4M6 release.

Oh, and JDT Core released some crazy changes to support external class folders. I plan on looking at this support in depth after my vacation to see if we can close an old outstanding issue in PDE.

That’s all that comes across my mind for now 🙂

OSGi and Android Comparison

I’d thought I share this blog entry by Gabor Pecosy comparing OSGi and Android. I just came across this today and found it an interesting read with my morning coffee + espresso shot.

On a related note, at EclipseCon, Neil Bartlett and BJ Hargrave will be giving a talk on Android/OSGi.

Disabling Bundles

The PDE and Equinox Framework teams have been busy graduating a concept of enable and disable for the runtime.

What does this mean? Well, bundles can essentially be disabled and prevented from starting due to some reasoning. This concept is very useful to the security work that is going on in the Equinox incubator. To help test this concept, the OSGi console was enhanced to support some new commands (enable/disable):

I also decided to polish up the Plug-in Registry view in PDE to enable power users to do some advanced bundle-related operations:

As a power user, don’t be a stupid power user and stop/disable some important bundles in your runtime instance 🙂

On a side note, if you want to help PDE improve the Plug-in Registry view even more, I filed an enhancement regarding exposing a Diagnose action similar to what is available in the OSGi console.

An Introduction to OSGi

I just saw this presentation by Peter Kriens regarding OSGi… it’s a pretty solid introduction.

My favorite take aways and quotes from the presentation:

…last week at EclipseCon there was a presentation by John Wells from BEA (WebLogic)… he said we always thought that we were working modular… it was in our process descriptions… we had reviews for it… we really thought we were modular until we started using OSGi… suddenly we found we weren’t working modular and everything was connected to each other… OSGi makes that really visible… it’s very easy to see the dependency graph between bundles…

Eclipse… love it…

Ok, maybe that last quote is taken a bit out of context, but it’s rare when Peter says Eclipse and love in the same sentence 🙂

Equinox Summit 2007

I had a bit of time to reflect on the Equinox Summit and here are my take aways:

  • p2 development is progressing very quickly
  • Dynamic-aware programming (service / extension registry) within OSGi is hard (we should adopt a standard way by Eclipse 4.0)
  • Service Activator Toolkit (SAT) is making its way into Equinox
  • It’s p2 not P2
  • Next time on pay-per-view: Spring-OSGi versus Declarative Services
  • It’s time to move the Equinox console out of the framework itself
  • Ottawa has a cat problem
  • ECF has some new requirements due to p2 to support adaptive downloading
  • Creating a standard and lightweight way to pass messages between Equinox instances is a bit tricky (178927,201154,4922)
  • I fear the p2 UI will suffer from the sins of our past. We really need to move away from doing everything within Eclipse. The p2 UI should take hints from Firefox. I’d rather have p2 come up with a standard package for information (analogous to the XPI format) and allow people to use the embedded browser to install things via one click.
  • Should Eclipse.org maintain a central metadata repository to avoid RPM Hell? A large central repository is what Linux distros have moved to as they have learned from the past cries of their users.
  • Having an “Eclipse Installed” sticker on your laptop can cause you to meet interesting people at the airport
  • p2 plans to go live during Eclipse 3.4M5
  • p2 will be requiring developers to do build-to-build upgrades using p2
    • Note: This is so crucial it’s not even funny. One of the biggest reasons the old Update code didn’t get more love is because we didn’t “eat our own dog food” so to speak.

On the whole, the trip was very enjoyable. It was a pleasure to meet new people and see some faces I haven’t see in awhile. Thanks to the Eclipse Foundation and Jeff for putting this event together. Maybe it’s time for a PDE Summit in Austin :)?

Web development revisited

After having a rough morning and cheering myself up by reading cuteoverload.com (freaky animatronic cats make me giggle), I started to work on an upcoming series of Rich Ajax Platform (RAP) articles. If you haven’t toyed with RAP, I suggest you try it out… because it’s one of the coolest things I played with in awhile. I mean, check this screenshot out below… that’s the famous PDE “RCP Mail” example running within RAP pretty much unmodified:

Even though I believe web development is so 90’s, this type of stuff where you mix the things we come to love within Eclipse (extension registry, good modularity and versioning concepts, etc…) with “web 2.0” elements is the future of web development. Web development the Eclipse way ;)?

If you step back for a second and ponder about it… we may have to revisit the way think about developing applications due to the success of OSGi. It is now possible to structure an application so that you can have core code that could run various environments: an embedded device / cell phone (eRCP), desktop (RCP) and web (RAP) without modification. This core code will serve as the bottom layer for your application. The next step would be divided into two pieces: UI bits that work on all or some of those platforms, and UI bits specific for those environments.

In the end, you have a “hybrid application” if you put these elements together and you have quite a bit of code and skills re-use. Imagine developing an application that runs on the new Nokia S60, within an Eclipse RCP application and also on the web via RAP. Kind of cool eh?

Creating an OSGi bundle with PDE

In response to Glyn’s post, I figure I would show people how to create a ‘hello world’ bundle using PDE (I cry these days if I ever see someone setting up their classpath ;p).

  • File->New->Project
  • Select Plug-in project
  • Make sure the target platform points to Equinox
  • Select the Hello OSGi template
  • Click Finish and we’re done. Feel free to launch using PDE’s facilities

Equinox Console and grep/sort

I just noticed an email fly by on the equinox-dev mailing list about a possible contribution for grep/sort commands to the equinox console. For me, this is great news, I mean, this is even better than the last episode of House.

As an afterthought, grep was one of the commands I thought to code for the article I wrote awhile back on the equinox console, but I settled for the much simpler uname 😉

It feels good to be dynamic

On catching up with my blog reading today, I came across a post by one of my good friends Bob Balfe. He links to an article by Peter Nehrer about dynamic plug-ins in Eclipse. I can’t stress enough how important this concept should be to an Eclipse developer. The current platform suffers from the case that certain plug-ins (bundles) aren’t dynamic aware causing the recommendation that Eclipse be restarted on every update (don’t mention apply changes, that popup should never exist in the first place). When we look past the 3.3 release and into a possible “4.0”, the concept of dynamic-aware plug-ins (bundles) is going to increase in importance.

I encourage all Eclipse developers to make their plug-ins dynamic aware and open bugs against projects that are lacking this functionality. Furthermore, when Netbeans decides to move to OSGi from its current module system (sometime early next year ;p), they may have a jump on us with all this crazy dynamic’ness.

Simple Remote Eclipse Console

Not sure how many people know this, but I discovered this accidentally this weekend. When launching Eclipse with -console, you can specify a port which you can telnet into (ie., ./eclipse -console 85). When you telnet into the specified port, you get a familiar OSGi console 🙂