Author: vrubezhny
Date: 2007-11-12 10:29:09 -0500 (Mon, 12 Nov 2007)
New Revision: 4850
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1282 Configured Server is not selected by default
in Seam Wizard
Issue is fixed
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java 2007-11-12
14:58:15 UTC (rev 4849)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java 2007-11-12
15:29:09 UTC (rev 4850)
@@ -97,6 +97,18 @@
FacetDataModelMap map = (FacetDataModelMap) getProperty(FACET_DM_MAP);
IDataModel seamFacet = map.getFacetDataModel( ISeamCoreConstants.SEAM_CORE_FACET_ID
);
seamFacet.setProperty( ISeamFacetDataModelProperties.JBOSS_AS_TARGET_RUNTIME,
propertyValue );
+
+ if (propertyValue != null) {
+ // Fixes the empty/wrong server
+ IServer server =
(IServer)model.getProperty(ISeamFacetDataModelProperties.JBOSS_AS_TARGET_SERVER);
+ if (!validateServer(server).isOK()) {
+ List<IServer> servers = getServers(getRuntimeName(propertyValue));
+ if (servers != null && !servers.isEmpty()) {
+ setProperty(ISeamFacetDataModelProperties.JBOSS_AS_TARGET_SERVER, servers.get(0));
+ }
+ }
+ }
+
} else if (propertyName.equals(ISeamFacetDataModelProperties.JBOSS_AS_TARGET_SERVER))
{
FacetDataModelMap map = (FacetDataModelMap) getProperty(FACET_DM_MAP);
IDataModel seamFacet = map.getFacetDataModel( ISeamCoreConstants.SEAM_CORE_FACET_ID
);