Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2012-09-19 20:41:22 +0000
committerCurtis Windatt2012-09-19 20:41:22 +0000
commitfe8c42cffd5d1778fef3dcaba4719fab500c188e (patch)
tree12bc07cf1ce224c064d8c94b3c3a719b5e7c4838
parent5208d137cb542a98cdcf215dabb1202857d04a0b (diff)
downloadeclipse.pde.ui-fe8c42cffd5d1778fef3dcaba4719fab500c188e.tar.gz
eclipse.pde.ui-fe8c42cffd5d1778fef3dcaba4719fab500c188e.tar.xz
eclipse.pde.ui-fe8c42cffd5d1778fef3dcaba4719fab500c188e.zip
Bug 316345 - New Plug-in wizard resets the "Generate an activator..." flagv20120919-204122
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/PluginContentPage.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/PluginContentPage.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/PluginContentPage.java
index 116374c082..6c9d37cfb7 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/PluginContentPage.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/PluginContentPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
@@ -295,8 +295,18 @@ public class PluginContentPage extends ContentPage {
public void setVisible(boolean visible) {
if (visible) {
fMainPage.updateData();
- fGenerateActivator.setSelection(!fData.isSimple());
+
+ boolean wasGenActivatorEnabled = fGenerateActivator.isEnabled();
fGenerateActivator.setEnabled(!fData.isSimple());
+ // if fGenerateActivator is disabled, set selection to false
+ if (!fGenerateActivator.isEnabled()) {
+ fGenerateActivator.setSelection(false);
+ }
+ // if the fGenerateActivator was disabled and is now enabled, then set the selection to true
+ else if (!wasGenActivatorEnabled) {
+ fGenerateActivator.setSelection(true);
+ }
+
fClassLabel.setEnabled(!fData.isSimple() && fGenerateActivator.getSelection());
fClassText.setEnabled(!fData.isSimple() && fGenerateActivator.getSelection());
boolean wasUIPluginEnabled = fUIPlugin.isEnabled();
@@ -368,7 +378,9 @@ public class PluginContentPage extends ContentPage {
*/
public void saveSettings(IDialogSettings settings) {
super.saveSettings(settings);
- settings.put(S_GENERATE_ACTIVATOR, !fGenerateActivator.getSelection());
+ if (fGenerateActivator.isEnabled()) {
+ settings.put(S_GENERATE_ACTIVATOR, !fGenerateActivator.getSelection());
+ }
if (fUIPlugin.isEnabled()) {
settings.put(S_UI_PLUGIN, !fUIPlugin.getSelection());
}

Back to the top