1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-12 03:25:22 +02:00

Enable double click selection in New Launch Config Wizard.

Also set the title on the edit page so we can tell what type we're
editing.

Change-Id: Ia526eae2cdb906e8ab115a3a74585db8b3c5de2c
This commit is contained in:
Doug Schaefer 2016-02-18 11:00:59 -05:00 committed by Gerrit Code Review @ Eclipse.org
parent d87141b0f9
commit 302c601bac
5 changed files with 27 additions and 9 deletions

View file

@ -50,6 +50,7 @@ public class Messages extends NLS {
public static String NewLaunchConfigEditPage_4;
public static String NewLaunchConfigEditPage_5;
public static String NewLaunchConfigEditPage_6;
public static String NewLaunchConfigEditPage_7;
public static String NewLaunchConfigModePage_0;
public static String NewLaunchConfigModePage_1;
public static String NewLaunchConfigModePage_2;

View file

@ -81,6 +81,7 @@ public class NewLaunchConfigEditPage extends WizardPage {
workingCopy = type.newInstance(null, name);
launchConfigurationDialog.doSetDefaults(workingCopy);
tabViewer.setInput(workingCopy);
setTitle(String.format(Messages.NewLaunchConfigEditPage_7, type.getName()));
}
} catch (CoreException e) {
Activator.log(e);
@ -152,12 +153,13 @@ public class NewLaunchConfigEditPage extends WizardPage {
public void updateButtons() {
// Launch button
getTabViewer().refresh();
// getButton(ID_LAUNCH_BUTTON).setEnabled(getTabViewer().canLaunch() & getTabViewer().canLaunchWithModes() & !getTabViewer().hasDuplicateDelegates());
// getButton(ID_LAUNCH_BUTTON).setEnabled(getTabViewer().canLaunch()
// & getTabViewer().canLaunchWithModes() &
// !getTabViewer().hasDuplicateDelegates());
}
@Override
public void run(boolean fork, boolean cancelable,
IRunnableWithProgress runnable)
public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable)
throws InvocationTargetException, InterruptedException {
// ignore
}

View file

@ -94,6 +94,12 @@ public class NewLaunchConfigModePage extends WizardPage {
selectedGroup = (ILaunchGroup) table.getSelection()[0].getData();
((NewLaunchConfigWizard) getWizard()).typePage.populateItems();
}
@Override
public void widgetDefaultSelected(SelectionEvent e) {
widgetSelected(e);
getContainer().showPage(getNextPage());
}
});
setControl(comp);

View file

@ -19,6 +19,8 @@ import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.launchbar.ui.internal.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@ -43,7 +45,12 @@ public class NewLaunchConfigTypePage extends WizardPage {
GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
data.heightHint = 500;
table.setLayoutData(data);
table.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetDefaultSelected(SelectionEvent e) {
getContainer().showPage(getNextPage());
}
});
populateItems();
setControl(comp);
@ -57,7 +64,8 @@ public class NewLaunchConfigTypePage extends WizardPage {
table.removeAll();
boolean haveItems = false;
for (ILaunchConfigurationType type : DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes()) {
for (ILaunchConfigurationType type : DebugPlugin.getDefault().getLaunchManager()
.getLaunchConfigurationTypes()) {
if (!type.isPublic() || type.getCategory() != null || !type.supportsMode(group.getMode()))
continue;

View file

@ -33,6 +33,7 @@ NewLaunchConfigEditPage_3=Name
NewLaunchConfigEditPage_4=Name can not be empty
NewLaunchConfigEditPage_5=A configuration with this name already exists
NewLaunchConfigEditPage_6=New Configuration
NewLaunchConfigEditPage_7=%s Launch Configuration Properties
NewLaunchConfigModePage_0=Select Initial Launch Mode
NewLaunchConfigModePage_1=Initial Launch Mode
NewLaunchConfigModePage_2=Select initial launch mode.