Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Rennie2007-02-22 12:41:27 -0500
committerMichael Rennie2007-02-22 12:41:27 -0500
commitfab88f3e75ff41eb20f38a16f5145de5b55f29a5 (patch)
tree620a5a4261bb2ec4f7319bd6b82cfa116493ecde /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations
parent70db1121f6c9806127d94575efc81f769eded32c (diff)
downloadeclipse.platform.debug-fab88f3e75ff41eb20f38a16f5145de5b55f29a5.tar.gz
eclipse.platform.debug-fab88f3e75ff41eb20f38a16f5145de5b55f29a5.tar.xz
eclipse.platform.debug-fab88f3e75ff41eb20f38a16f5145de5b55f29a5.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')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutExtension.java13
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java21
4 files changed, 41 insertions, 3 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
index 218f50ed8..aa1c12a77 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -102,6 +102,10 @@ public class LaunchConfigurationsMessages extends NLS {
public static String LaunchShortcutSelectionDialog_1;
+ public static String LaunchShortcutSelectionDialog_2;
+
+ public static String LaunchShortcutSelectionDialog_3;
+
public static String PerspectiveManager_Error_1;
public static String PerspectiveManager_Unable_to_switch_perpsectives_as_specified_by_launch___0__4;
public static String PerspectiveManager_Unable_to_switch_to_perspective___0__2;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
index bf70120af..b71c0dc25 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2007 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -115,6 +115,8 @@ LaunchShortcutSelectionDialog_0={0} As...
# if you tried to launch a class named Main in the file Main.java and you were presented
# with the selection dialog, the value of {1} would be Main.java (the name of the IResource)
LaunchShortcutSelectionDialog_1=&Select a way to {0} ''{1}'':
+LaunchShortcutSelectionDialog_2=&Description:
+LaunchShortcutSelectionDialog_3=Description not available
LaunchShortcutExtension_Unable_to_use_launch_shortcut_5=Unable to use launch shortcut
LaunchConfigurationPropertiesDialog_Edit_launch_configuration_properties_1=Edit launch configuration properties
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutExtension.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutExtension.java
index dd8d8cd11..c00716a8b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutExtension.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutExtension.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -231,6 +231,17 @@ public class LaunchShortcutExtension implements ILaunchShortcut, IPluginContribu
}
/**
+ * Returns the contributed description of the launch delegate or <code>null</code>
+ * if one has not been provided
+ * @return the description of the shortcut or <code>null</code> if one was not provided
+ *
+ * @since 3.3
+ */
+ public String getShortcutDescription() {
+ return fConfig.getAttribute(IConfigurationElementConstants.DESCRIPTION);
+ }
+
+ /**
* Evaluate the given expression within the given context and return
* the result. Returns <code>true</code> iff result is either TRUE or NOT_LOADED.
* This allows optimistic inclusion of shortcuts before plugins are loaded.
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 da50df63d..bb0f48e78 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,14 +20,19 @@ 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.SWTFactory;
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.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.ListDialog;
@@ -52,6 +57,7 @@ public class LaunchShortcutSelectionDialog extends ListDialog {
*/
private String fMode = null;
private IResource fResource = null;
+ private Text fDescriptionText = null;
/**
* Constructor
@@ -118,6 +124,21 @@ public class LaunchShortcutSelectionDialog extends ListDialog {
try {
List input = new ArrayList(DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchShortcuts(fResource));
getTableViewer().setInput(input);
+ SWTFactory.createWrapLabel(comp, LaunchConfigurationsMessages.LaunchShortcutSelectionDialog_2, 1, 300);
+ fDescriptionText = SWTFactory.createText(comp, SWT.READ_ONLY | SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.H_SCROLL, 1, 200, 200, GridData.FILL_BOTH);
+ fDescriptionText.setBackground(comp.getBackground());
+ GridData gd = (GridData) fDescriptionText.getLayoutData();
+ gd.widthHint = 200;
+ getTableViewer().getTable().addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {}
+ public void widgetSelected(SelectionEvent e) {
+ Object o = e.item.getData();
+ if(o instanceof LaunchShortcutExtension) {
+ String txt = ((LaunchShortcutExtension)o).getShortcutDescription();
+ fDescriptionText.setText((txt == null ? LaunchConfigurationsMessages.LaunchShortcutSelectionDialog_3 : txt));
+ }
+ }
+ });
}
catch(CoreException ce) {DebugUIPlugin.log(ce);}
return comp;

Back to the top