Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Programmatically generating a launch configuration
Programmatically generating a launch configuration [message #330263] Wed, 23 July 2008 16:46 Go to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
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().getLaunchMan ager() - but
I'm not sure how to instantiate a new Launch Configuration. Any ideas?

Many thanks,
Louis Rose.
Re: Programmatically generating a launch configuration [message #330264 is a reply to message #330263] Wed, 23 July 2008 17:11 Go to previous messageGo to next message
John J. Barton is currently offline John J. BartonFriend
Messages: 311
Registered: July 2009
Senior Member
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().getLaunchMan ager() - 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/lau nch.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
Re: Programmatically generating a launch configuration [message #330393 is a reply to message #330264] Mon, 28 July 2008 10:01 Go to previous message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
John J Barton wrote:
> 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().getLaunchMan ager() -
>> 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/lau nch.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

Hi John,

Many thanks; this is exactly what I was looking for.

Best regards,
Louis.
Previous Topic:Linked resouces in .project do no show
Next Topic:Disappearing marker problem
Goto Forum:
  


Current Time: Sat Jul 27 20:28:15 GMT 2024

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

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

Back to the top