[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: Programmatically generating a launch configuration

Louis Rose wrote:
Hi all,

Firstly, apologies if this is posted to the wrong newsgroup. Please redirect me if this is the case.

My problem is that I would like to generate a launch configuration programmatically from a plug-in. How can I do this?

I presume it is something to do with the Launch Manager - i.e. org.eclipse.debug.core.DebugPlugin.getDefault().getLaunchManager() - but I'm not sure how to instantiate a new Launch Configuration. Any ideas?

Many thanks,
Louis Rose.

Did you take a look at
http://www.eclipse.org/articles/Article-Launch-Framework/launch.html
?
Launch configs are stored as files in your workspace .metadata under org.eclipse.debug.core. From the LaunchManager you can get LaunchConfigurationTypes allow you get a LaunchConfigurationWorkingCopy with newInstance() then operate on it and call doSave() to write the file into the .metadata store. Then you will see it in the UI and you can launch on it.


John