Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2012-10-30 14:09:44 -0400
committerLars Vogel2012-10-30 14:09:44 -0400
commitf6d0c6419addaf3651e395b837d0ba7bcfac6244 (patch)
tree1537ddd836a17ff467241230ac698bf3b4bef1d5
parent7d95ffbaeb320604aa5d2ac1c12021026dc8e51d (diff)
downloadorg.eclipse.e4.tools-f6d0c6419addaf3651e395b837d0ba7bcfac6244.tar.gz
org.eclipse.e4.tools-f6d0c6419addaf3651e395b837d0ba7bcfac6244.tar.xz
org.eclipse.e4.tools-f6d0c6419addaf3651e395b837d0ba7bcfac6244.zip
Bug 316345 - Applies the changes in PDE for the e4 tools copyI20121101-2200I20121030-2200
of the WizardPage PDE changed the PluginContentPage implementation in http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=fe8c42cffd5d1778fef3dcaba4719fab500c188e this commit does the same for the e4 tools
-rw-r--r--bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/PluginContentPage.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/PluginContentPage.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/PluginContentPage.java
index 6a1d0e9e..451f6706 100644
--- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/PluginContentPage.java
+++ b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/PluginContentPage.java
@@ -267,7 +267,17 @@ public class PluginContentPage extends ContentPage {
public void setVisible(boolean visible) {
if (visible) {
fMainPage.updateData();
+
+ 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();
@@ -341,7 +351,9 @@ public class PluginContentPage extends ContentPage {
* @param settings
*/
public void saveSettings(IDialogSettings 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