Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Swanson2003-12-04 18:16:42 +0000
committerDarin Swanson2003-12-04 18:16:42 +0000
commit00ab42f6718aca299bacb1a954af48525a7818f8 (patch)
treec2a37b32e3d005b3a7927f17066256981f2c7aa4 /org.eclipse.ui.externaltools/Program Tools Support
parent5dd0a3c5eb98cf501d9da7684cb8a69889f0bb01 (diff)
downloadeclipse.platform.debug-00ab42f6718aca299bacb1a954af48525a7818f8.tar.gz
eclipse.platform.debug-00ab42f6718aca299bacb1a954af48525a7818f8.tar.xz
eclipse.platform.debug-00ab42f6718aca299bacb1a954af48525a7818f8.zip
Bug 47246 - Anvtiew add file dialog should allow multi select
Diffstat (limited to 'org.eclipse.ui.externaltools/Program Tools Support')
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java
index e6db7b0d3..14db303de 100644
--- a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java
+++ b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java
@@ -13,6 +13,7 @@ package org.eclipse.ui.externaltools.internal.program.launchConfigurations;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsMainTab;
import org.eclipse.ui.externaltools.internal.model.IExternalToolsHelpContextIds;
@@ -30,15 +31,18 @@ public class ProgramMainTab extends ExternalToolsMainTab {
FileSelectionDialog dialog;
dialog = new FileSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), ExternalToolsProgramMessages.getString("ProgramMainTab.Select")); //$NON-NLS-1$
dialog.open();
- IFile file = dialog.getResult();
- if (file == null) {
+ IStructuredSelection result = dialog.getResult();
+ if (result == null) {
return;
}
- StringBuffer expression = new StringBuffer();
- expression.append("${workspace_loc:"); //$NON-NLS-1$
- expression.append(file.getFullPath().toString());
- expression.append("}"); //$NON-NLS-1$
- locationField.setText(expression.toString());
+ Object file= result.getFirstElement();
+ if (file instanceof IFile) {
+ StringBuffer expression = new StringBuffer();
+ expression.append("${workspace_loc:"); //$NON-NLS-1$
+ expression.append(((IFile)file).getFullPath().toString());
+ expression.append("}"); //$NON-NLS-1$
+ locationField.setText(expression.toString());
+ }
}

Back to the top