Author: dgolovin
Date: 2007-08-24 01:25:39 -0400 (Fri, 24 Aug 2007)
New Revision: 3312
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/widget/editor/LabelFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-673
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 2007-08-24
05:23:23 UTC (rev 3311)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-08-24
05:25:39 UTC (rev 3312)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.seam.ui.internal.project.facet;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -322,6 +324,12 @@
new PackageNameValidator(
sessionBeanPkgNameditor.getName(), "session beans"));
}
+
+ jBossAsDbTypeEditor.addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent evt) {
+ jBossHibernateDialectEditor.setValue(HIBERNATE_HELPER.getDialectClass(evt.getNewValue().toString()));
+ }
+ });
}
/**
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/LabelFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/LabelFieldEditor.java 2007-08-24
05:23:23 UTC (rev 3311)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/LabelFieldEditor.java 2007-08-24
05:25:39 UTC (rev 3312)
@@ -75,7 +75,6 @@
}
public void setValue(Object value) {
- // supress parent method
}
/* (non-Javadoc)
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java 2007-08-24
05:23:23 UTC (rev 3311)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java 2007-08-24
05:25:39 UTC (rev 3312)
@@ -36,7 +36,9 @@
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.internal.project.facet.IValidator;
import org.jboss.tools.seam.ui.internal.project.facet.ValidatorFactory;
+import org.jboss.tools.seam.ui.widget.editor.CompositeEditor;
import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
+import org.jboss.tools.seam.ui.widget.editor.LabelFieldEditor;
/**
* @author eskimo
@@ -70,7 +72,7 @@
List<IFieldEditor> editorOrder = new ArrayList<IFieldEditor>();
- /* (non-Javadoc)
+ /**
* @see
org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent) {
@@ -84,7 +86,9 @@
setErrorMessage(errors.get(IValidator.DEFAULT_ERROR).toString());
getEditor(IParameter.SEAM_BEAN_NAME).setEnabled(false);
} else if(isWar()) {
- getEditor(IParameter.SEAM_BEAN_NAME).setEnabled(false);
+ getEditor(IParameter.SEAM_BEAN_NAME).setEnabled(false);
+ LabelFieldEditor label =
(LabelFieldEditor)((CompositeEditor)getEditor(IParameter.SEAM_LOCAL_INTERFACE_NAME)).getEditors().get(0);
+ label.getLabelControl().setText("POJO class name:");
} else {
getEditor(IParameter.SEAM_BEAN_NAME).setEnabled(true);
}
@@ -184,7 +188,10 @@
String type =
SeamCorePlugin.getSeamFacetPreferences(project.getProject()).get(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,"war");
- getEditor(IParameter.SEAM_BEAN_NAME).setEnabled(!"war".equals(type));
+ getEditor(IParameter.SEAM_BEAN_NAME).setEnabled(!isWar());
+
+ LabelFieldEditor label =
(LabelFieldEditor)((CompositeEditor)getEditor(IParameter.SEAM_LOCAL_INTERFACE_NAME)).getEditors().get(0);
+ label.getLabelControl().setText(isWar()?"POJO class name:": "Local
interface:");
errors = ValidatorFactory.SEAM_COMPONENT_NAME_VALIDATOR.validate(
editorRegistry.get(IParameter.SEAM_COMPONENT_NAME).getValue(), null);