Author: akazakov
Date: 2008-10-07 14:11:31 -0400 (Tue, 07 Oct 2008)
New Revision: 10719
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2731
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2008-10-07
16:44:16 UTC (rev 10718)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2008-10-07
18:11:31 UTC (rev 10719)
@@ -53,6 +53,7 @@
import org.eclipse.wst.common.project.facet.core.runtime.RuntimeManager;
import org.eclipse.wst.common.project.facet.ui.AbstractFacetWizardPage;
import org.eclipse.wst.common.project.facet.ui.IFacetWizardPage;
+import org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard;
import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
import org.hibernate.eclipse.console.utils.DriverClassHelpers;
import org.jboss.tools.seam.core.SeamCorePlugin;
@@ -154,6 +155,27 @@
}
/**
+ * This method is useful for seam facet modify wizard.
+ */
+ private void initModel() {
+ synchEditorsAndModel(jBossHibernateDbTypeEditor);
+// synchEditorsAndModel(jBossSeamHomeEditor);
+ synchEditorsAndModel(jBossAsDeployAsEditor);
+ synchEditorsAndModel(connProfileSelEditor);
+ synchEditorsAndModel(dbSchemaName);
+ synchEditorsAndModel(dbCatalogName);
+ synchEditorsAndModel(dbTablesExists);
+ synchEditorsAndModel(recreateTablesOnDeploy);
+ synchEditorsAndModel(sessionBeanPkgNameditor);
+ synchEditorsAndModel(entityBeanPkgNameditor);
+ synchEditorsAndModel(testsPkgNameditor);
+ }
+
+ private void synchEditorsAndModel(IFieldEditor editor) {
+ model.setProperty(editor.getName(), editor.getValue());
+ }
+
+ /**
* @return
*/
private String getDefaultDbType() {
@@ -248,6 +270,10 @@
model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_DIALECT,
HIBERNATE_HELPER.getDialectClass(jBossHibernateDbTypeEditor.getValueAsString()));
+
+ if(!isNewProjectWizard()) {
+ initModel();
+ }
}
/**
@@ -410,7 +436,7 @@
private boolean isNewProjectWizard() {
// ModifyFacetedProjectWizard or NewProjectDataModelFacetWizard
- return getWizard() instanceof NewProjectDataModelFacetWizard;
+ return getWizard()==null || getWizard() instanceof NewProjectDataModelFacetWizard;
}
/**