Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Get the current launch configuration
Get the current launch configuration [message #1818283] Wed, 11 December 2019 12:52 Go to next message
Mihnea-Costache Marin is currently offline Mihnea-Costache MarinFriend
Messages: 68
Registered: September 2019
Member
Hi,

Is there a way of, programmatically, finding the active launch configuration (the one selected in the combo-box)

I attached a photo to better explain.

https://imgur.com/vPBjC9C

Thank you!
Re: Get the current launch configuration [message #1818286 is a reply to message #1818283] Wed, 11 December 2019 14:04 Go to previous messageGo to next message
Emmanuel Chebbi is currently offline Emmanuel ChebbiFriend
Messages: 123
Registered: February 2018
Senior Member
Hi,

I think that you are talking about CDT's Launch Bar as I don't remember seing it elsewhere. As far as I know the concept of "active" launch configuration is brought by CDT; see this commit (you're interested in ILaunchBarManager.java).
Re: Get the current launch configuration [message #1818288 is a reply to message #1818286] Wed, 11 December 2019 14:33 Go to previous messageGo to next message
Mihnea-Costache Marin is currently offline Mihnea-Costache MarinFriend
Messages: 68
Registered: September 2019
Member
Hi,

This is exactly what I was looking for. Thank you!

Small question though... I want before the execution of the project to do something. I have an ICommandService listener which checks if the command id is the one that I'm looking for(in this case launching => commandId.equals("org.eclipse.cdt.launchbar.ui.command.launchActive"))

For some reason, it does not work. Do you know if there is another (command) id for launching from the launchbar?

Thank you!
Re: Get the current launch configuration [message #1818290 is a reply to message #1818288] Wed, 11 December 2019 15:20 Go to previous messageGo to next message
Emmanuel Chebbi is currently offline Emmanuel ChebbiFriend
Messages: 123
Registered: February 2018
Senior Member
Sorry, I don't know. You may want to search CDT's source code / documentation for their command declarations. You can also print all the commandIds received by your listener to check whether another one seems relevant.
Re: Get the current launch configuration [message #1818304 is a reply to message #1818290] Thu, 12 December 2019 08:31 Go to previous message
Mihnea-Costache Marin is currently offline Mihnea-Costache MarinFriend
Messages: 68
Registered: September 2019
Member
Solved the problem. Thank you for your help.
Previous Topic:Setting the correct build configuration
Next Topic:missing constraint: Import package: javax.xml.stream; version
Goto Forum:
  


Current Time: Fri Apr 26 08:33:14 GMT 2024

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

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

Back to the top