Author: snjeza
Date: 2009-07-16 21:39:28 -0400 (Thu, 16 Jul 2009)
New Revision: 16608
Modified:
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.core/plugin.xml
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamVersion.java
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
branches/jbosstools-3.0.x/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4585 Integrate Seam 2.2 for EAP/AS 5
Modified: branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.core/plugin.xml
===================================================================
--- branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2009-07-17
00:34:35 UTC (rev 16607)
+++ branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2009-07-17
01:39:28 UTC (rev 16608)
@@ -135,6 +135,36 @@
</or>
</constraint>
</project-facet-version>
+ <project-facet-version
+ facet="jst.seam"
+ version="2.2">
+ <constraint>
+ <or>
+ <requires
+ facet="jst.ear"
+ version="[5.0">
+ </requires>
+ <requires
+ facet="jst.ejb"
+ version="[3.0">
+ </requires>
+ <and>
+ <requires
+ facet="jst.web"
+ version="[2.5">
+ </requires>
+ <requires
+ facet="jst.jsf"
+ version="[1.2">
+ </requires>
+ <requires
+ facet="jst.java"
+ version="[5.0">
+ </requires>
+ </and>
+ </or>
+ </constraint>
+ </project-facet-version>
<action
facet="jst.seam"
id="jst.seam.1.2.install"
@@ -170,9 +200,21 @@
<config-factory
class="org.jboss.tools.seam.internal.core.project.facet.SeamFacetInstallDataModelProvider">
</config-factory>
- </action>
+ </action>
<action
facet="jst.seam"
+ id="jst.seam.2.2.install"
+ type="install"
+ version="2.2">
+ <delegate
+
class="org.jboss.tools.seam.internal.core.project.facet.Seam2FacetInstallDelegate">
+ </delegate>
+ <config-factory
+
class="org.jboss.tools.seam.internal.core.project.facet.SeamFacetInstallDataModelProvider">
+ </config-factory>
+ </action>
+ <action
+ facet="jst.seam"
id="jst.seam.1.2.uninstall"
type="uninstall"
version="1.2">
@@ -261,6 +303,17 @@
Configures a Dynamic Web application to use Seam v2.1
</description>
</static-preset>
+ <static-preset
+ id="jst.seam22.preset">
+ <label>Dynamic Web Project with Seam 2.2 (technology preview)</label>
+ <facet id="jst.java" version="5.0"/>
+ <facet id="jst.web" version="2.5"/>
+ <facet id="jst.jsf" version="1.2"/>
+ <facet id="jst.seam" version="2.2"/>
+ <description>
+ Configures a Dynamic Web application to use Seam v2.2
+ </description>
+ </static-preset>
</extension>
<extension
Modified:
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamVersion.java
===================================================================
---
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamVersion.java 2009-07-17
00:34:35 UTC (rev 16607)
+++
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamVersion.java 2009-07-17
01:39:28 UTC (rev 16608)
@@ -32,8 +32,13 @@
/**
* Seam versions 2.1.X
*/
- SEAM_2_1("2.1"); //$NON-NLS-1$
+ SEAM_2_1("2.1"), //$NON-NLS-1$
+ /**
+ * Seam versions 2.2.X
+ */
+ SEAM_2_2("2.2"); //$NON-NLS-1$
+
String version = ""; //$NON-NLS-1$
SeamVersion(String version) {
@@ -50,7 +55,7 @@
return version;
}
- public static SeamVersion[] ALL_VERSIONS = new SeamVersion[]{SEAM_1_2, SEAM_2_0,
SEAM_2_1};
+ public static SeamVersion[] ALL_VERSIONS = new SeamVersion[]{SEAM_1_2, SEAM_2_0,
SEAM_2_1, SEAM_2_2};
/**
* Get enumeration by string
@@ -68,6 +73,8 @@
return SEAM_2_0;
} else if (SEAM_2_1.toString().equals(version)) {
return SEAM_2_1;
+ } else if (SEAM_2_2.toString().equals(version)) {
+ return SEAM_2_2;
}
throw new IllegalArgumentException(NLS.bind(
"Seam version ''{0}'' is not supported", version));
//$NON-NLS-1$ //$NON-NLS-2$
@@ -89,6 +96,8 @@
return SEAM_2_0;
} else if (SEAM_2_1.toString().equals(version)) {
return SEAM_2_1;
+ } else if (SEAM_2_2.toString().equals(version)) {
+ return SEAM_2_2;
}
return null;
}
Modified:
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java
===================================================================
---
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java 2009-07-17
00:34:35 UTC (rev 16607)
+++
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java 2009-07-17
01:39:28 UTC (rev 16608)
@@ -166,9 +166,9 @@
testSrcDir, //$NON-NLS-1$
new FilterSetCollection(filterSet), true);
- // Add "org.jboss.seam.core.init.debug=false" for Seam 2.1
+ // Add "org.jboss.seam.core.init.debug=false" for Seam 2.1/2.2
// to seam.properties file to avoid
https://jira.jboss.org/jira/browse/JBIDE-3623
- if(getVersion() == SeamVersion.SEAM_2_1) {
+ if(getVersion() == SeamVersion.SEAM_2_1 || getVersion() == SeamVersion.SEAM_2_2) {
Properties seamProperties = new Properties();
File testSeamPropertiesFile = new File(testSrcDir, "seam.properties");
FileInputStream inStream = null;
Modified: branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2009-07-17
00:34:35 UTC (rev 16607)
+++ branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2009-07-17
01:39:28 UTC (rev 16608)
@@ -109,6 +109,9 @@
<wizard-pages action="jst.seam.2.1.install">
<page
class="org.jboss.tools.seam.ui.internal.project.facet.SeamInstallWizardPage"/>
</wizard-pages>
+ <wizard-pages action="jst.seam.2.2.install">
+ <page
class="org.jboss.tools.seam.ui.internal.project.facet.SeamInstallWizardPage"/>
+ </wizard-pages>
</extension>
<extension
point="org.eclipse.ui.views">
Modified:
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java
===================================================================
---
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java 2009-07-17
00:34:35 UTC (rev 16607)
+++
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java 2009-07-17
01:39:28 UTC (rev 16608)
@@ -980,6 +980,9 @@
if(vs.matches(SeamVersion.SEAM_2_1.toString().replace(".", "\\.") +
".*")) {
return SeamVersion.SEAM_2_1;
}
+ if(vs.matches(SeamVersion.SEAM_2_2.toString().replace(".", "\\.") +
".*")) {
+ return SeamVersion.SEAM_2_2;
+ }
return null;
}
Modified:
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
===================================================================
---
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2009-07-17
00:34:35 UTC (rev 16607)
+++
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2009-07-17
01:39:28 UTC (rev 16608)
@@ -473,12 +473,14 @@
Arrays.asList(new String[] {
SeamVersion.SEAM_1_2.toString(),
SeamVersion.SEAM_2_0.toString(),
- SeamVersion.SEAM_2_1.toString()}),
+ SeamVersion.SEAM_2_1.toString(),
+ SeamVersion.SEAM_2_2.toString()}),
SeamVersion.SEAM_1_2.toString(), false);
this.validSeamVersions = new ArrayList<SeamVersion>();
this.validSeamVersions.add(SeamVersion.SEAM_1_2);
this.validSeamVersions.add(SeamVersion.SEAM_2_0);
this.validSeamVersions.add(SeamVersion.SEAM_2_1);
+ this.validSeamVersions.add(SeamVersion.SEAM_2_2);
} else {
this.version = IFieldEditorFactory.INSTANCE.createComboEditor(
SRT_VERSION,
Modified:
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
===================================================================
---
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2009-07-17
00:34:35 UTC (rev 16607)
+++
branches/jbosstools-3.0.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2009-07-17
01:39:28 UTC (rev 16608)
@@ -122,7 +122,8 @@
wc.setAttribute(HibernateLaunchConstants.ATTR_AUTOMATIC_MANY_TO_MANY, true);
wc.setAttribute(HibernateLaunchConstants.ATTR_AUTOMATIC_VERSIONING, true);
- boolean seam21 =
seamProject.getRuntime().getVersion().compareTo(SeamVersion.SEAM_2_1) >= 0;
+ boolean seam21 =
seamProject.getRuntime().getVersion().compareTo(SeamVersion.SEAM_2_1) >= 0 ||
+ seamProject.getRuntime().getVersion().compareTo(SeamVersion.SEAM_2_2) >= 0;
// Only Seam 2.1 does not break when generating from one-to-one
wc.setAttribute(HibernateLaunchConstants.ATTR_AUTOMATIC_ONE_TO_ONE, seam21);
}
Modified:
branches/jbosstools-3.0.x/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
===================================================================
---
branches/jbosstools-3.0.x/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2009-07-17
00:34:35 UTC (rev 16607)
+++
branches/jbosstools-3.0.x/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2009-07-17
01:39:28 UTC (rev 16608)
@@ -199,6 +199,8 @@
creator = new Seam2ProjectCreator(config, proj);
} else if(seamVersion == SeamVersion.SEAM_2_1) {
creator = new Seam2ProjectCreator(config, proj);
+ } else if(seamVersion == SeamVersion.SEAM_2_2) {
+ creator = new Seam2ProjectCreator(config, proj);
} else {
throw new RuntimeException("Can't get seam version from seam facet
model");
}