Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Plugin.xml reload(How to force a reload of plugin.xml )
Plugin.xml reload [message #1224937] Sat, 28 December 2013 07:04 Go to next message
Don Smyth is currently offline Don Smyth
Messages: 35
Registered: April 2013
Member
I am using a plug-in (with activator) with preference pages to allow users to change an apps preferences.

In another plugin, the main application, I have a .product file where I have specified -clean as a launch argument.

The problem I have is that if I modify the plugin.xml file in the preferences plugin, the changes are not reflected when I run the main application (even though I have specified the -clean argument).

The only references I have come accross with regards to reloading the plugin.xml suggest 1: unload the plugin bundle, close eclipse, then reload the bundle.
2: use a Target platform and disable then enable the plugin there.

For 1, I have no idea ho to unload the plugin manually or in code - the plugin only runs when I run the application - it is not running in the host console (OSGI>ss ) so I can't unload it.

For 2 - I experimented with creating and using a target platform but after many hours of trial and error I could not get a target working - so I am using the running platform as the target (yes, not best practice but it is working). As I am using the running platform (Kepler 4.3 + a few addons) as the target I don't have my preferences plugin in the content to enable / disable.

What I could try is putting all the preferences code into the main application and see if changes are realised (as the -clean launch flag is in the main application), any other ideas?
Re: Plugin.xml reload [message #1224974 is a reply to message #1224937] Sat, 28 December 2013 09:53 Go to previous message
Don Smyth is currently offline Don Smyth
Messages: 35
Registered: April 2013
Member
I was accessing the preferences plugin incorrectly. From the main application I changed to use a handler to do the following:

IPreferencePage systemPreferences = new SystemPreferences();
systemPreferences.setTitle("Preferences");
PreferenceNode systemPreferencesNode = new PreferenceNode("1", systemPreferences);
PreferenceManager pm = new PreferenceManager();
pm.addToRoot(systemPreferencesNode);

The SystemPreferences class above is in the preferences plugin. I don't need to access the plugin.xml for the prefs plugin directly. Smile
Previous Topic:Project not found error
Next Topic:Drag&Drop into an empty MPartStack
Goto Forum:
  


Current Time: Thu Oct 30 14:42:45 GMT 2014

Powered by FUDForum. Page generated in 0.01762 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software