diff options
author | Michael Rennie | 2007-02-13 22:13:51 +0000 |
---|---|---|
committer | Michael Rennie | 2007-02-13 22:13:51 +0000 |
commit | d22bcff1807ec0892302b6d76ca1c5a36992e063 (patch) | |
tree | c41cdd6ea83f9e1fd7efd181b5a2c52576fb583f /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java | |
parent | 4bf071f432fb4e312b6878c490b9fd76e892873d (diff) | |
download | eclipse.platform.debug-d22bcff1807ec0892302b6d76ca1c5a36992e063.tar.gz eclipse.platform.debug-d22bcff1807ec0892302b6d76ca1c5a36992e063.tar.xz eclipse.platform.debug-d22bcff1807ec0892302b6d76ca1c5a36992e063.zip |
Bug 74480
[launching] Simplify the launch experience for less technical users of Eclipse
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java')
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java | 52 |
1 files changed, 2 insertions, 50 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java index e0af87df4..d7b729d4f 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java @@ -20,17 +20,12 @@ import org.eclipse.debug.core.ILaunchMode; import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.debug.internal.ui.DefaultLabelProvider; import org.eclipse.debug.internal.ui.IDebugHelpContextIds; -import org.eclipse.debug.internal.ui.SWTUtil; -import org.eclipse.debug.internal.ui.contextlaunching.ContextRunner; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.viewers.ArrayContentProvider; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.ui.PlatformUI; @@ -57,10 +52,6 @@ public class LaunchShortcutSelectionDialog extends ListDialog { */ private String fMode = null; private IResource fResource = null; - private boolean fChecked = false; - private boolean fProject = false; - private boolean fShowProject = false; - private boolean fShowResource = false; /** * Constructor @@ -68,13 +59,11 @@ public class LaunchShortcutSelectionDialog extends ListDialog { * @param resource * @param mode */ - public LaunchShortcutSelectionDialog(IResource resource, String mode, boolean showresource, boolean showproject) { + public LaunchShortcutSelectionDialog(IResource resource, String mode) { super(DebugUIPlugin.getShell()); setShellStyle(getShellStyle() | SWT.RESIZE); fResource = resource; fMode = mode; - fShowProject = showproject; - fShowResource = showresource; ILaunchMode lmode = DebugPlugin.getDefault().getLaunchManager().getLaunchMode(fMode); String modename = fMode; if (lmode != null) { @@ -127,47 +116,10 @@ public class LaunchShortcutSelectionDialog extends ListDialog { protected Control createDialogArea(Composite container) { Composite comp = (Composite) super.createDialogArea(container); try { - List input = new ArrayList(ContextRunner.getDefault().getLaunchShortcuts(fResource)); - Button butt = null; - if(!input.isEmpty()) { - if(fShowResource) { - butt = SWTUtil.createCheckButton(comp, MessageFormat.format(LaunchConfigurationsMessages.LaunchShortcutSelectionDialog_2, new String[] {fResource.getName()}), null, fChecked); - butt.addSelectionListener(new SelectionListener() { - public void widgetDefaultSelected(SelectionEvent e) {} - public void widgetSelected(SelectionEvent e) { - fChecked = ((Button)e.getSource()).getSelection(); - } - }); - } - if(fShowProject) { - butt = SWTUtil.createCheckButton(comp, MessageFormat.format(LaunchConfigurationsMessages.LaunchShortcutSelectionDialog_3, new String[] {fResource.getProject().getName()}), null, false); - butt.addSelectionListener(new SelectionListener() { - public void widgetDefaultSelected(SelectionEvent e) {} - public void widgetSelected(SelectionEvent e) { - fProject = ((Button)e.getSource()).getSelection(); - } - }); - } - } + List input = new ArrayList(DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchShortcuts(fResource)); getTableViewer().setInput(input); } catch(CoreException ce) {DebugUIPlugin.log(ce);} return comp; } - - /** - * Returns if the launched config from the selected shortcut should be made the default for the underlying resource - * @return if the launched config should be made the default - */ - public boolean makeDefault() { - return fChecked; - } - - /** - * Returns if the launched config from the selected shortcut should be made the default for the underlying resources' associated project - * @return if the launched config from the selected shortcut should be made the default for the underlying resources' associated project - */ - public boolean makeProjectDefault() { - return fProject; - } } |