Skip to main content



      Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How do I create a new Launch Configuration Tab?(LaunchConfigurationTab)
How do I create a new Launch Configuration Tab? [message #521759] Thu, 18 March 2010 12:48 Go to next message
Eclipse UserFriend
Hi,

I am trying to create my own launch configuration tab that subclasses CDT's CLaunchConfigurationTab class.

I was able to get my controls to display ok in the tab, but I am not sure where to go from here.

I have the following questions:

1. How do I enable the Apply/Revert buttons in the launch config dialog? I have a set of radio buttons, a combo, and text field, and when one of those controls change I expect the Apply button to be enabled. I tried using the function setDirty(true) but this doesn't seem to do anything.

2. Assuming I get the Apply button to enable when a control is changed, how do I save those changes? In other words, if someone changes the selected radio button, or switches the selected item in the Combo, how does that change persist?


Any help would be greatly appreciated, I am really stuck at the moment.


Thanks,
Jason
Re: How do I create a new Launch Configuration Tab? [message #521876 is a reply to message #521759] Fri, 19 March 2010 01:01 Go to previous messageGo to next message
Eclipse UserFriend
On 18/03/10 10:18 PM, Jason wrote:

Start here:
http://www.eclipse.org/articles/Article-Launch-Framework/lau nch.html

- Prakash
Platform UI Team, IBM

www.eclipse-tips.com
Re: How do I create a new Launch Configuration Tab? [message #522089 is a reply to message #521876] Fri, 19 March 2010 17:39 Go to previous messageGo to next message
Eclipse UserFriend
Very cool!

This was very helpful.

Thank you!


-Jason
Re: How do I create a new Launch Configuration Tab? [message #560226 is a reply to message #522089] Tue, 21 September 2010 11:24 Go to previous messageGo to next message
Eclipse UserFriend
Hello Jason,
As you solved your problem with the Revert/Apply buttons?
I am using setDirty(true) and updateLaunchConfiguration methods but I can´t enable them.
My code is (in createContent from my own tab):
.......
checkboxTreeViewer.addCheckStateListener(new ICheckStateListener() {
public void checkStateChanged(CheckStateChangedEvent event) {
setDirty(true);
updateLaunchConfigurationDialog();
// If the item is checked . . .
if (event.getChecked()) {
..........

Thanks!!
Luismi
Re: How do I create a new Launch Configuration Tab? [message #605155 is a reply to message #521876] Fri, 19 March 2010 17:39 Go to previous messageGo to next message
Eclipse UserFriend
Very cool!

This was very helpful.

Thank you!


-Jason
Re: How do I create a new Launch Configuration Tab? [message #661415 is a reply to message #560226] Thu, 24 March 2011 11:20 Go to previous messageGo to next message
Eclipse UserFriend
Luis Miguel wrote on Tue, 21 September 2010 11:24
Hello Jason,
As you solved your problem with the Revert/Apply buttons?
I am using setDirty(true) and updateLaunchConfiguration methods but I can´t enable them.


I am also struggling to get setDirty and updateLaunchConfiguration to work. Did anyone have any success with this?

Thanks,
Alan
Re: How do I create a new Launch Configuration Tab? [message #670373 is a reply to message #661415] Fri, 13 May 2011 13:32 Go to previous message
Eclipse UserFriend
I too had a similar problem and resolved it after much struggle Smile

In my case, I did not have to call setDirty() for my tab. Instead I just had to call updateLaunchConfiguration(), but ensure that the config.doSave() was never called explicitly anywhere in the tab class.

The class org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationTabGroupViewer ( henceforth LCTGViewer) has a method updateButtons() that does the trick to enable Apply and Revert buttons. To enable these buttons, isDirty() and canSave() of LCTGViewer must be true. While canSave()'s value depends on the value returned by tab.canSave(); LCTGViewer.isDirty()'s value depends on LaunchConfigurations. If you had ever invoked doSave() of your launchConfiguration in setDefault() or performApply() methods of your tab class, then LCTGViewer.isDirty() would return false!

This was the cause for my problem. Just see if you too are bitten by the same problem!
Previous Topic:Plugin user confuguration
Next Topic:Search method and open in editor
Goto Forum:
  


Current Time: Tue Jul 15 01:26:53 EDT 2025

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

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

Back to the top