Twitter github

Posts Tagged with “equinox”

Eclipse and IRC

It looks like Eclipse’s IRC presence is growing! The Equinox project recently announced it would join other Eclipse projects on IRC. Also, not so long ago, the Eclipse Modeling folks have decided to establish a base on IRC. This is great news as I’m a big advocate of having a strong IRC presence to foster community bonding and growth.

In the end, we’re one step closer to have funny IRC quotes published to bash.org 🙂

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.

Powered by Pulse?

It looks like we may have a new contender in the ring for Eclipse Distros… however, I think it may be a bit more than that given what is stated in the article. An interesting quote:

Other features of the PoweredByPulse service include: a small initial installation footprint of 2MB; fast installations available through optimized use of mirrors and simultaneous downloading of components; rich user experience in Eclipse RCP (Rich Client Platform)-based client for a positive experience and ease of use; PoweredByPulse branding, along with maintaining product branding through use of ‘splash fades;’ desktop integration with customizable program group and desktop icons to enable fast profile launches; and cross-platform capability with Windows and Linux in November and Macintosh to follow.

It’s been a dream of mine to see a tiny initial Eclipse download that would sort of serve as an update manager. It would be able to browse a central repository of managed update information very quickly and allow users to download what they want. On top of that, it would allow users to manage flavors of Eclipse to launch based on a bundle pool. For example, if I had “WebTools”, “DataTools”, “PHPTools” and “C++Tools” installed, being able to easily launch an Eclipse with say only C++ tooling enabled and another “profile” for all my web-related development would be awesome. I usually find myself doing this manually with a ton of Eclipse installs and duplicated plug-ins 🙂

If Genuitec has indeed done this, then kudos to them, it’s much sooner than I’d envisioned it happening. I guess we will have to wait and see.

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 :)?

Marlboro Man and the Equinox Summit

My first day in Ottawa and all I can think about is the Marlboro Man. I guess since arrived late into Ottawa this evening for the Equinox Summit, I was blessed with a hotel room that was probably occupied by the Marlboro Man before I arrived. Since the hotel is full, I have to endure the smoky smell until tomorrow 😀

On the Eclipse-side of things, I released changes for 3.4M3 that will upgrade Bundle-RequiredExecutionEnvironment (BREE for short) from coach to first class (thank you Gary Duprex for your patches and patience). Why are BREE’s good? Read PaScaL’s blog post.

In the new plug-in project wizard, you’ll see an option to set your target environment:

Also, we now flag missing BREE’s in honor of Remy Suen who may suffer from a heart attack if people don’t set BREEs in their bundles.

Note: I know you can have multiple BREE’s per bundle, but we currently don’t support this scenario in the new plug-in project wizard due to the rarity. If additional BREE’s need to be added, PDE offers a fantastic forms-based editor and a source editor with code completion.

Web development is so 90’s

I meant to blog about this earlier, but I was in Italy with limited Internet access. People that know me personally, know that I tend to use the quote “enterprise web development is so 90’s.” There’s very few things in life that have turned me off from programming than the whole JEE stack. EJBs and everything around it can go rot in a fire.

Ok, now that I’m done my rant, back to my original discussion topic of how web development isn’t so 90’s anymore. Certain people have seen the light and started to move web development to the world of bundles.

I had first hand experience with this a few weeks ago when Dejan said “Chris, update test cases are failing, can you take a look at this bug” (note, this was about 5 minutes before he signed off and went on vacation for 3 weeks :P). As a bundle developer, I can use familiar concepts like extensions and extension points to write web applications. See the Equinox HTTP Quickstart guide for some simple examples. I think within a couple years, this will be common place as vendors move to create tools around these concepts. I mean, application servers are already running on top of OSGi, the next logical step is that these web applications will be packaged as bundles. I’m sure that the Equinox Provisioning work will make it even easier to deploy these applications on servers because this was another pain point when working with web applications.

I’m in the process of writing a tutorial around these ideas, but Jeff and Simon’s short article is a good starting point.

Oh, I forgot to point towards the Rich Ajax Platform (RAP) project which is doing stuff that is so 2010 😛

Am I Headless?

Through my daily browsing of the Eclipse newsgroups, I saw a post about how do detect whether a bundle is running headless. I had to do something similar several months ago, but I figure I would post a solution for people whoever come across this issue in their bundle-development lives.

The gist of the solution is to detect whether the SWT bundle is installed and running. Here’s a basic snippet on how to do this:

Bundle b = Platform.getBundle("org.eclipse.swt");
if (b==null || b.getState() != Bundle.ACTIVE) {
System.out.println("sweet, headless mode!");
}

If you don’t care for the dependency on the Platform class and the bundle it comes from, you can do a “pure OSGi” solution of using PackageAdmin. I recommend using getBundles(…) from PackageAdmin to get access to the SWT bundle to do a similar check.

That’s it… I’m not sure if a more elegant solution exists.

Tales from the Crypt

Sometimes, while browsing source code, you come across things that make you think twice. While working on an enhancement recently, I came across this snippet:

public static boolean canWrite(File installDir) {
if (installDir.canWrite() == false)
return false;

if (!installDir.isDirectory())
return false;

File fileTest = null;
try {
// we use the .dll suffix to properly test on Vista virtual directories
// on Vista you are not allowed to write executable files on virtual directories like "Program Files"
fileTest = File.createTempFile("writtableArea", ".dll", installDir); //$NON-NLS-1$ //$NON-NLS-2$
} catch (IOException e) {
//If an exception occured while trying to create the file, it means that it is not writtable
return false;
} finally {
if (fileTest != null)
fileTest.delete();
}
return true;
}

It seems Vista has a really stupid problem in regards to writing executable files. I was aware of the new virtual directory madness in Vista, I didn’t know of this particular workaround. I guess you learn something new everyday 😉

Equinox and Security

Well, from the looks of it, Equinox will soon have code checked in to deal with security (ie., JAAS,Login,JCA,etc…) support. This is great news as this is one of the most requested features when I’m at conferences and people talk about security and Eclipse. The tricky part will be how to integrate some of ECF‘s concepts into what is produced… I guess this could be discussed at the Equinox Summit in (insert kind words to describe Ottawa in September) Ottawa.

We’ll see where this code takes us in 3.4 🙂

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