Sam C - 2012-09-12

I have included the RSSOwl Plugins in to my Eclipse Application and got RSSOwl integrated.

For the user to create Feeds the user currently needs to right click choose New and then the Feed option and enter the website supplying the feed (e.g. www.mywebsite/path/rss.xml) and this then gets added to the list of feeds.

What I would like is to override this ability and provide the users with a list of feeds so they do not need to add it themselves and was hoping to do this via Preference Store. So the code snippet below is how I would go about getting the URL for a single RSS Feed, although would be getting multiple feeds if required, at present testing it on one feed.

I am unsure how I can tell the RSSOwl API to use this feed I am passing, I can pull the string RSS URL's from preferences but want to add this feed when RSSOwl is loaded. Was also hoping I can also get acess to the properties so I can set how often the feed should update, I want to set the defaults so the each user does not need to and the user can tweak if necessary later. Is there a way to do this? Thanks

import org.osgi.service.prefs.Preferences;

private void getRSSFeeds() {
 String pluginID = Activator.PLUGIN_ID;
 Preferences prefRoot = Platform.getPreferencesService().getRootNode().node("rssNode");
 Preferences pluginPrefs = prefRoot.node(pluginID);
 String rssURL = pluginPrefs.get(RSSOWL_URL, null);

//Using the rssURL string I want to supply this to RSS Owl as a newsfeed.

 if (rssURL == null) {
 //Do Something - set a default or output a message