Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Creating extensions in plugin.xml programmatically?
Creating extensions in plugin.xml programmatically? [message #901475] Sun, 12 August 2012 21:46 Go to next message
Stefan Missing name is currently offline Stefan Missing nameFriend
Messages: 4
Registered: July 2011
Junior Member
Hi,
is there a proper way to create a new extension entry within plugin.xml just like the PDE "Manifest+Plugin Editor" does?

Currently I can access the PluginModel via PluginRegistry, but the returned models seem to be "not editable".

Thus, I wonder if there is an API that supports modifications of a plugin model (and plugin.xml)
OR
if I have to modify the plugin.xml and re-load the model.

Thanks for your ideas!

regards

Stefan


Re: Creating extensions in plugin.xml programmatically? [message #901564 is a reply to message #901475] Mon, 13 August 2012 12:21 Go to previous messageGo to next message
Joseph Carroll is currently offline Joseph CarrollFriend
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

Answer - no.

I see a number of issues with this. (AFAIK) I suppose if you wanted to create an extension point at runtime you would be able to. However, it would not be through modification of a plugin.xml file, because the plugin.xml files are read before a bundle ever loads.

Whether modifying the plugin.xml file was possible or modification of the extension registry, how would you define items that "extend" something that was previously undefined...


JD
Re: Creating extensions in plugin.xml programmatically? [message #906059 is a reply to message #901475] Fri, 31 August 2012 14:37 Go to previous message
Curtis Windatt is currently offline Curtis WindattFriend
Messages: 166
Registered: July 2009
Senior Member
It depends on what you are trying to modify.

1) There is no way to modify the plug-ins running in your Eclipse install. PDE creates a model of these plug-ins for the Plug-in Registry view, but the model is not accessible outside of PDE (and is not modifiable).

2) PDE's model of the workspace and target plug-ins is accessible through the PluginRegistry. However, it cannot be modified. Doing so would make the model inconstent. When launching, OSGi would use what is set in the manifests, even if the PDE model had different information.

3) It is possible to programmatically modify a bundle manifest in the workspace. Use org.eclipse.pde.core.project.IBundleProjectService to get a modifiable model of a workspace project. After modifying the model, call apply() to have the changes applied to the workspace.
Previous Topic:how to read a file in another plugin?
Next Topic:File Path to jar inside another jar
Goto Forum:
  


Current Time: Fri Apr 19 00:50:48 GMT 2024

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

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

Back to the top