Using the Equinox Security Manager

The Equinox security manager comes in handy when wanting to manage passwords or any other information that should be treated in a secure manner. In the aggregator I’m using it to store all credentials required to log onto the web site that serves the feed.
So if the feed does require that we log in we first obtain a node in the secure preferences, using the plug-in identifier as the identifier for the node.

Next we obtain the node for feed itself. Since all feeds are identified by a unique identifier (could have used the URL though) we’re using that for the node identifier. Now it’s simply a matter of composing the credentials and encode these for the URL connection.
Since this code is executed inside the IStatus run(IProgressMonitor monitor) of a Job instance it makes good sense to handle the exception using an IStatus instance here.

Support for RSS media

Rich media is supported in RSS, but in several different formats. I decided on supporting all of them, but focusing on what to appears to be the “bastard” format that YouTube is using. Mainly because YouTube is very popular and supply a range of different RSS feeds. Hence making it easy to test.
I had quite a few problems at first. My computer is running Linux (of course) and I could not get the videos to show. Something I guess would work without a hitch on Windows. I was about to give up and play with something else for a while but decided to try finding out what browser widget I was actually using. The code Device.DEBUG=true; revealed that XULRunner 1.8.1 was loaded. It did not even care about the embed tags that I was using. So I uninstalled 1.8.1 and replaced it with 1.9.0. That was better. I got a message dialog telling me that it wanted to download a plug-in to play the Flash video. Pressing “OK, go ahead and download” did not work. As expected. So I did sudo ln -s /usr/lib/browser-plugins/ /usr/lib/xulrunner-1.9/plugins/ and the result you can see in the screenshot.
Flash items are recognised and presented using an icon overlayed with the “f” symbol. Information from the “media:” elements in the feed data is used to compose the HTML code required to display using the browser widget. And that’s about all the special treatment these media feeds are getting.

Aggregator for Eclipse

I‘ve been wanting a small and unintrusive RSS/Atom reader in my work environment (Eclipse) for quite a while. Neither of those I found quite matched my requirements so I decided to write my own. Not only because I wanted this tool, but also because I wanted to do everything right.

As a project grows, you keep on learning. The code you wrote a year ago may not be using the API’s in the same manner as you do now. API’s evolve too. So I thought it would be a good idea to use this project for trying out the goodies that come out every year at the end of June.

There is some great Eclipse stuff out there, snippets of code, tutorials etc. But there is always something you just have to figure out on your own. Usually by glaring at Eclipse code hour after hour. So I also decided to share my discoveries with others using this blog. Maybe they can be of use to someone.

I’ve been working on this project for quite a while now. Usually just for a few hours a week. It’s becoming useful. Not quite ready for a release though (I’ve decided on using the EPL), but good enough for me to start writing about it.