Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Create and set a target platform programatically
Create and set a target platform programatically [message #665266] Wed, 13 April 2011 23:48 Go to next message
Eclipse UserFriend
Originally posted by:

I would like to create and set a target platform programatically, say
from a given target definition in xml. I have browsed the internal
classes a bit and maybe it would work somehow like this:
ITargetDefinition newTarget =
TargetDefinitionPersistenceHelper.initFromXML(newTarget, new
FileInputStream(new File("")));

However all these classes are internal, not accessible and not part of
the API.
I have found a related post :
The proposed solution was to use formService
But AFAICS this is also not acessible.
Is there any API I missed?
Thanks in advance!
Re: Create and set a target platform programatically [message #665419 is a reply to message #665266] Thu, 14 April 2011 15:01 Go to previous message
Curtis Windatt is currently offline Curtis WindattFriend
Messages: 166
Registered: July 2009
Senior Member
You should use ITargetPlatformService and LoadTargetDefinitionJob

Both are in the package. The 'provisional' entry means that this is a provisional API. It is not guaranteed to stay the same between releases, but we limit the changes made to it and are working towards a solid API that can become public.

To get the service programmatically, use the OSGi framework. For example.

service = (ITargetPlatformService) ApiPlugin.getDefault().acquireService(ITargetPlatformService .class.getName());

Let us know how the API works for you. If it doesn't meet your needs or you think it could be improved in some way, file a bug so that we can improve it before making it official API. We have not set an expected time to make the API public as there are only few products expressing interest in using it. Meanwhile we have been updating the API to improve support for p2 repositories.
Previous Topic:How to set a Windows System Environment Variable for a plug-in
Next Topic:Problem with perspectiveExtensions extensionpoint
Goto Forum:

Current Time: Sun Jun 20 03:07:10 GMT 2021

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

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

Back to the top