summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2013-08-06 14:51:48 (EDT)
committerCurtis Windatt2013-08-06 14:51:48 (EDT)
commitcf3470dd45607cbfe820e608832e194ef8a190b6 (patch)
treea1e1d3418758493e2220f1f65ab7fea4b056ec33
parent774fb838cad1a8fb4d66d52060553029141f5ddc (diff)
downloadeclipse.pde.ui-cf3470dd45607cbfe820e608832e194ef8a190b6.zip
eclipse.pde.ui-cf3470dd45607cbfe820e608832e194ef8a190b6.tar.gz
eclipse.pde.ui-cf3470dd45607cbfe820e608832e194ef8a190b6.tar.bz2
Bug 414502 - Exception trying to change EE on Eclipse App launchI20130806-2000
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/JREBlock.java29
1 files changed, 19 insertions, 10 deletions
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/JREBlock.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/JREBlock.java
index e909887..00441a8 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/JREBlock.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/JREBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 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
@@ -48,6 +48,7 @@ public class JREBlock {
private Text fBootstrap;
class Listener extends SelectionAdapter implements ModifyListener {
+ @Override
public void widgetSelected(SelectionEvent e) {
Object source = e.getSource();
// When a radio button selection changes, we get two events. One for the deselection of the old button and another for the selection
@@ -93,11 +94,15 @@ public class JREBlock {
fEePrefButton = new Button(parent, SWT.PUSH);
fEePrefButton.setText(PDEUIMessages.BasicLauncherTab_environments);
fEePrefButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
String currentEE = parseEESelection(fEeCombo.getText());
if (SWTFactory.showPreferencePage(fTab.getControl().getShell(), "org.eclipse.jdt.debug.ui.jreProfiles", null) == Window.OK) { //$NON-NLS-1$
- setEECombo();
- setEEComboSelection(currentEE);
+ // The launch dialog may have been closed while the preference page was open
+ if (!fTab.getControl().isDisposed()) {
+ setEECombo();
+ setEEComboSelection(currentEE);
+ }
}
}
});
@@ -114,18 +119,22 @@ public class JREBlock {
fJrePrefButton = new Button(parent, SWT.PUSH);
fJrePrefButton.setText(PDEUIMessages.BasicLauncherTab_installedJREs);
fJrePrefButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
String currentVM = fJreCombo.getText();
String currentEE = parseEESelection(fEeCombo.getText());
boolean useDefault = VMUtil.getDefaultVMInstallName().equals(currentVM);
if (SWTFactory.showPreferencePage(fTab.getControl().getShell(), "org.eclipse.jdt.debug.ui.preferences.VMPreferencePage", null) == Window.OK) { //$NON-NLS-1$
- setJRECombo();
- if (useDefault || fJreCombo.indexOf(currentVM) == -1)
- fJreCombo.setText(VMUtil.getDefaultVMInstallName());
- else
- fJreCombo.setText(currentVM);
- setEECombo();
- setEEComboSelection(currentEE);
+ // The launch dialog may have been closed while the preference page was open
+ if (!fTab.getControl().isDisposed()) {
+ setJRECombo();
+ if (useDefault || fJreCombo.indexOf(currentVM) == -1)
+ fJreCombo.setText(VMUtil.getDefaultVMInstallName());
+ else
+ fJreCombo.setText(currentVM);
+ setEECombo();
+ setEEComboSelection(currentEE);
+ }
}
}
});