Skip to main content


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 18:19 Go to next message
Eclipse UserFriend
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 22:57 Go to previous messageGo to next message
Eclipse UserFriend
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 15:48 Go to previous message
Curtis Windatt is currently offline Curtis WindattFriend
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: Fri Apr 19 14:54:17 GMT 2024

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

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

Back to the top