Creating extensions in plugin.xml programmatically? [message #901475] |
Sun, 12 August 2012 17:46  |
Eclipse User |
|
|
|
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 #906059 is a reply to message #901475] |
Fri, 31 August 2012 10:37  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.06386 seconds