Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Duft2016-12-05 01:46:00 -0500
committerMarkus Duft2016-12-05 04:06:50 -0500
commitc004c5538dd6ff0ddc5032f687542bdf51ced43d (patch)
tree8a083c76b4ebb5b85aebfade310439099a08ead7
parent4c61e269c537cec92f62271e4a2de92435e2a9d7 (diff)
downloadeclipse.platform.debug-c004c5538dd6ff0ddc5032f687542bdf51ced43d.tar.gz
eclipse.platform.debug-c004c5538dd6ff0ddc5032f687542bdf51ced43d.tar.xz
eclipse.platform.debug-c004c5538dd6ff0ddc5032f687542bdf51ced43d.zip
CommonTabLite.SharedLocationSelectionDialog eleminatedI20161205-2000I20161205-0800
Should use ContainerSelectionDialog directly (@noextend) the same as CommonTab does it already. Bug: 508649 Change-Id: I8860c7160778c1e54b9a0c85a605c3b85ede2194 Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/CommonTabLite.java36
1 files changed, 13 insertions, 23 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/CommonTabLite.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/CommonTabLite.java
index 0c8f2cc88..087cc4e53 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/CommonTabLite.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/CommonTabLite.java
@@ -42,6 +42,7 @@ import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.debug.ui.ILaunchGroup;
+import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
@@ -65,7 +66,6 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.ContainerSelectionDialog;
@@ -84,27 +84,7 @@ import org.eclipse.ui.dialogs.ContainerSelectionDialog;
*/
class CommonTabLite extends AbstractLaunchConfigurationTab {
- /**
- * Provides a persistible dialog for selecting the shared project location
- * @since 3.2
- */
- class SharedLocationSelectionDialog extends ContainerSelectionDialog {
- private final String SETTINGS_ID = IDebugUIConstants.PLUGIN_ID + ".SHARED_LAUNCH_CONFIGURATON_DIALOG"; //$NON-NLS-1$
-
- public SharedLocationSelectionDialog(Shell parentShell, IContainer initialRoot, boolean allowNewContainerName, String message) {
- super(parentShell, initialRoot, allowNewContainerName, message);
- }
-
- @Override
- protected IDialogSettings getDialogBoundsSettings() {
- IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(SETTINGS_ID);
- if (section == null) {
- section = settings.addNewSection(SETTINGS_ID);
- }
- return section;
- }
- }
+ private final String SETTINGS_ID = IDebugUIConstants.PLUGIN_ID + ".SHARED_LAUNCH_CONFIGURATON_DIALOG"; //$NON-NLS-1$
/**
* This attribute exists solely for the purpose of making sure that invalid shared locations
@@ -260,11 +240,12 @@ class CommonTabLite extends AbstractLaunchConfigurationTab {
private void handleSharedLocationButtonSelected() {
String currentContainerString = fSharedLocationText.getText();
IContainer currentContainer = getContainer(currentContainerString);
- SharedLocationSelectionDialog dialog = new SharedLocationSelectionDialog(getShell(),
+ ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(),
currentContainer,
false,
LaunchConfigurationsMessages.CommonTab_Select_a_location_for_the_launch_configuration_13);
dialog.showClosedProjects(false);
+ dialog.setDialogBoundsSettings(getDialogBoundsSettings(), Dialog.DIALOG_PERSISTSIZE);
dialog.open();
Object[] results = dialog.getResult();
if ((results != null) && (results.length > 0) && (results[0] instanceof IPath)) {
@@ -274,6 +255,15 @@ class CommonTabLite extends AbstractLaunchConfigurationTab {
}
}
+ private IDialogSettings getDialogBoundsSettings() {
+ IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
+ IDialogSettings section = settings.getSection(SETTINGS_ID);
+ if (section == null) {
+ section = settings.addNewSection(SETTINGS_ID);
+ }
+ return section;
+ }
+
/**
* gets the container form the specified path
* @param path the path to get the container from

Back to the top