summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2013-08-19 10:46:06 (EDT)
committerCurtis Windatt2013-08-19 10:46:06 (EDT)
commit64804bff5da49be0d4e0e1540e1191c318f367b4 (patch)
treeb4f443f15dbde4ffa16fb364fd2dbc29f58c6d02
parente4d6ab7e6cd44f50cfb0f578b80789f1f6de7da2 (diff)
downloadeclipse.pde.ui-64804bff5da49be0d4e0e1540e1191c318f367b4.zip
eclipse.pde.ui-64804bff5da49be0d4e0e1540e1191c318f367b4.tar.gz
eclipse.pde.ui-64804bff5da49be0d4e0e1540e1191c318f367b4.tar.bz2
Bug 415346 - NPE when launching a .product not in the workspace
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDELauncherFormEditor.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDELauncherFormEditor.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDELauncherFormEditor.java
index 9467815..5e1bbfe 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDELauncherFormEditor.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDELauncherFormEditor.java
@@ -84,6 +84,7 @@ public abstract class PDELauncherFormEditor extends MultiSourceEditor {
LauncherAction[] result = new LauncherAction[elements.length];
for (int i = 0; i < elements.length; i++) {
LauncherAction thisAction = new LauncherAction(elements[i]) {
+ @Override
public void run() {
doSave(null);
String id = getConfigurationElement().getAttribute("id"); //$NON-NLS-1$
@@ -120,7 +121,8 @@ public abstract class PDELauncherFormEditor extends MultiSourceEditor {
try {
ILaunchShortcut shortcut = (ILaunchShortcut) elements[i].createExecutableExtension("class"); //$NON-NLS-1$
preLaunch.run();
- shortcut.launch(new StructuredSelection(launchObject), mode);
+ StructuredSelection selection = launchObject != null ? new StructuredSelection(launchObject) : StructuredSelection.EMPTY;
+ shortcut.launch(selection, mode);
} catch (CoreException e1) {
}
}