Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to access the PluginBase
How to access the PluginBase [message #637008] Wed, 03 November 2010 14:19 Go to next message
Eclipse User
Originally posted by: formatzeh.gmx.de

Hello,
I generate a little bit of code. My problem now is that I'm not able to
add several plugin dependencies to the plugin.xml of the plugin into
which I generate the code. I found the following link:

http://dev.eclipse.org/mhonarc/lists/pde-ui-dev/msg00090.htm l and the
following snippet:

IPluginBase plugin = model.getPluginBase();
IPluginModelFactory factory = model.getFactory();
IPluginImport importEntries = factory.createImport();
importEntries.setId("org.eclipse.emf.ecore");
plugin.add(importEntries);

My problem now is that I don't know how to get such a 'model'. If I
could do this this would do the trick. What I have is the IProject and
the corresponding IJavaProject. But how do I get the IPluginBase for my
project?
Re: How to access the PluginBase [message #637054 is a reply to message #637008] Wed, 03 November 2010 18:57 Go to previous messageGo to next message
Eclipse User
Originally posted by: formatzeh.gmx.de

I explored the code a little bit. It's a pitty that all of the
interesting classes from the PDE are internals. So e.g. the class
NewProjectCreationOperation is interesting: the method
createManifest(IProject project) creates the manifest file with help of
static methods of PDEProject. Another class I would like to look into
the sources is WorkspaceBundlePluginModel. But it's not possible. So why
did you declare those classes as internals and why isn't it possible to
look into the sources of the interesting ones?

Gilbert Mirenque wrote:
> Hello,
> I generate a little bit of code. My problem now is that I'm not able to
> add several plugin dependencies to the plugin.xml of the plugin into
> which I generate the code. I found the following link:
>
> http://dev.eclipse.org/mhonarc/lists/pde-ui-dev/msg00090.htm l and the
> following snippet:
>
> IPluginBase plugin = model.getPluginBase();
> IPluginModelFactory factory = model.getFactory();
> IPluginImport importEntries = factory.createImport();
> importEntries.setId("org.eclipse.emf.ecore");
> plugin.add(importEntries);
>
> My problem now is that I don't know how to get such a 'model'. If I
> could do this this would do the trick. What I have is the IProject and
> the corresponding IJavaProject. But how do I get the IPluginBase for my
> project?
Re: How to access the PluginBase [message #637217 is a reply to message #637054] Thu, 04 November 2010 11:48 Go to previous message
Curtis Windatt is currently offline Curtis Windatt
Messages: 166
Registered: July 2009
Senior Member
In the Eclipse project, API is forever. Once you declare it as a public API, you must have ongoing support for it and it cannot have a breaking change between releases. Therefore, we only make API when necessary. As PDE is pretty high on the food chain (few people extend us), there isn't as much need for API.

You can use internal code. Just be aware that we may change the code between releases.

NewProjectCreationOperation was not designed as API. There have been several attempts to refactor the code to a more presentable state, but none have been completed. For creating new projects programmatically you can also look at IBundleProjectService in PDE Core.
Previous Topic:Cannot launch product configuration
Next Topic:When using custom config.ini file, product export doesn't create bundles.info
Goto Forum:
  


Current Time: Tue Jul 29 08:56:51 EDT 2014

Powered by FUDForum. Page generated in 0.11476 seconds