I’m writing a plugin to eclipse, in which I need to reload active target platform, at a given time. – just as the Preferences -> Plug-In Development -> Target Platform -> Reload.button, but of course dynamically from my plugin.
I would imagine something like this would be the way, but i can’t find the entrance/MagicProvider:
MagicProvider.getTargetPlatforms().getActive().reload();
Hope some of you know the trick 🙂
Tried Max’s approach, but it didn’t seem to work. After searching the eclipse source I found out, that the ITargetDefinition is just a working copy, and must be saved. So the code will be:
But credits to Max for the guideline. 🙂
If anyone else needs some info, I recommend taking a look at
org.eclipse.pde.internal.ui.preferences.TargetPlatformPreferencePagenear line 771 – 812 and method handleReload()and
org.eclipse.pde.internal.ui.editor.targetdefinition.TargetEditornear line line 231