Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Bullen2017-07-27 14:50:47 +0000
committerSarika Sinha2017-11-15 04:15:57 +0000
commitcd4345d7a9f4cafc45a6fdf3d6d5659e789344b3 (patch)
tree473f987e0206fd8fc126f2046492a148def8145e
parentb0c421cc0ab2317b92e06de22806f6252c1bd552 (diff)
downloadeclipse.platform.debug-cd4345d7a9f4cafc45a6fdf3d6d5659e789344b3.tar.gz
eclipse.platform.debug-cd4345d7a9f4cafc45a6fdf3d6d5659e789344b3.tar.xz
eclipse.platform.debug-cd4345d7a9f4cafc45a6fdf3d6d5659e789344b3.zip
Bug 518652 - Provide "export" right click menu for launch configurationsI20171117-2000I20171116-2000
Ian: Export can be activated with a right click menu. Selecting any configs will allow it to be automatically selected in the wizard. Lucas: Enable Finish when wizard is opened completed New icons Buttons added to top of Configuration Dialog Change-Id: I75436d5b7d1ab2a6c62e4890ca61622ac652b5d4 Signed-off-by: Lucas Bullen <lbullen@redhat.com>
-rw-r--r--org.eclipse.debug.ui/icons/full/dlcl16/export_config.pngbin0 -> 759 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/dlcl16/export_config@2x.pngbin0 -> 1710 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/elcl16/export_config.pngbin0 -> 801 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/elcl16/export_config@2x.pngbin0 -> 1860 bytes
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizard.java19
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java21
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ExportLaunchConfigurationAction.java69
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java9
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java13
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties6
14 files changed, 141 insertions, 8 deletions
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/export_config.png b/org.eclipse.debug.ui/icons/full/dlcl16/export_config.png
new file mode 100644
index 000000000..1a841886b
--- /dev/null
+++ b/org.eclipse.debug.ui/icons/full/dlcl16/export_config.png
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/export_config@2x.png b/org.eclipse.debug.ui/icons/full/dlcl16/export_config@2x.png
new file mode 100644
index 000000000..333d929d7
--- /dev/null
+++ b/org.eclipse.debug.ui/icons/full/dlcl16/export_config@2x.png
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/export_config.png b/org.eclipse.debug.ui/icons/full/elcl16/export_config.png
new file mode 100644
index 000000000..5d044ab69
--- /dev/null
+++ b/org.eclipse.debug.ui/icons/full/elcl16/export_config.png
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/export_config@2x.png b/org.eclipse.debug.ui/icons/full/elcl16/export_config@2x.png
new file mode 100644
index 000000000..13c08eea6
--- /dev/null
+++ b/org.eclipse.debug.ui/icons/full/elcl16/export_config@2x.png
Binary files differ
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
index 3f70b31ad..b1d01231a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
@@ -11,6 +11,7 @@
* QNX Software Systems - Mikhail Khodjaiants - Bug 114664
* Wind River Systems - Pawel Piech - Added Modules view (bug 211158)
* Lars.Vogel <Lars.Vogel@gmail.com> - Bug 430620
+ * Lucas Bullen <lbullen@redhat.com> - Bug 518652
*******************************************************************************/
package org.eclipse.debug.internal.ui;
@@ -129,6 +130,7 @@ public class DebugPluginImages {
declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_NEXT_THREAD, DLCL+"next_thread_nav.png"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_PREVIOUS_THREAD, DLCL+"prev_thread_nav.png"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_RESTART, DLCL+"restart_co.png"); //$NON-NLS-1$
+ declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_EXPORT_CONFIG, DLCL + "export_config.png"); //$NON-NLS-1$
// enabled local toolbars
declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE, ELCL + "toggledetailpane_co.png"); //$NON-NLS-1$
@@ -169,6 +171,7 @@ public class DebugPluginImages {
declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_NEXT_THREAD, ELCL+"next_thread_nav.png"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_PREVIOUS_THREAD, ELCL+"prev_thread_nav.png"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_RESTART, ELCL+"restart_co.png"); //$NON-NLS-1$
+ declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_EXPORT_CONFIG, ELCL + "export_config.png"); //$NON-NLS-1$
//Object
declareRegistryImage(IDebugUIConstants.IMG_OBJS_LAUNCH_DEBUG, OBJECT + "ldebug_obj.png"); //$NON-NLS-1$
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java
index 32435910e..093a9648c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* QNX Software Systems - Mikhail Khodjaiants - Bug 114664
* Wind River Systems - Pawel Piech - Added Modules view (bug 211158)
+ * Lucas Bullen (Red Hat Inc.) - Bug 518652
*******************************************************************************/
package org.eclipse.debug.internal.ui;
@@ -81,6 +82,7 @@ public interface IInternalDebugUIConstants {
public static final String IMG_DLCL_NEXT_THREAD = "IMG_DLCL_NEXT_THREAD"; //$NON-NLS-1$
public static final String IMG_DLCL_PREVIOUS_THREAD = "IMG_DLCL_PREVIOUS_THREAD"; //$NON-NLS-1$
public static final String IMG_DLCL_RESTART = "IMG_DLCL_RESTART"; //$NON-NLS-1$
+ public static final String IMG_DLCL_EXPORT_CONFIG = "IMG_DLCL_EXPORT_CONFIG"; //$NON-NLS-1$
//TODO: Move this IDebugUIConstants. Created too late in 3.2 cycle to add API.
//The enabled icon is already API.
@@ -128,6 +130,7 @@ public interface IInternalDebugUIConstants {
public static final String IMG_ELCL_PREVIOUS_THREAD = "IMG_ELCL_PREVIOUS_THREAD"; //$NON-NLS-1$
public static final String IMG_ELCL_RESTART = "IMG_ELCL_RESTART"; //$NON-NLS-1$
public static final String IMG_ELCL_DEBUG_VIEW_COMPACT_LAYOUT = "IMG_ELCL_DEBUG_VIEW_BREADCRUMB_LAYOUT"; //$NON-NLS-1$
+ public static final String IMG_ELCL_EXPORT_CONFIG = "IMG_ELCL_EXPORT_CONFIG"; //$NON-NLS-1$
public static final String IMG_OBJS_COMMON_TAB = "IMG_OBJS_COMMON_TAB"; //$NON-NLS-1$
public static final String IMG_OBJS_REFRESH_TAB = "IMG_OBJS_REFRESH_TAB"; //$NON-NLS-1$
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizard.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizard.java
index 55f3b0dc3..db37ced0a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizard.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizard.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 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
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Ian Pun (Red Hat Inc.) - Bug 518652
*******************************************************************************/
package org.eclipse.debug.internal.ui.importexport.launchconfigurations;
@@ -27,6 +28,7 @@ import org.eclipse.ui.IWorkbench;
public class ExportLaunchConfigurationsWizard extends Wizard implements IExportWizard {
private String EXPORT_DIALOG_SETTINGS = "ExportLaunchConfigurations"; //$NON-NLS-1$
+ private IStructuredSelection selectedElements;
/**
* Constructor
@@ -36,17 +38,28 @@ public class ExportLaunchConfigurationsWizard extends Wizard implements IExportW
DebugUIPlugin plugin = DebugUIPlugin.getDefault();
IDialogSettings workbenchSettings = plugin.getDialogSettings();
IDialogSettings section = workbenchSettings.getSection(EXPORT_DIALOG_SETTINGS);
- if (section == null)
+ if (section == null) {
section = workbenchSettings.addNewSection(EXPORT_DIALOG_SETTINGS);
+ }
setDialogSettings(section);
}
+ public ExportLaunchConfigurationsWizard(IStructuredSelection selection) {
+ this();
+ selectedElements = selection;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#addPages()
*/
@Override
public void addPages() {
- IWizardPage page = new ExportLaunchConfigurationsWizardPage();
+ IWizardPage page;
+ if (selectedElements == null) {
+ page = new ExportLaunchConfigurationsWizardPage();
+ } else {
+ page = new ExportLaunchConfigurationsWizardPage(selectedElements);
+ }
addPage(page);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java
index ecd53cdb3..7425eb494 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 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
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 490755
+ * Lucas Bullen <lbullen@redhat.com> & Ian Pun <ipun@redhat.com> - Bug 518652
*******************************************************************************/
package org.eclipse.debug.internal.ui.importexport.launchconfigurations;
@@ -46,6 +47,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxTreeViewer;
import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
@@ -119,6 +121,7 @@ public class ExportLaunchConfigurationsWizardPage extends WizardPage {
private Text fFilePath = null;
private Button fOverwrite = null;
private ConfigContentProvider fContentProvider = null;
+ private IStructuredSelection selectedElements;
/**
* Constructor
*/
@@ -127,6 +130,11 @@ public class ExportLaunchConfigurationsWizardPage extends WizardPage {
setTitle(WizardMessages.ExportLaunchConfigurationsWizard_0);
}
+ protected ExportLaunchConfigurationsWizardPage(IStructuredSelection selection) {
+ this();
+ selectedElements = selection;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
@@ -142,8 +150,7 @@ public class ExportLaunchConfigurationsWizardPage extends WizardPage {
setControl(comp);
PlatformUI .getWorkbench().getHelpSystem().setHelp(comp, IDebugHelpContextIds.EXPORT_LAUNCH_CONFIGURATIONS_PAGE);
setMessage(WizardMessages.ExportLaunchConfigurationsWizardPage_7);
- //do not set page complete, Eclipse UI guidelines states wizards cannot start off with an error showing
- setPageComplete(false);
+ setPageComplete(isComplete());
}
/**
@@ -167,6 +174,14 @@ public class ExportLaunchConfigurationsWizardPage extends WizardPage {
//need to force load the children so that select all works initially
fViewer.expandAll();
fViewer.collapseAll();
+ if (selectedElements != null) {
+ Object[] checkedElements = selectedElements.toArray();
+ fViewer.setCheckedElements(checkedElements);
+ fViewer.setExpandedElements(checkedElements);
+ for (Object element : checkedElements) {
+ updateCheckedState(element);
+ }
+ }
fViewer.addCheckStateListener(new ICheckStateListener() {
@Override
public void checkStateChanged(CheckStateChangedEvent event) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ExportLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ExportLaunchConfigurationAction.java
new file mode 100644
index 000000000..697473ee0
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ExportLaunchConfigurationAction.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Red Hat Inc. 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Ian Pun & Lucas Bullen - Export Functionality based off of AbstractLaunchConfigurationAction
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.launchConfigurations;
+
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
+import org.eclipse.debug.internal.ui.importexport.launchconfigurations.ExportLaunchConfigurationsWizard;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.wizard.WizardDialog;
+
+public class ExportLaunchConfigurationAction extends AbstractLaunchConfigurationAction {
+ /**
+ * Action identifier for IDebugView#getAction(String)
+ */
+ public static final String ID_EXPORT_ACTION = DebugUIPlugin.getUniqueIdentifier() + ".ID_EXPORT_ACTION"; //$NON-NLS-1$
+
+ /**
+ * Constructs an action to export launch configuration(s)
+ */
+ public ExportLaunchConfigurationAction(Viewer viewer, String mode) {
+ super(LaunchConfigurationsMessages.ExportLaunchConfigurationAction_Export_1, viewer, mode);
+ }
+
+ @Override
+ protected void performAction() {
+ IStructuredSelection selection = getStructuredSelection();
+ ExportLaunchConfigurationsWizard wizard;
+ if (selection == null) {
+ wizard = new ExportLaunchConfigurationsWizard();
+ } else {
+ wizard = new ExportLaunchConfigurationsWizard(selection);
+ }
+ WizardDialog dialog = new WizardDialog(DebugUIPlugin.getShell(), wizard);
+ dialog.open();
+ }
+
+ @Override
+ protected boolean updateSelection(IStructuredSelection selection) {
+ return selection.size() > 0;
+ }
+
+ @Override
+ public ImageDescriptor getDisabledImageDescriptor() {
+ return DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_EXPORT_CONFIG);
+ }
+
+ @Override
+ public ImageDescriptor getImageDescriptor() {
+ return DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_EXPORT_CONFIG);
+ }
+
+ @Override
+ public String getToolTipText() {
+ return LaunchConfigurationsMessages.LaunchConfigurationsDialog_6;
+ }
+
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
index b07c9824b..f3ba24630 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* Mohamed Hussein (Mentor Graphics) - Added getWarningMessage (Bug 386673)
* Robert Roth - Used consistent apply button location (Bug 432832)
+ * Lucas Bullen (Red Hat Inc.) - Added export configuration message (Bug 518652)
*******************************************************************************/
package org.eclipse.debug.internal.ui.launchConfigurations;
@@ -346,6 +347,7 @@ public class LaunchConfigurationTabGroupViewer {
int width = parent.getBounds().width - 30;
SWTFactory.createWrapLabel(parent, LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_1, 1, width);
SWTFactory.createWrapCLabel(parent, LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_2, DebugUITools.getImage(IInternalDebugUIConstants.IMG_ELCL_NEW_CONFIG), 1, width);
+ SWTFactory.createWrapCLabel(parent, LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_7, DebugUITools.getImage(IInternalDebugUIConstants.IMG_ELCL_EXPORT_CONFIG), 1, width);
SWTFactory.createWrapCLabel(parent, LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_6, DebugUITools.getImage(IInternalDebugUIConstants.IMG_ELCL_DUPLICATE_CONFIG), 1, width);
SWTFactory.createWrapCLabel(parent, LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_4, DebugUITools.getImage(IInternalDebugUIConstants.IMG_ELCL_DELETE_CONFIG), 1, width);
SWTFactory.createWrapCLabel(parent, LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_8, DebugUITools.getImage(IInternalDebugUIConstants.IMG_ELCL_FILTER_CONFIGS), 1, width);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java
index 808033ff1..73f7087c1 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Ian Pun (Red Hat Inc.) - Bug 518652
*******************************************************************************/
package org.eclipse.debug.internal.ui.launchConfigurations;
@@ -77,6 +78,7 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc
private CreateLaunchConfigurationAction fCreateAction;
private DeleteLaunchConfigurationAction fDeleteAction;
private DuplicateLaunchConfigurationAction fDuplicateAction;
+ private ExportLaunchConfigurationAction fExportAction;
private CollapseAllLaunchConfigurationAction fCollapseAllAction;
/**
@@ -201,6 +203,9 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc
fDuplicateAction = new DuplicateLaunchConfigurationAction(getViewer(), getLaunchGroup().getMode());
setAction(DuplicateLaunchConfigurationAction.ID_DUPLICATE_ACTION, fDuplicateAction);
+ fExportAction = new ExportLaunchConfigurationAction(getViewer(), getLaunchGroup().getMode());
+ setAction(ExportLaunchConfigurationAction.ID_EXPORT_ACTION, fExportAction);
+
fCollapseAllAction = new CollapseAllLaunchConfigurationAction((TreeViewer)getViewer());
setAction(CollapseAllLaunchConfigurationAction.ID_COLLAPSEALL_ACTION, fCollapseAllAction);
@@ -223,6 +228,7 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc
@Override
protected void fillContextMenu(IMenuManager menu) {
menu.add(fCreateAction);
+ menu.add(fExportAction);
menu.add(fDuplicateAction);
menu.add(fDeleteAction);
menu.add(new Separator());
@@ -251,6 +257,7 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc
fCreateAction.dispose();
fDeleteAction.dispose();
fDuplicateAction.dispose();
+ fExportAction.dispose();
fFilterAction = null;
fCollapseAllAction = null;
getLaunchManager().removeLaunchConfigurationListener(this);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
index 22d5bef2d..3d3a9d78a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
@@ -516,6 +516,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
*/
protected void createToolbarActions(ToolBarManager tmanager) {
tmanager.add(getNewAction());
+ tmanager.add(getExportAction());
tmanager.add(getDuplicateAction());
tmanager.add(getDeleteAction());
tmanager.add(new Separator());
@@ -614,6 +615,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
}
};
getDuplicateAction().setConfirmationRequestor(requestor);
+ getExportAction().setConfirmationRequestor(requestor);
getNewAction().setConfirmationRequestor(requestor);
((StructuredViewer) viewer).addPostSelectionChangedListener(new ISelectionChangedListener() {
@Override
@@ -621,6 +623,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
handleLaunchConfigurationSelectionChanged(event);
getNewAction().setEnabled(getNewAction().isEnabled());
getDeleteAction().setEnabled(getDeleteAction().isEnabled());
+ getExportAction().setEnabled(getExportAction().isEnabled());
getDuplicateAction().setEnabled(getDuplicateAction().isEnabled());
}
});
@@ -801,6 +804,15 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
}
/**
+ * Gets the export menu action
+ *
+ * @return the export menu action
+ */
+ protected AbstractLaunchConfigurationAction getExportAction() {
+ return (AbstractLaunchConfigurationAction) fLaunchConfigurationView.getAction(ExportLaunchConfigurationAction.ID_EXPORT_ACTION);
+ }
+
+ /**
* Gets the help context id
*
* @return the help context id
@@ -1589,6 +1601,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
if (!fSettingInput) {
// New, Delete, & Duplicate toolbar actions
getNewAction().setEnabled(getNewAction().isEnabled());
+ getExportAction().setEnabled(getExportAction().isEnabled());
getDeleteAction().setEnabled(getDeleteAction().isEnabled());
getDuplicateAction().setEnabled(getDuplicateAction().isEnabled());
fTabViewer.refresh();
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 7e7b5dddd..eacb87f84 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
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM - Initial API and implementation
+ * Ian Pun & Lucas Bullen (Red Hat Inc.) - Bug 518652
*******************************************************************************/
package org.eclipse.debug.internal.ui.launchConfigurations;
@@ -137,6 +138,7 @@ public class LaunchConfigurationsMessages extends NLS {
public static String DeleteLaunchConfigurationAction_Dele_te_1;
public static String CreateLaunchConfigurationAction_Ne_w_1;
+ public static String ExportLaunchConfigurationAction_Export_1;
public static String CreateLaunchConfigurationAction_New_configuration_2;
public static String EnvironmentTab_Variable_1;
@@ -188,6 +190,7 @@ public class LaunchConfigurationsMessages extends NLS {
public static String LaunchConfigurationTabGroupViewer_4;
public static String LaunchConfigurationTabGroupViewer_5;
public static String LaunchConfigurationTabGroupViewer_6;
+ public static String LaunchConfigurationTabGroupViewer_7;
public static String SaveScopeResourcesHandler_1;
public static String SaveScopeResourcesHandler_2;
@@ -199,6 +202,7 @@ public class LaunchConfigurationsMessages extends NLS {
public static String LaunchConfigurationsDialog_1;
public static String LaunchConfigurationsDialog_4;
public static String LaunchConfigurationsDialog_5;
+ public static String LaunchConfigurationsDialog_6;
public static String FilterLaunchConfigurationAction_0;
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 fff4d4cca..72d08e819 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
@@ -4,9 +4,10 @@
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
-#
+#
# Contributors:
# IBM Corporation - initial API and implementation
+# Ian Pun & Lucas Bullen (Red Hat Inc.) - Bug 518652
###############################################################################
CommonTab__Browse_6=&Browse...
@@ -60,6 +61,7 @@ LaunchConfigurationTabGroupViewer_3=- Edit or view an existing configuration by
LaunchConfigurationTabGroupViewer_4=- Press the 'Delete' button to remove the selected configuration.
LaunchConfigurationTabGroupViewer_6=- Press the 'Duplicate' button to copy the selected configuration.
LaunchConfigurationTabGroupViewer_5=Configure launch perspective settings from the <a>'Perspectives'</a> preference page.
+LaunchConfigurationTabGroupViewer_7=- Press the 'Export' button to export the selected configurations.
LaunchConfigurationTabGroupViewer_8=- Press the 'Filter' button to configure filtering options.
LaunchConfigurationTabGroupViewer_13=Select a supported <a>launch mode</a>.
LaunchConfigurationTabGroupViewer_14=This configuration does not support some of the launch modes: {0}
@@ -104,6 +106,7 @@ LaunchConfigurationsDialog_0=New launch configuration
LaunchConfigurationsDialog_1=Delete selected launch configuration(s)
LaunchConfigurationsDialog_4=Filter launch configurations...
LaunchConfigurationsDialog_5=Duplicates the currently selected launch configuration
+LaunchConfigurationsDialog_6=Export launch configuration
LaunchConfigurationSelectionDialog_0=Select Configuration
LaunchConfigurationSelectionDialog_1=&Select a configuration to launch:
LaunchConfigurationView_0=Filter matched {0} of {1} items
@@ -148,6 +151,7 @@ DuplicateLaunchConfigurationAction__Duplicate_1=&Duplicate
DeleteLaunchConfigurationAction_Dele_te_1=Dele&te
CreateLaunchConfigurationAction_Ne_w_1=Ne&w
+ExportLaunchConfigurationAction_Export_1=E&xport
CreateLaunchConfigurationAction_New_configuration_2=New_configuration
EnvironmentTab_Variable_1=Variable

Back to the top