Author: snjeza
Date: 2009-09-13 17:39:20 -0400 (Sun, 13 Sep 2009)
New Revision: 17542
Modified:
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/preferences/SeamConfiguratorPreferencePage.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/preferences/JBossPortletPreferencePage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4871 JBoss Portlet preferences aren't saved
after restarting Eclipse
Modified:
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/preferences/SeamConfiguratorPreferencePage.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/preferences/SeamConfiguratorPreferencePage.java 2009-09-13
06:39:14 UTC (rev 17541)
+++
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/preferences/SeamConfiguratorPreferencePage.java 2009-09-13
21:39:20 UTC (rev 17542)
@@ -66,8 +66,14 @@
@Override
protected void performDefaults() {
configureSeamButton.setSelection(MavenSeamActivator.CONFIGURE_SEAM_VALUE);
+ configureSeamRuntimeButton.setSelection(MavenSeamActivator.CONFIGURE_SEAM_RUNTIME_VALUE);
+ configureSeamArtifactsButton.setSelection(MavenSeamActivator.CONFIGURE_SEAM_ARTIFACTS_VALUE);
IPreferenceStore store = MavenSeamActivator.getDefault().getPreferenceStore();
store.setValue(MavenSeamActivator.CONFIGURE_SEAM,
MavenSeamActivator.CONFIGURE_SEAM_VALUE);
+ store.setValue(MavenSeamActivator.CONFIGURE_SEAM_RUNTIME,
MavenSeamActivator.CONFIGURE_SEAM_RUNTIME_VALUE);
+ store.setValue(MavenSeamActivator.CONFIGURE_SEAM_ARTIFACTS,
MavenSeamActivator.CONFIGURE_SEAM_ARTIFACTS_VALUE);
+ configureSeamRuntimeButton.setEnabled(configureSeamButton.getSelection());
+ configureSeamArtifactsButton.setEnabled(configureSeamButton.getSelection());
super.performDefaults();
}
@@ -75,6 +81,8 @@
public boolean performOk() {
IPreferenceStore store = MavenSeamActivator.getDefault().getPreferenceStore();
store.setValue(MavenSeamActivator.CONFIGURE_SEAM, configureSeamButton.getSelection());
+ store.setValue(MavenSeamActivator.CONFIGURE_SEAM_RUNTIME,
configureSeamRuntimeButton.getSelection());
+ store.setValue(MavenSeamActivator.CONFIGURE_SEAM_ARTIFACTS,
configureSeamArtifactsButton.getSelection());
return super.performOk();
}
Modified:
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/preferences/JBossPortletPreferencePage.java
===================================================================
---
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/preferences/JBossPortletPreferencePage.java 2009-09-13
06:39:14 UTC (rev 17541)
+++
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/preferences/JBossPortletPreferencePage.java 2009-09-13
21:39:20 UTC (rev 17542)
@@ -39,13 +39,17 @@
@Override
protected void performDefaults() {
button.setSelection(PortletCoreActivator.DEFAULT_CHECK_RUNTIMES);
+ Preferences preferences = PortletCoreActivator.getDefault().getPluginPreferences();
+ preferences.setValue(PortletCoreActivator.CHECK_RUNTIMES,
PortletCoreActivator.DEFAULT_CHECK_RUNTIMES);
+ PortletCoreActivator.getDefault().savePluginPreferences();
super.performDefaults();
}
@Override
public boolean performOk() {
Preferences preferences = PortletCoreActivator.getDefault().getPluginPreferences();
- preferences.setDefault(PortletCoreActivator.CHECK_RUNTIMES, button.getSelection());
+ preferences.setValue(PortletCoreActivator.CHECK_RUNTIMES, button.getSelection());
+ PortletCoreActivator.getDefault().savePluginPreferences();
return super.performOk();
}