Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikas Chandra2020-08-03 08:31:51 +0000
committerVikas Chandra2020-08-03 09:20:18 +0000
commit5e36d7783af1034ac1c68259bc29d5f07406a001 (patch)
treefc851d7dd55d29cdc0110ccb9bfd25fbde004338
parentdb493ed3653a87f9a50fc419a5fbecafa024b160 (diff)
downloadeclipse.platform.debug-Y20200818-1200.tar.gz
eclipse.platform.debug-Y20200818-1200.tar.xz
eclipse.platform.debug-Y20200818-1200.zip
Change-Id: Iac53213a7c2684be750ba1dcc71b22c32a033cb2 Signed-off-by: Vikas Chandra <Vikas.Chandra@in.ibm.com>
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SaveScopeResourcesHandler.java19
1 files changed, 16 insertions, 3 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SaveScopeResourcesHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SaveScopeResourcesHandler.java
index 38350c96a..4cf54a11e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SaveScopeResourcesHandler.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SaveScopeResourcesHandler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2017 IBM Corporation and others.
+ * Copyright (c) 2006, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -35,6 +35,7 @@ import org.eclipse.jface.viewers.IBaseLabelProvider;
import org.eclipse.jface.viewers.IContentProvider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@@ -49,7 +50,6 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.model.AdaptableList;
import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
/**
* Status handler to prompt for saving of resources prior to launching.
@@ -244,7 +244,7 @@ public class SaveScopeResourcesHandler implements IStatusHandler {
ScopedResourcesSelectionDialog lsd = new ScopedResourcesSelectionDialog(DebugUIPlugin.getShell(),
new AdaptableList(resources),
new WorkbenchContentProvider(),
- new WorkbenchLabelProvider());
+ new SaveResourceDialogWorkbenchLabelProvider());
lsd.setInitialSelections((Object[]) resources);
lsd.setTitle(LaunchConfigurationsMessages.SaveScopeResourcesHandler_3);
if(lsd.open() == IDialogConstants.CANCEL_ID) {
@@ -262,4 +262,17 @@ public class SaveScopeResourcesHandler implements IStatusHandler {
}
return IDialogConstants.OK_ID;
}
+
}
+
+
+class SaveResourceDialogWorkbenchLabelProvider extends LabelProvider {
+ @Override
+ public final String getText(Object element) {
+ if (element instanceof IResource) {
+ return ((IResource)element).getFullPath().toString();
+ }
+ return super.getText(element);
+ }
+
+} \ No newline at end of file

Back to the top