Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 148229 Details for
Bug 252613
Define facet versions for the Java EE 6 projects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch v2
252613_patch_2.txt (text/plain), 72.92 KB, created by
Kaloyan Raev
on 2009-09-28 09:10:34 EDT
(
hide
)
Description:
patch v2
Filename:
MIME Type:
Creator:
Kaloyan Raev
Created:
2009-09-28 09:10:34 EDT
Size:
72.92 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.j2ee.jca >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.jca/plugin.xml,v >retrieving revision 1.41 >diff -u -r1.41 plugin.xml >--- plugin.xml 2 Feb 2009 20:14:29 -0000 1.41 >+++ plugin.xml 28 Sep 2009 13:12:02 -0000 >@@ -80,6 +80,7 @@ > <label>%CONN_FACET_LABEL</label> > <description>%CONN_FACET_DESCRIPTION</description> > <icon>icons/full/obj16/Connector.gif</icon> >+ <default-version version="1.5"/> > </project-facet> > > <project-facet-version facet="jst.connector" version="1.0"> >@@ -102,16 +103,26 @@ > <group-member id="modules"/> > </project-facet-version> > >- <action facet="jst.connector" version="1.0,1.5" type="INSTALL" id="jst.connector.install"> >+ <project-facet-version facet="jst.connector" version="1.6"> >+ <constraint> >+ <and> >+ <requires facet="jst.java" version="[5.0"/> >+ <conflicts group="modules"/> >+ </and> >+ </constraint> >+ <group-member id="modules"/> >+ </project-facet-version> >+ >+ <action facet="jst.connector" version="[1.0-1.6]" type="INSTALL" id="jst.connector.install"> > <delegate class="org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetInstallDelegate"/> > <config-factory class="org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetInstallDataModelProvider"/> > </action> > >- <event-handler facet="jst.connector" version="1.0,1.5" type="POST_INSTALL"> >+ <event-handler facet="jst.connector" version="[1.0-1.6]" type="POST_INSTALL"> > <delegate class="org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetPostInstallDelegate"/> > </event-handler> > >- <event-handler facet="jst.connector" version="1.0,1.5" type="RUNTIME_CHANGED"> >+ <event-handler facet="jst.connector" version="[1.0-1.6]" type="RUNTIME_CHANGED"> > <delegate class="org.eclipse.jst.j2ee.project.facet.J2EEFacetRuntimeChangedDelegate"/> > </event-handler> > >#P org.eclipse.jst.j2ee.core >Index: archive/org/eclipse/jst/jee/util/internal/JavaEEQuickPeek.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.core/archive/org/eclipse/jst/jee/util/internal/JavaEEQuickPeek.java,v >retrieving revision 1.11 >diff -u -r1.11 JavaEEQuickPeek.java >--- archive/org/eclipse/jst/jee/util/internal/JavaEEQuickPeek.java 10 Jun 2009 18:09:44 -0000 1.11 >+++ archive/org/eclipse/jst/jee/util/internal/JavaEEQuickPeek.java 28 Sep 2009 13:12:07 -0000 >@@ -173,6 +173,8 @@ > version = J2EEVersionConstants.J2EE_1_4_ID; > } else if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_5)) { > version = J2EEVersionConstants.JEE_5_0_ID; >+ } else if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_6)) { >+ version = J2EEVersionConstants.JEE_6_0_ID; > } > } > break; >@@ -190,6 +192,8 @@ > version = J2EEVersionConstants.J2EE_1_4_ID; > } else if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_5)) { > version = J2EEVersionConstants.JEE_5_0_ID; >+ } else if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_6)) { >+ version = J2EEVersionConstants.JEE_6_0_ID; > } > } > break; >@@ -205,6 +209,8 @@ > version = J2EEVersionConstants.EJB_2_1_ID; > } else if (schemaName.equals(J2EEConstants.EJBJAR_SCHEMA_3_0)) { > version = J2EEVersionConstants.EJB_3_0_ID; >+ } else if (schemaName.equals(J2EEConstants.EJBJAR_SCHEMA_3_1)) { >+ version = J2EEVersionConstants.EJB_3_1_ID; > } > } > break; >@@ -216,6 +222,8 @@ > } else if (schemaName != null) { > if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_5)) { > version = J2EEVersionConstants.JCA_1_5_ID; >+ } else if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_6)) { >+ version = J2EEVersionConstants.JCA_1_6_ID; > } > } > break; >@@ -231,6 +239,8 @@ > version = J2EEVersionConstants.WEB_2_4_ID; > } else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_2_5)) { > version = J2EEVersionConstants.WEB_2_5_ID; >+ } else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_3_0)) { >+ version = J2EEVersionConstants.WEB_3_0_ID; > } > } > break; >@@ -287,6 +297,10 @@ > break; > case J2EEVersionConstants.EJB_3_0_ID: > javaEEVersion = J2EEConstants.JEE_5_0_ID; >+ break; >+ case J2EEVersionConstants.EJB_3_1_ID: >+ javaEEVersion = J2EEConstants.JEE_6_0_ID; >+ break; > } > break; > case CONNECTOR_TYPE: >@@ -297,6 +311,9 @@ > case J2EEVersionConstants.JCA_1_5_ID: > javaEEVersion = J2EEConstants.J2EE_1_4_ID; > break; >+ case J2EEVersionConstants.JCA_1_6_ID: >+ javaEEVersion = J2EEConstants.JEE_6_0_ID; >+ break; > } > break; > case WEB_TYPE: >@@ -312,6 +329,10 @@ > break; > case J2EEVersionConstants.WEB_2_5_ID: > javaEEVersion = J2EEVersionConstants.JEE_5_0_ID; >+ break; >+ case J2EEVersionConstants.WEB_3_0_ID: >+ javaEEVersion = J2EEVersionConstants.JEE_6_0_ID; >+ break; > } > break; > case WEBSERVICES_TYPE: >Index: mofj2ee/org/eclipse/jst/j2ee/jca/internal/impl/ConnectorResourceImpl.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/jca/internal/impl/ConnectorResourceImpl.java,v >retrieving revision 1.7 >diff -u -r1.7 ConnectorResourceImpl.java >--- mofj2ee/org/eclipse/jst/j2ee/jca/internal/impl/ConnectorResourceImpl.java 9 Jun 2009 19:34:38 -0000 1.7 >+++ mofj2ee/org/eclipse/jst/j2ee/jca/internal/impl/ConnectorResourceImpl.java 28 Sep 2009 13:12:07 -0000 >@@ -170,6 +170,8 @@ > return J2EEVersionConstants.J2EE_1_3_ID; > case J2EEVersionConstants.JCA_1_5_ID : > return J2EEVersionConstants.J2EE_1_4_ID; >+ case J2EEVersionConstants.JCA_1_6_ID : >+ return J2EEVersionConstants.JEE_6_0_ID; > default : > return J2EEVersionConstants.J2EE_1_4_ID; > } >Index: commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/util/J2EEFileUtil.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/util/J2EEFileUtil.java,v >retrieving revision 1.5 >diff -u -r1.5 J2EEFileUtil.java >--- commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/util/J2EEFileUtil.java 2 Feb 2009 20:14:44 -0000 1.5 >+++ commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/util/J2EEFileUtil.java 28 Sep 2009 13:12:07 -0000 >@@ -294,10 +294,12 @@ > version = J2EEVersionConstants.J2EE_1_2_ID; > } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_3_TEXT)) { > version = J2EEVersionConstants.J2EE_1_3_ID; >- } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_4_TEXT)) { //EJB3 >+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_4_TEXT)) { > version = J2EEVersionConstants.J2EE_1_4_ID; >- } else if (versionAttr.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) { //EJB3 >- version = J2EEVersionConstants.JEE_5_0_ID; //EJB3 >+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) { >+ version = J2EEVersionConstants.JEE_5_0_ID; >+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_6_0_TEXT)) { >+ version = J2EEVersionConstants.JEE_6_0_ID; > } > } else if (isEJBJarFile(fileURI)) { > if (null == versionAttr) { >@@ -306,10 +308,12 @@ > version = J2EEVersionConstants.EJB_1_1_ID; > } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_0_TEXT)) { > version = J2EEVersionConstants.EJB_2_0_ID; >- } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_1_TEXT)) { //EJB3 >+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_1_TEXT)) { > version = J2EEVersionConstants.EJB_2_1_ID; >- } else if (versionAttr.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) { //EJB3 >- version = J2EEVersionConstants.EJB_3_0_ID; //EJB3 >+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) { >+ version = J2EEVersionConstants.EJB_3_0_ID; >+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_3_1_TEXT)) { >+ version = J2EEVersionConstants.EJB_3_1_ID; > } > } else if (isApplicationClientFile(fileURI)) { > if (null == versionAttr) { >@@ -320,8 +324,10 @@ > version = J2EEVersionConstants.J2EE_1_3_ID; > } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_4_TEXT)) { > version = J2EEVersionConstants.J2EE_1_4_ID; >- } else if (versionAttr.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) { //EJB3 >- version = J2EEVersionConstants.JEE_5_0_ID; //EJB3 >+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) { >+ version = J2EEVersionConstants.JEE_5_0_ID; >+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_6_0_TEXT)) { >+ version = J2EEVersionConstants.JEE_6_0_ID; > } > } else if (isWARFile(fileURI)) { > if (null == versionAttr) { >@@ -332,14 +338,20 @@ > version = J2EEVersionConstants.WEB_2_3_ID; > } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_4_TEXT)) { > version = J2EEVersionConstants.WEB_2_4_ID; >- } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_5_TEXT)) { //EJB3 >- version = J2EEVersionConstants.WEB_2_5_ID; //EJB3 >+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_5_TEXT)) { >+ version = J2EEVersionConstants.WEB_2_5_ID; >+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) { >+ version = J2EEVersionConstants.WEB_3_0_ID; > } > } else if (isRARFile(fileURI)) { > if (null == versionAttr) { > version = J2EEVersionConstants.JCA_1_5_ID; > } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_0_TEXT)) { > version = J2EEVersionConstants.JCA_1_0_ID; >+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_5_TEXT)) { >+ version = J2EEVersionConstants.JCA_1_5_ID; >+ } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_6_TEXT)) { >+ version = J2EEVersionConstants.JCA_1_6_ID; > } else { > version = J2EEVersionConstants.JCA_1_5_ID; > } >@@ -351,31 +363,41 @@ > private static int lookupVersion(String fileURI, String schemaName) { > int version = -1; > if (isEARFile(fileURI)) { >- if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_5)) { //EJB3 >- version = J2EEVersionConstants.JEE_5_0_ID; //EJB3 >+ if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_6)) { >+ version = J2EEVersionConstants.JEE_6_0_ID; >+ } else if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_5)) { >+ version = J2EEVersionConstants.JEE_5_0_ID; > } else if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_1_4)) { > version = J2EEVersionConstants.J2EE_1_4_ID; > } > } else if (isEJBJarFile(fileURI)) { >- if ((schemaName.indexOf(J2EEConstants.EJBJAR_SCHEMA_3_0_NS)) != -1) { //EJB3 >- version = J2EEVersionConstants.EJB_3_0_ID; //EJB3 >+ if ((schemaName.indexOf(J2EEConstants.EJBJAR_SCHEMA_3_1_NS)) != -1) { >+ version = J2EEVersionConstants.EJB_3_1_ID; >+ } else if ((schemaName.indexOf(J2EEConstants.EJBJAR_SCHEMA_3_0_NS)) != -1) { >+ version = J2EEVersionConstants.EJB_3_0_ID; > } else if ((schemaName.indexOf(J2EEConstants.EJBJAR_SCHEMA_2_1_NS)) != -1) { > version = J2EEVersionConstants.EJB_2_1_ID; > } > } else if (isApplicationClientFile(fileURI)) { >- if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_5)) { //EJB3 >- version = J2EEVersionConstants.JEE_5_0_ID; //EJB3 >+ if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_6)) { >+ version = J2EEVersionConstants.JEE_6_0_ID; >+ } else if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_5)) { >+ version = J2EEVersionConstants.JEE_5_0_ID; > } else if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_1_4)) { > version = J2EEVersionConstants.J2EE_1_4_ID; > } > } else if (isWARFile(fileURI)) { >- if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_2_5)) { //EJB3 >- version = J2EEVersionConstants.WEB_2_5_ID; //EJB3 >+ if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_3_0)) { >+ version = J2EEVersionConstants.WEB_3_0_ID; >+ } else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_2_5)) { >+ version = J2EEVersionConstants.WEB_2_5_ID; > } else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_2_4)) { > version = J2EEVersionConstants.WEB_2_4_ID; > } > } else if (isRARFile(fileURI)) { >- if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_5)) { >+ if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_6)) { >+ version = J2EEVersionConstants.JCA_1_6_ID; >+ } else if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_5)) { > version = J2EEVersionConstants.JCA_1_5_ID; > } > } >Index: mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBResourceImpl.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBResourceImpl.java,v >retrieving revision 1.9 >diff -u -r1.9 EJBResourceImpl.java >--- mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBResourceImpl.java 10 Jun 2009 17:44:50 -0000 1.9 >+++ mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBResourceImpl.java 28 Sep 2009 13:12:07 -0000 >@@ -155,6 +155,8 @@ > return J2EEVersionConstants.J2EE_1_4_ID; > case J2EEVersionConstants.EJB_3_0_ID : > return J2EEVersionConstants.JEE_5_0_ID; >+ case J2EEVersionConstants.EJB_3_1_ID : >+ return J2EEVersionConstants.JEE_6_0_ID; > default : > return J2EEVersionConstants.J2EE_1_4_ID; > } >@@ -178,6 +180,10 @@ > public void setModuleVersionID(int id) { > super.setVersionID(id); > switch (id) { >+ case (EJB_3_1_ID) : >+ super.setDoctypeValues(null, null); >+ primSetVersionID(EJB_3_1_ID); >+ break; > case (EJB_3_0_ID) : > super.setDoctypeValues(null, null); > primSetVersionID(EJB_3_0_ID); >@@ -204,6 +210,10 @@ > @Override > public void setJ2EEVersionID(int id) { > switch (id) { >+ case (JEE_6_0_ID) : >+ primSetDoctypeValues(null, null); >+ primSetVersionID(EJB_3_1_ID); >+ break; > case (JEE_5_0_ID) : > primSetDoctypeValues(null, null); > primSetVersionID(EJB_3_0_ID); >Index: mofj2ee/org/eclipse/jst/j2ee/internal/J2EEConstants.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEConstants.java,v >retrieving revision 1.19 >diff -u -r1.19 J2EEConstants.java >--- mofj2ee/org/eclipse/jst/j2ee/internal/J2EEConstants.java 25 Jun 2009 03:19:14 -0000 1.19 >+++ mofj2ee/org/eclipse/jst/j2ee/internal/J2EEConstants.java 28 Sep 2009 13:12:07 -0000 >@@ -51,7 +51,9 @@ > String APP_CLIENT_SYSTEMID_1_3 = "http://java.sun.com/dtd/application-client_1_3.dtd"; //$NON-NLS-1$ > String APP_CLIENT_ALT_SYSTEMID_1_3 = "http://java.sun.com/dtd/application-client_1.3.dtd"; //$NON-NLS-1$ > String APP_CLIENT_SCHEMA_1_4 = "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd";//$NON-NLS-1$ >- String APP_CLIENT_SCHEMA_5 = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd"; //$NON-NLS-1$ // EJB3 >+ String APP_CLIENT_SCHEMA_5 = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd"; //$NON-NLS-1$ >+ // The following is still set to the Java EE 5 schema, because to date the Java EE 6 one is not yet defined >+ String APP_CLIENT_SCHEMA_6 = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd"; //$NON-NLS-1$ // EJB3 > > //Application constants > /** "Application_ID" */ >@@ -75,7 +77,9 @@ > String APPLICATION_SYSTEMID_1_4 = "http://java.sun.com/dtd/application_1_4.dtd"; //$NON-NLS-1$ > String APPLICATION_ALT_SYSTEMID_1_4 = "http://java.sun.com/dtd/application_1_4.dtd"; //$NON-NLS-1$ > String APPLICATION_SCHEMA_1_4 = "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd";//$NON-NLS-1$ >- String APPLICATION_SCHEMA_5 = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"; //$NON-NLS-1$ // EJB3 >+ String APPLICATION_SCHEMA_5 = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"; //$NON-NLS-1$ >+ // The following is still set to the Java EE 5 schema, because to date the Java EE 6 one is not yet defined >+ String APPLICATION_SCHEMA_6 = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"; //$NON-NLS-1$ > > //EJB Jar Constants > /** "ejb-jar_ID" */ >@@ -97,8 +101,11 @@ > String EJBJAR_ALT_SYSTEMID_2_0 = "http://java.sun.com/dtd/ejb-jar_2.0.dtd"; //$NON-NLS-1$ > String EJBJAR_SCHEMA_2_1 = "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd";//$NON-NLS-1$ > String EJBJAR_SCHEMA_2_1_NS = "http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd";//$NON-NLS-1$ >- String EJBJAR_SCHEMA_3_0 = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"; //$NON-NLS-1$ // EJB3 >- String EJBJAR_SCHEMA_3_0_NS = "http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"; //$NON-NLS-1$ // EJB3 >+ String EJBJAR_SCHEMA_3_0 = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"; //$NON-NLS-1$ >+ String EJBJAR_SCHEMA_3_0_NS = "http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"; //$NON-NLS-1$ >+ // The following two are still set to the EJB 3.0 schema, because to date the EJB 3.1 one is not yet defined >+ String EJBJAR_SCHEMA_3_1 = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"; //$NON-NLS-1$ >+ String EJBJAR_SCHEMA_3_1_NS = "http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"; //$NON-NLS-1$ > > // EAR constants > >@@ -125,6 +132,8 @@ > String WEBAPP_ALT_SYSTEMID_2_3 = "http://java.sun.com/dtd/web-app_2.3.dtd"; //$NON-NLS-1$ > String WEBAPP_SCHEMA_2_4 = "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";//$NON-NLS-1$ > String WEBAPP_SCHEMA_2_5 = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";//$NON-NLS-1$ >+ // The following is still set to the Servlet 2.5 schema, because to date the Servlet 3.0 one is not yet defined >+ String WEBAPP_SCHEMA_3_0 = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";//$NON-NLS-1$ > //J2C Resource Adapter Constants > /** "J2CResourceAdapter_ID" */ > String RAR_ID = "J2CResourceAdapter_ID"; //$NON-NLS-1$ >@@ -140,7 +149,7 @@ > String CONNECTOR_SYSTEMID_1_0 = "http://java.sun.com/dtd/connector_1_0.dtd"; //$NON-NLS-1$ > String CONNECTOR_ALT_SYSTEMID_1_0 = "http://java.sun.com/dtd/connector_1.0.dtd"; //$NON-NLS-1$ > String CONNECTOR_SCHEMA_1_5 = "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd";//$NON-NLS-1$ >- >+ String CONNECTOR_SCHEMA_1_6 = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/connector_1_6.xsd";//$NON-NLS-1$ > //Web Services Constants > /** Doc type for webservices deployment descriptors */ > String WEB_SERVICES_CLIENT_DOCTYPE = "webservicesclient"; //$NON-NLS-1$ >Index: mofj2ee/org/eclipse/jst/j2ee/internal/J2EEVersionConstants.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEVersionConstants.java,v >retrieving revision 1.10 >diff -u -r1.10 J2EEVersionConstants.java >--- mofj2ee/org/eclipse/jst/j2ee/internal/J2EEVersionConstants.java 2 Feb 2009 20:14:44 -0000 1.10 >+++ mofj2ee/org/eclipse/jst/j2ee/internal/J2EEVersionConstants.java 28 Sep 2009 13:12:07 -0000 >@@ -31,15 +31,18 @@ > public int J2EE_1_3_ID = 13; > public int J2EE_1_4_ID = 14; > public int JEE_5_0_ID = 50; >+ public int JEE_6_0_ID = 60; > public int EJB_1_0_ID = 10; > public int EJB_1_1_ID = 11; > public int EJB_2_0_ID = 20; > public int EJB_2_1_ID = 21; > public int EJB_3_0_ID = 30; >+ public int EJB_3_1_ID = 31; > public int WEB_2_2_ID = 22; > public int WEB_2_3_ID = 23; > public int WEB_2_4_ID = 24; > public int WEB_2_5_ID = 25; >+ public int WEB_3_0_ID = 30; > public int TAGLIB_1_1_ID = 11; > public int TAGLIB_1_2_ID = 12; > public int TAGLIB_2_0_ID = 20; >@@ -50,8 +53,10 @@ > public int SERVLET_2_3 = 23; > public int SERVLET_2_4 = 24; > public int SERVLET_2_5 = 25; >+ public int SERVLET_3_0 = 30; > public int JCA_1_0_ID = 10; > public int JCA_1_5_ID = 15; >+ public int JCA_1_6_ID = 16; > public int WEBSERVICES_1_0_ID = 10; > public int WEBSERVICES_1_1_ID = 11; > public int WEBSERVICES_1_2_ID = 12; >@@ -65,6 +70,7 @@ > public int VERSION_1_3 = 13; > public int VERSION_1_4 = 14; > public int VERSION_1_5 = 15; >+ public int VERSION_1_6 = 16; > public int VERSION_2_0 = 20; > public int VERSION_2_1 = 21; > public int VERSION_2_2 = 22; >@@ -72,7 +78,9 @@ > public int VERSION_2_4 = 24; > public int VERSION_2_5 = 25; > public int VERSION_3_0 = 30; >+ public int VERSION_3_1 = 31; > public int VERSION_5_0 = 50; >+ public int VERSION_6_0 = 60; > > public String VERSION_1_0_TEXT = "1.0"; //$NON-NLS-1$ > public String VERSION_1_1_TEXT = "1.1"; //$NON-NLS-1$ >@@ -80,6 +88,7 @@ > public String VERSION_1_3_TEXT = "1.3"; //$NON-NLS-1$ > public String VERSION_1_4_TEXT = "1.4"; //$NON-NLS-1$ > public String VERSION_1_5_TEXT = "1.5"; //$NON-NLS-1$ >+ public String VERSION_1_6_TEXT = "1.6"; //$NON-NLS-1$ > public String VERSION_2_0_TEXT = "2.0"; //$NON-NLS-1$ > public String VERSION_2_1_TEXT = "2.1"; //$NON-NLS-1$ > public String VERSION_2_2_TEXT = "2.2"; //$NON-NLS-1$ >@@ -87,7 +96,9 @@ > public String VERSION_2_4_TEXT = "2.4"; //$NON-NLS-1$ > public String VERSION_2_5_TEXT = "2.5"; //$NON-NLS-1$ > public String VERSION_3_0_TEXT = "3.0"; //$NON-NLS-1$ >+ public String VERSION_3_1_TEXT = "3.1"; //$NON-NLS-1$ > public String VERSION_5_0_TEXT = "5.0"; //$NON-NLS-1$ >+ public String VERSION_6_0_TEXT = "6.0"; //$NON-NLS-1$ > public String VERSION_5_TEXT = "5"; //$NON-NLS-1$ > > } >#P org.eclipse.jst.j2ee.web >Index: webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java,v >retrieving revision 1.46 >diff -u -r1.46 WebFacetInstallDelegate.java >--- webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java 1 Jul 2009 21:44:32 -0000 1.46 >+++ webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java 28 Sep 2009 13:12:13 -0000 >@@ -109,7 +109,13 @@ > if (webroot.getProjectRelativePath().equals(new Path("/"))) //$NON-NLS-1$ > webroot.createLink(new Path("/" + model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER)), 0, null); //$NON-NLS-1$ > >- if( fv == WebFacetUtils.WEB_25 ) >+ if( fv == WebFacetUtils.WEB_30 ) >+ { >+ if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){ >+ createWeb30DeploymentDescriptor(project, fv, webinfFolder, monitor); >+ } >+ } >+ else if( fv == WebFacetUtils.WEB_25 ) > { > if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){ > createWeb25DeploymentDescriptor(project, fv, webinfFolder, monitor); >@@ -269,6 +275,24 @@ > return pjpath.append(model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER)); > } > >+ // This method still creates a web.xml with a Servlet 2.5 schema, because the Servlet 3.0 one is not yet defined >+ private void createWeb30DeploymentDescriptor(final IProject project, final IProjectFacetVersion fv, >+ IFolder webinfFolder, IProgressMonitor monitor) throws CoreException { >+ // Create the deployment descriptor (web.xml) if one doesn't exist >+ IFile webxmlFile = webinfFolder.getFile("web.xml"); //$NON-NLS-1$ >+ if (!webxmlFile.exists()) { >+ try { >+ // Create a minimal web.xml file, so the model can be initialized >+ final String webXmlContents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<web-app id=\"WebApp_ID\" version=\"2.5\" xmlns=\"http://java.sun.com/xml/ns/javaee\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd\">\n</web-app>"; //$NON-NLS-1$ >+ webxmlFile.create(new ByteArrayInputStream(webXmlContents.getBytes("UTF-8")), true, monitor); //$NON-NLS-1$ >+ >+ // TODO do some stuff with the module >+ } catch (UnsupportedEncodingException e) { >+ WebPlugin.logError(e); >+ } >+ } >+ } >+ > private void createWeb25DeploymentDescriptor(final IProject project, final IProjectFacetVersion fv, > IFolder webinfFolder, IProgressMonitor monitor) throws CoreException { > // Create the deployment descriptor (web.xml) if one doesn't exist >Index: webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetUtils.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetUtils.java,v >retrieving revision 1.10 >diff -u -r1.10 WebFacetUtils.java >--- webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetUtils.java 2 Feb 2009 20:14:25 -0000 1.10 >+++ webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetUtils.java 28 Sep 2009 13:12:13 -0000 >@@ -22,6 +22,7 @@ > public static final IProjectFacetVersion WEB_23 = WEB_FACET.getVersion("2.3"); //$NON-NLS-1$ > public static final IProjectFacetVersion WEB_24 = WEB_FACET.getVersion("2.4"); //$NON-NLS-1$ > public static final IProjectFacetVersion WEB_25 = WEB_FACET.getVersion("2.5"); //$NON-NLS-1$ >+ public static final IProjectFacetVersion WEB_30 = WEB_FACET.getVersion("3.0"); //$NON-NLS-1$ > > public static final IProjectFacet WEB_XDOCLET_FACET = getWebDocletFacet(); > >Index: webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDataModelProvider.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDataModelProvider.java,v >retrieving revision 1.48 >diff -u -r1.48 WebFacetInstallDataModelProvider.java >--- webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDataModelProvider.java 30 Jul 2009 20:52:44 -0000 1.48 >+++ webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDataModelProvider.java 28 Sep 2009 13:12:13 -0000 >@@ -18,6 +18,7 @@ > import org.eclipse.core.runtime.Path; > import org.eclipse.jst.common.project.facet.core.JavaFacetInstallConfig.ChangeEvent; > import org.eclipse.jst.j2ee.internal.J2EEConstants; >+import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; > import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil; > import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants; > import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin; >@@ -68,8 +69,8 @@ > String projectName = model.getStringProperty(FACET_PROJECT_NAME).replace(' ', '_'); > return projectName + IJ2EEModuleConstants.WAR_EXT; > } else if (propertyName.equals(GENERATE_DD)) { >- IProjectFacetVersion facetVersion = (IProjectFacetVersion)getProperty(FACET_VERSION); >- if(facetVersion == WebFacetUtils.WEB_25){ >+ String facetVersion = getStringProperty(FACET_VERSION_STR); >+ if(J2EEVersionUtil.convertVersionStringToInt(facetVersion) >= J2EEVersionConstants.WEB_2_5_ID) { > return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.DYNAMIC_WEB_GENERATE_DD)); > } > return Boolean.TRUE; >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.web/plugin.xml,v >retrieving revision 1.77 >diff -u -r1.77 plugin.xml >--- plugin.xml 2 Feb 2009 20:14:25 -0000 1.77 >+++ plugin.xml 28 Sep 2009 13:12:13 -0000 >@@ -418,17 +418,27 @@ > </constraint> > <group-member id="modules"/> > </project-facet-version> >+ >+ <project-facet-version facet="jst.web" version="3.0"> >+ <constraint> >+ <and> >+ <requires facet="jst.java" version="[5.0"/> >+ <conflicts group="modules"/> >+ </and> >+ </constraint> >+ <group-member id="modules"/> >+ </project-facet-version> > >- <action facet="jst.web" version="[2.2-2.5]" type="INSTALL" id="jst.web.install"> >+ <action facet="jst.web" version="[2.2-3.0]" type="INSTALL" id="jst.web.install"> > <delegate class="org.eclipse.jst.j2ee.web.project.facet.WebFacetInstallDelegate"/> > <config-factory class="org.eclipse.jst.j2ee.web.project.facet.WebFacetInstallDataModelProvider"/> > </action> > >- <event-handler facet="jst.web" version="[2.2-2.5]" type="RUNTIME_CHANGED"> >+ <event-handler facet="jst.web" version="[2.2-3.0]" type="RUNTIME_CHANGED"> > <delegate class="org.eclipse.jst.j2ee.web.project.facet.WebFacetRuntimeChangedDelegate"/> > </event-handler> > >- <event-handler type="POST_INSTALL" facet="jst.web" version="[2.2-2.5]"> >+ <event-handler type="POST_INSTALL" facet="jst.web" version="[2.2-3.0]"> > <delegate class="org.eclipse.jst.j2ee.web.project.facet.WebFacetPostInstallDelegate"/> > </event-handler> > >#P org.eclipse.jst.j2ee.ui >Index: j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientFacetInstallPage.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientFacetInstallPage.java,v >retrieving revision 1.12 >diff -u -r1.12 AppClientFacetInstallPage.java >--- j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientFacetInstallPage.java 9 Jun 2009 19:40:36 -0000 1.12 >+++ j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientFacetInstallPage.java 28 Sep 2009 13:12:15 -0000 >@@ -13,7 +13,9 @@ > > import org.eclipse.jface.dialogs.Dialog; > import org.eclipse.jst.j2ee.internal.J2EEConstants; >+import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; > import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds; >+import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil; > import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages; > import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage; > import org.eclipse.jst.j2ee.project.facet.IAppClientFacetInstallDataModelProperties; >@@ -59,7 +61,8 @@ > protected void handleFacetVersionChangedEvent() > { > final IProjectFacetVersion fv = (IProjectFacetVersion) this.model.getProperty( FACET_VERSION ); >- this.addDD.setVisible( fv == APPLICATION_CLIENT_50 ); >+ boolean isJEE5OrGreater = J2EEVersionUtil.convertVersionStringToInt(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID; >+ this.addDD.setVisible(isJEE5OrGreater); > } > > } >#P org.eclipse.jst.j2ee.ejb >Index: ejbcreation/org/eclipse/jst/j2ee/ejb/project/facet/EjbFacetInstallDelegate.java >=================================================================== >RCS file: /cvsroot/webtools/ejbtools/plugins/org.eclipse.jst.j2ee.ejb/ejbcreation/org/eclipse/jst/j2ee/ejb/project/facet/EjbFacetInstallDelegate.java,v >retrieving revision 1.45 >diff -u -r1.45 EjbFacetInstallDelegate.java >--- ejbcreation/org/eclipse/jst/j2ee/ejb/project/facet/EjbFacetInstallDelegate.java 10 Jun 2009 20:18:32 -0000 1.45 >+++ ejbcreation/org/eclipse/jst/j2ee/ejb/project/facet/EjbFacetInstallDelegate.java 28 Sep 2009 13:12:17 -0000 >@@ -100,7 +100,23 @@ > } > } > >- if( fv == IJ2EEFacetConstants.EJB_30 ) >+ if( fv == IJ2EEFacetConstants.EJB_31 ) >+ { >+ if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){ >+ // Create the deployment descriptor (ejb-jar.xml) if one doesn't exist >+ IFile ejbJarXmlFile = ejbFolder.getFile(J2EEConstants.EJBJAR_DD_URI); >+ if (!ejbJarXmlFile.exists()) { >+ try { >+ // The content is the one for EJB 3.0 DD, because to date the EJB 3.1 DD is not yet defined >+ final String ejbJarXmlContents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ejb-jar version=\"3.0\" xmlns=\"http://java.sun.com/xml/ns/javaee\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd\">\n <display-name> \n" + project.getName() +" </display-name> \n </ejb-jar>"; //$NON-NLS-1$ //$NON-NLS-2$ >+ ejbJarXmlFile.create(new ByteArrayInputStream(ejbJarXmlContents.getBytes("UTF-8")), true, monitor); //$NON-NLS-1$ >+ } catch (UnsupportedEncodingException e) { >+ EjbPlugin.logError(e); >+ } >+ } >+ } >+ } >+ else if( fv == IJ2EEFacetConstants.EJB_30 ) > { > if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){ > // Create the deployment descriptor (ejb-jar.xml) if one doesn't exist >@@ -163,4 +179,5 @@ > } > } > } >+ > } >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/webtools/ejbtools/plugins/org.eclipse.jst.j2ee.ejb/plugin.xml,v >retrieving revision 1.76 >diff -u -r1.76 plugin.xml >--- plugin.xml 2 Feb 2009 20:14:18 -0000 1.76 >+++ plugin.xml 28 Sep 2009 13:12:17 -0000 >@@ -185,17 +185,27 @@ > </constraint> > <group-member id="modules"/> > </project-facet-version> >+ >+ <project-facet-version facet="jst.ejb" version="3.1"> >+ <constraint> >+ <and> >+ <requires facet="jst.java" version="[5.0"/> >+ <conflicts group="modules"/> >+ </and> >+ </constraint> >+ <group-member id="modules"/> >+ </project-facet-version> > >- <action facet="jst.ejb" version="[1.1-3.0]" type="INSTALL" id="jst.ejb.install"> >+ <action facet="jst.ejb" version="[1.1-3.1]" type="INSTALL" id="jst.ejb.install"> > <delegate class="org.eclipse.jst.j2ee.ejb.project.facet.EjbFacetInstallDelegate"/> > <config-factory class="org.eclipse.jst.j2ee.internal.ejb.project.operations.EjbFacetInstallDataModelProvider"/> > </action> > >- <event-handler facet="jst.ejb" version="[1.1-3.0]" type="POST_INSTALL"> >+ <event-handler facet="jst.ejb" version="[1.1-3.1]" type="POST_INSTALL"> > <delegate class="org.eclipse.jst.j2ee.ejb.project.facet.EjbFacetPostInstallDelegate"/> > </event-handler> > >- <event-handler facet="jst.ejb" version="[1.1-3.0]" type="RUNTIME_CHANGED"> >+ <event-handler facet="jst.ejb" version="[1.1-3.1]" type="RUNTIME_CHANGED"> > <delegate class="org.eclipse.jst.j2ee.project.facet.J2EEFacetRuntimeChangedDelegate"/> > </event-handler> > >Index: ejbcreation/org/eclipse/jst/j2ee/internal/ejb/project/operations/EjbFacetInstallDataModelProvider.java >=================================================================== >RCS file: /cvsroot/webtools/ejbtools/plugins/org.eclipse.jst.j2ee.ejb/ejbcreation/org/eclipse/jst/j2ee/internal/ejb/project/operations/EjbFacetInstallDataModelProvider.java,v >retrieving revision 1.35 >diff -u -r1.35 EjbFacetInstallDataModelProvider.java >--- ejbcreation/org/eclipse/jst/j2ee/internal/ejb/project/operations/EjbFacetInstallDataModelProvider.java 25 Jun 2009 03:19:10 -0000 1.35 >+++ ejbcreation/org/eclipse/jst/j2ee/internal/ejb/project/operations/EjbFacetInstallDataModelProvider.java 28 Sep 2009 13:12:17 -0000 >@@ -15,6 +15,7 @@ > import org.eclipse.core.runtime.IPath; > import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.Path; >+import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; > import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil; > import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants; > import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin; >@@ -76,8 +77,8 @@ > if (getBooleanProperty(CREATE_CLIENT)) { > return Boolean.TRUE; > } >- IProjectFacetVersion facetVersion = (IProjectFacetVersion)getProperty(FACET_VERSION); >- if (facetVersion == EJB_30) { >+ String facetVersion = getStringProperty(FACET_VERSION_STR); >+ if (J2EEVersionUtil.convertVersionStringToInt(facetVersion) >= J2EEVersionConstants.EJB_3_0_ID) { > return J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.EJB_GENERATE_DD); > } > return Boolean.TRUE; >#P org.eclipse.jst.j2ee >Index: j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EEProjectUtilities.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EEProjectUtilities.java,v >retrieving revision 1.76 >diff -u -r1.76 J2EEProjectUtilities.java >--- j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EEProjectUtilities.java 23 Jul 2009 18:22:46 -0000 1.76 >+++ j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EEProjectUtilities.java 28 Sep 2009 13:12:27 -0000 >@@ -91,6 +91,7 @@ > import org.eclipse.wst.common.frameworks.internal.SimpleValidateEdit; > import org.eclipse.wst.common.project.facet.core.IFacetedProject; > import org.eclipse.wst.common.project.facet.core.IProjectFacet; >+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion; > import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager; > import org.eclipse.wst.server.core.IRuntime; > >@@ -996,7 +997,7 @@ > > /** > * @param project >- * @return true, if jee version 5.0 (or their respective ejb, web, app versions) >+ * @return true, if jee version 5.0 or later (or their respective ejb, web, app versions) > * , it must be noted that this method only looks at the facet & their versions to determine > * the jee level. It does not read deployment descriptors for performance reasons. > */ >@@ -1009,17 +1010,20 @@ > if (facetedProject == null) > return false; > if(isEARProject(facetedProject)){ >- IProjectFacet earFacet = ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_EAR_MODULE); >- ret = facetedProject.hasProjectFacet(earFacet.getVersion(J2EEVersionUtil.convertVersionIntToString(J2EEVersionConstants.JEE_5_0_ID))); >+ IProjectFacetVersion fv = facetedProject.getProjectFacetVersion(ENTERPRISE_APPLICATION_FACET); >+ ret = J2EEVersionUtil.convertVersionStringToInt(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID; > } else if(isDynamicWebProject(facetedProject)){ >- IProjectFacet webFacet = ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_WEB_MODULE); >- ret = facetedProject.hasProjectFacet(webFacet.getVersion(J2EEVersionUtil.convertVersionIntToString(J2EEVersionUtil.convertJ2EEVersionIDToWebVersionID(J2EEVersionConstants.JEE_5_0_ID)))); >+ IProjectFacetVersion fv = facetedProject.getProjectFacetVersion(DYNAMIC_WEB_FACET); >+ ret = J2EEVersionUtil.convertWebVersionStringToJ2EEVersionID(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID; > } else if(isEJBProject(facetedProject)){ >- IProjectFacet ejbFacet = ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_EJB_MODULE); >- ret = facetedProject.hasProjectFacet(ejbFacet.getVersion(J2EEVersionUtil.convertVersionIntToString(J2EEVersionUtil.convertJ2EEVersionIDToEJBVersionID(J2EEVersionConstants.JEE_5_0_ID)))); >+ IProjectFacetVersion fv = facetedProject.getProjectFacetVersion(EJB_FACET); >+ ret = J2EEVersionUtil.convertEJBVersionStringToJ2EEVersionID(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID; > } else if(isApplicationClientProject(facetedProject)){ >- IProjectFacet appFacet = ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_APPCLIENT_MODULE); >- ret = facetedProject.hasProjectFacet(appFacet.getVersion(J2EEVersionUtil.convertVersionIntToString(J2EEVersionConstants.JEE_5_0_ID))); >+ IProjectFacetVersion fv = facetedProject.getProjectFacetVersion(APPLICATION_CLIENT_FACET); >+ ret = J2EEVersionUtil.convertAppClientVersionStringToJ2EEVersionID(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID; >+ } else if (isJCAProject(facetedProject)){ >+ IProjectFacetVersion fv = facetedProject.getProjectFacetVersion(JCA_FACET); >+ ret = J2EEVersionUtil.convertConnectorVersionStringToJ2EEVersionID(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID; > } > } catch (CoreException e) { > J2EEPlugin.logError(e); >Index: archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEArchiveUtilities.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEArchiveUtilities.java,v >retrieving revision 1.30 >diff -u -r1.30 JavaEEArchiveUtilities.java >--- archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEArchiveUtilities.java 25 Jun 2009 03:18:47 -0000 1.30 >+++ archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEArchiveUtilities.java 28 Sep 2009 13:12:25 -0000 >@@ -190,6 +190,8 @@ > version = J2EEVersionConstants.J2EE_1_4_ID; > } else if (versionStr.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) { > version = J2EEVersionConstants.JEE_5_0_ID; >+ } else if (versionStr.equals(J2EEVersionConstants.VERSION_6_0_TEXT)) { >+ version = J2EEVersionConstants.JEE_6_0_ID; > } > break; > case J2EEVersionConstants.CONNECTOR_TYPE: >@@ -197,6 +199,8 @@ > version = J2EEVersionConstants.JCA_1_0_ID; > } else if (versionStr.equals(J2EEVersionConstants.VERSION_1_5_TEXT)) { > version = J2EEVersionConstants.JCA_1_5_ID; >+ } else if (versionStr.equals(J2EEVersionConstants.VERSION_1_6_TEXT)) { >+ version = J2EEVersionConstants.JCA_1_6_ID; > } > break; > case J2EEVersionConstants.EJB_TYPE: >@@ -208,6 +212,8 @@ > version = J2EEVersionConstants.EJB_2_1_ID; > } else if (versionStr.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) { > version = J2EEVersionConstants.EJB_3_0_ID; >+ } else if (versionStr.equals(J2EEVersionConstants.VERSION_3_1_TEXT)) { >+ version = J2EEVersionConstants.EJB_3_1_ID; > } > break; > case J2EEVersionConstants.WEB_TYPE: >@@ -219,6 +225,8 @@ > version = J2EEVersionConstants.WEB_2_4_ID; > } else if (versionStr.equals(J2EEVersionConstants.VERSION_2_5_TEXT)) { > version = J2EEVersionConstants.WEB_2_5_ID; >+ } else if (versionStr.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) { >+ version = J2EEVersionConstants.WEB_3_0_ID; > } > break; > } >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/plugin.xml,v >retrieving revision 1.131 >diff -u -r1.131 plugin.xml >--- plugin.xml 1 Sep 2009 19:34:51 -0000 1.131 >+++ plugin.xml 28 Sep 2009 13:12:19 -0000 >@@ -526,17 +526,27 @@ > </constraint> > <group-member id="modules"/> > </project-facet-version> >+ >+ <project-facet-version facet="jst.appclient" version="6.0"> >+ <constraint> >+ <and> >+ <requires facet="jst.java" version="[5.0"/> >+ <conflicts group="modules"/> >+ </and> >+ </constraint> >+ <group-member id="modules"/> >+ </project-facet-version> > >- <action type="install" facet="jst.appclient" version="[1.2-5.0]" id="jst.appclient.install"> >+ <action type="install" facet="jst.appclient" version="[1.2-6.0]" id="jst.appclient.install"> > <delegate class="org.eclipse.jst.j2ee.project.facet.AppClientFacetInstallDelegate"/> > <config-factory class="org.eclipse.jst.j2ee.project.facet.AppClientFacetInstallDataModelProvider"/> > </action> > >- <event-handler type="POST_INSTALL" facet="jst.appclient" version="[1.2-5.0]"> >+ <event-handler type="POST_INSTALL" facet="jst.appclient" version="[1.2-6.0]"> > <delegate class="org.eclipse.jst.j2ee.project.facet.AppClientFacetPostInstallDelegate"/> > </event-handler> > >- <event-handler type="RUNTIME_CHANGED" facet="jst.appclient" version="[1.2-5.0]"> >+ <event-handler type="RUNTIME_CHANGED" facet="jst.appclient" version="[1.2-6.0]"> > <delegate class="org.eclipse.jst.j2ee.project.facet.J2EEFacetRuntimeChangedDelegate"/> > </event-handler> > >Index: j2eecreation/org/eclipse/jst/j2ee/project/facet/IJ2EEFacetConstants.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/facet/IJ2EEFacetConstants.java,v >retrieving revision 1.8 >diff -u -r1.8 IJ2EEFacetConstants.java >--- j2eecreation/org/eclipse/jst/j2ee/project/facet/IJ2EEFacetConstants.java 22 Jul 2009 20:05:36 -0000 1.8 >+++ j2eecreation/org/eclipse/jst/j2ee/project/facet/IJ2EEFacetConstants.java 28 Sep 2009 13:12:28 -0000 >@@ -24,6 +24,7 @@ > public static final IProjectFacetVersion ENTERPRISE_APPLICATION_13 = ENTERPRISE_APPLICATION_FACET.getVersion("1.3"); //$NON-NLS-1$ > public static final IProjectFacetVersion ENTERPRISE_APPLICATION_14 = ENTERPRISE_APPLICATION_FACET.getVersion("1.4"); //$NON-NLS-1$ > public static final IProjectFacetVersion ENTERPRISE_APPLICATION_50 = ENTERPRISE_APPLICATION_FACET.getVersion("5.0"); //$NON-NLS-1$ >+ public static final IProjectFacetVersion ENTERPRISE_APPLICATION_60 = ENTERPRISE_APPLICATION_FACET.getVersion("6.0"); //$NON-NLS-1$ > > public static final String APPLICATION_CLIENT = IModuleConstants.JST_APPCLIENT_MODULE; > public IProjectFacet APPLICATION_CLIENT_FACET = ProjectFacetsManager.getProjectFacet(APPLICATION_CLIENT); >@@ -31,6 +32,7 @@ > public static final IProjectFacetVersion APPLICATION_CLIENT_13 = APPLICATION_CLIENT_FACET.getVersion("1.3"); //$NON-NLS-1$ > public static final IProjectFacetVersion APPLICATION_CLIENT_14 = APPLICATION_CLIENT_FACET.getVersion("1.4"); //$NON-NLS-1$ > public static final IProjectFacetVersion APPLICATION_CLIENT_50 = APPLICATION_CLIENT_FACET.getVersion("5.0"); //$NON-NLS-1$ >+ public static final IProjectFacetVersion APPLICATION_CLIENT_60 = APPLICATION_CLIENT_FACET.getVersion("6.0"); //$NON-NLS-1$ > > public static final String EJB = IModuleConstants.JST_EJB_MODULE; > public IProjectFacet EJB_FACET = ProjectFacetsManager.getProjectFacet(EJB); >@@ -38,6 +40,7 @@ > public static final IProjectFacetVersion EJB_20 = EJB_FACET.getVersion("2.0"); //$NON-NLS-1$ > public static final IProjectFacetVersion EJB_21 = EJB_FACET.getVersion("2.1"); //$NON-NLS-1$ > public static final IProjectFacetVersion EJB_30 = EJB_FACET.getVersion("3.0"); //$NON-NLS-1$ >+ public static final IProjectFacetVersion EJB_31 = EJB_FACET.getVersion("3.1"); //$NON-NLS-1$ > > public static final String DYNAMIC_WEB = IModuleConstants.JST_WEB_MODULE; > public IProjectFacet DYNAMIC_WEB_FACET = ProjectFacetsManager.getProjectFacet(DYNAMIC_WEB); >@@ -45,6 +48,7 @@ > public static final IProjectFacetVersion DYNAMIC_WEB_23 = DYNAMIC_WEB_FACET.getVersion("2.3"); //$NON-NLS-1$ > public static final IProjectFacetVersion DYNAMIC_WEB_24 = DYNAMIC_WEB_FACET.getVersion("2.4"); //$NON-NLS-1$ > public static final IProjectFacetVersion DYNAMIC_WEB_25 = DYNAMIC_WEB_FACET.getVersion("2.5"); //$NON-NLS-1$ >+ public static final IProjectFacetVersion DYNAMIC_WEB_30 = DYNAMIC_WEB_FACET.getVersion("3.0"); //$NON-NLS-1$ > > public static final String DYNAMIC_WEB_XDOCLET = "jst.web.xdoclet"; //$NON-NLS-1$ > >@@ -56,6 +60,7 @@ > public IProjectFacet JCA_FACET = ProjectFacetsManager.getProjectFacet(JCA); > public static final IProjectFacetVersion JCA_10 = JCA_FACET.getVersion("1.0"); //$NON-NLS-1$ > public static final IProjectFacetVersion JCA_15 = JCA_FACET.getVersion("1.5"); //$NON-NLS-1$ >+ public static final IProjectFacetVersion JCA_16 = JCA_FACET.getVersion("1.6"); //$NON-NLS-1$ > > public static final String STATIC_WEB = IModuleConstants.WST_WEB_MODULE; > >Index: appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDelegate.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDelegate.java,v >retrieving revision 1.38 >diff -u -r1.38 AppClientFacetInstallDelegate.java >--- appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDelegate.java 9 Jul 2009 20:08:07 -0000 1.38 >+++ appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDelegate.java 28 Sep 2009 13:12:23 -0000 >@@ -111,10 +111,30 @@ > IPath configFolderpath = pjpath.append(configFolderName); > sourceFolder = ws.getRoot().getFolder(configFolderpath); > >- if( fv == IJ2EEFacetConstants.APPLICATION_CLIENT_50 ) >+ if( fv == IJ2EEFacetConstants.APPLICATION_CLIENT_60 ) > { > if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){ >- // Create the deployment descriptor (web.xml) if one doesn't exist >+ // Create the deployment descriptor (application-client.xml) if one doesn't exist >+ IFile appClientFile = sourceFolder.getFile(new Path(J2EEConstants.APP_CLIENT_DD_URI)); >+ if (!appClientFile.exists()) { >+ try { >+ if(!appClientFile.getParent().exists() >+ && (appClientFile.getParent().getType() == IResource.FOLDER)){ >+ ((IFolder)appClientFile.getParent()).create(true, true, monitor); >+ } >+ final String appClientXmlContents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<application-client version=\"5\" xmlns=\"http://java.sun.com/xml/ns/javaee\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd\">\n <display-name> \n" + project.getName() + "</display-name> \n </application-client>"; //$NON-NLS-1$ //$NON-NLS-2$ >+ appClientFile.create(new ByteArrayInputStream(appClientXmlContents.getBytes("UTF-8")), true, monitor); //$NON-NLS-1$ >+ >+ } catch (UnsupportedEncodingException e) { >+ J2EEPlugin.logError(e); >+ } >+ } >+ } >+ } >+ else if( fv == IJ2EEFacetConstants.APPLICATION_CLIENT_50 ) >+ { >+ if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){ >+ // Create the deployment descriptor (application-client.xml) if one doesn't exist > IFile appClientFile = sourceFolder.getFile(new Path(J2EEConstants.APP_CLIENT_DD_URI)); > if (!appClientFile.exists()) { > try { >Index: appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDataModelProvider.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDataModelProvider.java,v >retrieving revision 1.21 >diff -u -r1.21 AppClientFacetInstallDataModelProvider.java >--- appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDataModelProvider.java 9 Jun 2009 19:20:27 -0000 1.21 >+++ appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDataModelProvider.java 28 Sep 2009 13:12:23 -0000 >@@ -14,6 +14,7 @@ > > import org.eclipse.core.runtime.IPath; > import org.eclipse.core.runtime.Path; >+import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; > import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil; > import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants; > import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin; >@@ -45,8 +46,8 @@ > String projectName = model.getStringProperty(FACET_PROJECT_NAME).replace(' ','_'); > return projectName + IJ2EEModuleConstants.JAR_EXT; > } else if (propertyName.equals(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)) { >- IProjectFacetVersion facetVersion = (IProjectFacetVersion)getProperty(FACET_VERSION); >- if(facetVersion == APPLICATION_CLIENT_50){ >+ String facetVersion = getStringProperty(FACET_VERSION_STR); >+ if(J2EEVersionUtil.convertVersionStringToInt(facetVersion) >= J2EEVersionConstants.JEE_5_0_ID){ > return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.APP_CLIENT_GENERATE_DD)); > } > return Boolean.TRUE; >Index: earproject/org/eclipse/jst/j2ee/internal/earcreation/EarFacetInstallDataModelProvider.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EarFacetInstallDataModelProvider.java,v >retrieving revision 1.21 >diff -u -r1.21 EarFacetInstallDataModelProvider.java >--- earproject/org/eclipse/jst/j2ee/internal/earcreation/EarFacetInstallDataModelProvider.java 12 Jun 2009 20:21:59 -0000 1.21 >+++ earproject/org/eclipse/jst/j2ee/internal/earcreation/EarFacetInstallDataModelProvider.java 28 Sep 2009 13:12:25 -0000 >@@ -17,10 +17,10 @@ > > import org.eclipse.core.resources.IProject; > import org.eclipse.core.runtime.IStatus; >+import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; > import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil; > import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin; > import org.eclipse.jst.j2ee.internal.plugin.J2EEPreferences; >-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants; > import org.eclipse.jst.j2ee.project.facet.J2EEFacetInstallDataModelProvider; > import org.eclipse.wst.common.componentcore.ComponentCore; > import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; >@@ -48,8 +48,8 @@ > } else if (propertyName.equals(J2EE_PROJECTS_LIST) || propertyName.equals(JAVA_PROJECT_LIST)) { > return Collections.EMPTY_LIST; > } else if(propertyName.equals(GENERATE_DD)){ >- IProjectFacetVersion facetVersion = (IProjectFacetVersion)getProperty(FACET_VERSION); >- if(facetVersion == IJ2EEFacetConstants.ENTERPRISE_APPLICATION_50){ >+ String facetVersion = getStringProperty(FACET_VERSION_STR); >+ if(J2EEVersionUtil.convertVersionStringToInt(facetVersion) >= J2EEVersionConstants.JEE_5_0_ID){ > return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.APPLICATION_GENERATE_DD)); > } > return Boolean.TRUE; >Index: common/org/eclipse/jst/j2ee/internal/common/J2EEVersionUtil.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/J2EEVersionUtil.java,v >retrieving revision 1.10 >diff -u -r1.10 J2EEVersionUtil.java >--- common/org/eclipse/jst/j2ee/internal/common/J2EEVersionUtil.java 9 Jul 2009 20:04:10 -0000 1.10 >+++ common/org/eclipse/jst/j2ee/internal/common/J2EEVersionUtil.java 28 Sep 2009 13:12:25 -0000 >@@ -35,6 +35,9 @@ > > case J2EEVersionConstants.SERVLET_2_5: > return J2EEVersionConstants.VERSION_2_5_TEXT; >+ >+ case J2EEVersionConstants.SERVLET_3_0: >+ return J2EEVersionConstants.VERSION_3_0_TEXT; > } > return ""; //$NON-NLS-1$ > >@@ -57,6 +60,9 @@ > > case J2EEVersionConstants.EJB_3_0_ID: > return J2EEVersionConstants.VERSION_3_0_TEXT; >+ >+ case J2EEVersionConstants.EJB_3_1_ID: >+ return J2EEVersionConstants.VERSION_3_1_TEXT; > } > return ""; //$NON-NLS-1$ > } >@@ -69,6 +75,9 @@ > case J2EEVersionConstants.JCA_1_5_ID: > return J2EEVersionConstants.VERSION_1_5_TEXT; > >+ case J2EEVersionConstants.JCA_1_6_ID: >+ return J2EEVersionConstants.VERSION_1_6_TEXT; >+ > } > return ""; //$NON-NLS-1$ > } >@@ -87,6 +96,9 @@ > case J2EEVersionConstants.JEE_5_0_ID: > return J2EEVersionConstants.VERSION_5_0_TEXT; > >+ case J2EEVersionConstants.JEE_6_0_ID: >+ return J2EEVersionConstants.VERSION_6_0_TEXT; >+ > } > return "";//$NON-NLS-1$ > } >@@ -100,6 +112,8 @@ > return J2EEVersionConstants.J2EE_1_4_ID; > if (version.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) > return J2EEVersionConstants.JEE_5_0_ID; >+ if (version.equals(J2EEVersionConstants.VERSION_6_0_TEXT)) >+ return J2EEVersionConstants.JEE_6_0_ID; > // default > return J2EEVersionConstants.JEE_5_0_ID; > } >@@ -113,6 +127,8 @@ > return J2EEVersionConstants.J2EE_1_4_ID; > if (version.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) > return J2EEVersionConstants.JEE_5_0_ID; >+ if (version.equals(J2EEVersionConstants.VERSION_3_1_TEXT)) >+ return J2EEVersionConstants.JEE_6_0_ID; > // default > return J2EEVersionConstants.JEE_5_0_ID; > } >@@ -126,6 +142,8 @@ > return J2EEVersionConstants.J2EE_1_4_ID; > if (version.equals(J2EEVersionConstants.VERSION_2_5_TEXT)) > return J2EEVersionConstants.JEE_5_0_ID; >+ if (version.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) >+ return J2EEVersionConstants.JEE_6_0_ID; > // default > return J2EEVersionConstants.J2EE_1_4_ID; > } >@@ -135,6 +153,8 @@ > return J2EEVersionConstants.J2EE_1_3_ID; > if (version.equals(J2EEVersionConstants.VERSION_1_5_TEXT)) > return J2EEVersionConstants.J2EE_1_4_ID; >+ if (version.equals(J2EEVersionConstants.VERSION_1_6_TEXT)) >+ return J2EEVersionConstants.JEE_6_0_ID; > // default > return J2EEVersionConstants.J2EE_1_4_ID; > } >@@ -149,6 +169,8 @@ > return J2EEVersionConstants.EJB_2_1_ID; > case J2EEVersionConstants.JEE_5_0_ID: > return J2EEVersionConstants.EJB_3_0_ID; >+ case J2EEVersionConstants.JEE_6_0_ID: >+ return J2EEVersionConstants.EJB_3_1_ID; > } > // default > return J2EEVersionConstants.EJB_3_0_ID; >@@ -164,6 +186,8 @@ > return J2EEVersionConstants.WEB_2_4_ID; > case J2EEVersionConstants.JEE_5_0_ID: > return J2EEVersionConstants.WEB_2_5_ID; >+ case J2EEVersionConstants.JEE_6_0_ID: >+ return J2EEVersionConstants.WEB_3_0_ID; > } > // default > return J2EEVersionConstants.WEB_2_5_ID; >@@ -174,7 +198,10 @@ > case J2EEVersionConstants.J2EE_1_3_ID: > return J2EEVersionConstants.JCA_1_0_ID; > case J2EEVersionConstants.J2EE_1_4_ID: >+ case J2EEVersionConstants.JEE_5_0_ID: > return J2EEVersionConstants.JCA_1_5_ID; >+ case J2EEVersionConstants.JEE_6_0_ID: >+ return J2EEVersionConstants.JCA_1_6_ID; > } > // default > return J2EEVersionConstants.JCA_1_5_ID; >@@ -220,6 +247,9 @@ > else if (version.equals(J2EEVersionConstants.VERSION_1_5_TEXT)) > nVersion = J2EEVersionConstants.VERSION_1_5; > >+ else if (version.equals(J2EEVersionConstants.VERSION_1_6_TEXT)) >+ nVersion = J2EEVersionConstants.VERSION_1_6; >+ > else if (version.equals(J2EEVersionConstants.VERSION_2_0_TEXT)) > nVersion = J2EEVersionConstants.VERSION_2_0; > >@@ -236,13 +266,19 @@ > nVersion = J2EEVersionConstants.VERSION_2_4; > > else if (version.equals(J2EEVersionConstants.VERSION_2_5_TEXT)) >- nVersion = J2EEVersionConstants.VERSION_2_5; >- >- else if (version.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) >- nVersion = J2EEVersionConstants.VERSION_5_0; >+ nVersion = J2EEVersionConstants.VERSION_2_5; > > else if (version.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) >- nVersion = J2EEVersionConstants.VERSION_3_0; >+ nVersion = J2EEVersionConstants.VERSION_3_0; >+ >+ else if (version.equals(J2EEVersionConstants.VERSION_3_1_TEXT)) >+ nVersion = J2EEVersionConstants.VERSION_3_1; >+ >+ else if (version.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) >+ nVersion = J2EEVersionConstants.VERSION_5_0; >+ >+ else if (version.equals(J2EEVersionConstants.VERSION_6_0_TEXT)) >+ nVersion = J2EEVersionConstants.VERSION_6_0; > > return nVersion; > } >@@ -267,6 +303,9 @@ > else if (version == J2EEVersionConstants.VERSION_1_5) > nVersion = J2EEVersionConstants.VERSION_1_5_TEXT; > >+ else if (version == J2EEVersionConstants.VERSION_1_6) >+ nVersion = J2EEVersionConstants.VERSION_1_6_TEXT; >+ > else if (version == J2EEVersionConstants.VERSION_2_0) > nVersion = J2EEVersionConstants.VERSION_2_0_TEXT; > >@@ -286,10 +325,16 @@ > nVersion = J2EEVersionConstants.VERSION_2_5_TEXT; > > else if (version == J2EEVersionConstants.VERSION_3_0) >- nVersion = J2EEVersionConstants.VERSION_3_0_TEXT; >+ nVersion = J2EEVersionConstants.VERSION_3_0_TEXT; >+ >+ else if (version == J2EEVersionConstants.VERSION_3_1) >+ nVersion = J2EEVersionConstants.VERSION_3_1_TEXT; > > else if (version == J2EEVersionConstants.VERSION_5_0) > nVersion = J2EEVersionConstants.VERSION_5_0_TEXT; >+ >+ else if (version == J2EEVersionConstants.VERSION_6_0) >+ nVersion = J2EEVersionConstants.VERSION_6_0_TEXT; > > return nVersion; > } >Index: earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEComponentImportDataModelProvider.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEComponentImportDataModelProvider.java,v >retrieving revision 1.16 >diff -u -r1.16 J2EEComponentImportDataModelProvider.java >--- earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEComponentImportDataModelProvider.java 14 Jul 2009 14:13:23 -0000 1.16 >+++ earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEComponentImportDataModelProvider.java 28 Sep 2009 13:12:25 -0000 >@@ -63,6 +63,9 @@ > case J2EEVersionConstants.JEE_5_0_ID: > javaFacetVersion = JavaFacetUtils.JAVA_50; > break; >+ case J2EEVersionConstants.JEE_6_0_ID: >+ javaFacetVersion = JavaFacetUtils.JAVA_60; >+ break; > } > if(javaFacetVersion != null){ > IDataModel moduleDM = model.getNestedModel(NESTED_MODEL_J2EE_COMPONENT_CREATION); >Index: j2eecreation/org/eclipse/jst/j2ee/project/EarUtilities.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/EarUtilities.java,v >retrieving revision 1.10 >diff -u -r1.10 EarUtilities.java >--- j2eecreation/org/eclipse/jst/j2ee/project/EarUtilities.java 9 Sep 2009 16:22:36 -0000 1.10 >+++ j2eecreation/org/eclipse/jst/j2ee/project/EarUtilities.java 28 Sep 2009 13:12:28 -0000 >@@ -269,6 +269,8 @@ > { > switch (earVersion) > { >+ case J2EEVersionConstants.VERSION_6_0: >+ retVal.add(DYNAMIC_WEB_30); > case J2EEVersionConstants.VERSION_5_0: > retVal.add(DYNAMIC_WEB_25); > //$FALL-THROUGH$ >@@ -287,6 +289,8 @@ > { > switch (earVersion) > { >+ case J2EEVersionConstants.VERSION_6_0: >+ retVal.add(EJB_31); > case J2EEVersionConstants.VERSION_5_0: > retVal.add(EJB_30); > //$FALL-THROUGH$ >@@ -304,6 +308,8 @@ > { > switch (earVersion) > { >+ case J2EEVersionConstants.VERSION_6_0: >+ retVal.add(JCA_16); > case J2EEVersionConstants.VERSION_5_0: > case J2EEVersionConstants.VERSION_1_4: > retVal.add(JCA_15); >@@ -319,6 +325,8 @@ > { > switch (earVersion) > { >+ case J2EEVersionConstants.VERSION_6_0: >+ retVal.add(APPLICATION_CLIENT_60); > case J2EEVersionConstants.VERSION_5_0: > retVal.add(APPLICATION_CLIENT_50); > //$FALL-THROUGH$ >#P org.eclipse.jst.ejb.ui >Index: ejb_ui/org/eclipse/jst/ejb/ui/project/facet/EjbFacetInstallPage.java >=================================================================== >RCS file: /cvsroot/webtools/ejbtools/plugins/org.eclipse.jst.ejb.ui/ejb_ui/org/eclipse/jst/ejb/ui/project/facet/EjbFacetInstallPage.java,v >retrieving revision 1.15 >diff -u -r1.15 EjbFacetInstallPage.java >--- ejb_ui/org/eclipse/jst/ejb/ui/project/facet/EjbFacetInstallPage.java 9 Jun 2009 18:45:09 -0000 1.15 >+++ ejb_ui/org/eclipse/jst/ejb/ui/project/facet/EjbFacetInstallPage.java 28 Sep 2009 13:12:38 -0000 >@@ -14,7 +14,9 @@ > import org.eclipse.jst.ejb.ui.internal.util.EJBUIMessages; > import org.eclipse.jst.j2ee.ejb.project.operations.IEjbFacetInstallDataModelProperties; > import org.eclipse.jst.j2ee.internal.J2EEConstants; >+import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; > import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds; >+import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil; > import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages; > import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage; > import org.eclipse.swt.SWT; >@@ -26,7 +28,6 @@ > import org.eclipse.swt.widgets.Group; > import org.eclipse.swt.widgets.Label; > import org.eclipse.swt.widgets.Text; >-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion; > > > >@@ -76,8 +77,9 @@ > @Override > protected void handleFacetVersionChangedEvent() > { >- final IProjectFacetVersion fv = (IProjectFacetVersion) this.model.getProperty( FACET_VERSION ); >- this.addDD.setVisible( fv == EJB_30 ); >+ String fv = model.getStringProperty(FACET_VERSION_STR); >+ boolean isEJB30OrGreater = J2EEVersionUtil.convertVersionStringToInt(fv) >= J2EEVersionConstants.EJB_3_0_ID; >+ this.addDD.setVisible(isEJB30OrGreater); > } > > private Composite createEjbClientComposite(Composite parent) { >#P org.eclipse.jst.jee >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.jee/plugin.xml,v >retrieving revision 1.20 >diff -u -r1.20 plugin.xml >--- plugin.xml 2 Feb 2009 20:14:10 -0000 1.20 >+++ plugin.xml 28 Sep 2009 13:12:39 -0000 >@@ -17,17 +17,28 @@ > <group-member id="modules"/> > > </project-facet-version> >+ >+ <project-facet-version facet="jst.ear" version="6.0"> >+ <constraint> >+ <and> >+ <conflicts group="modules"/> >+ <conflicts facet="jst.java"/> >+ </and> >+ </constraint> >+ <group-member id="modules"/> >+ >+ </project-facet-version> > >- <action facet="jst.ear" version="5.0" type="INSTALL" id="jst.ear#5.0#install"> >+ <action facet="jst.ear" version="[5.0-6.0]" type="INSTALL" id="jst.ear#5.0#install"> > <delegate class="org.eclipse.jst.jee.project.facet.EarFacetInstallDelegate"/> > <config-factory class="org.eclipse.jst.j2ee.internal.earcreation.EarFacetInstallDataModelProvider"/> > </action> > >- <event-handler facet="jst.ear" version="5.0" type="POST_INSTALL"> >+ <event-handler facet="jst.ear" version="[5.0-6.0]" type="POST_INSTALL"> > <delegate class="org.eclipse.jst.jee.project.facet.EarFacetPostInstallDelegate"/> > </event-handler> > >- <event-handler facet="jst.ear" version="5.0" type="RUNTIME_CHANGED"> >+ <event-handler facet="jst.ear" version="[5.0-6.0]" type="RUNTIME_CHANGED"> > <delegate class="org.eclipse.jst.j2ee.project.facet.EarFacetRuntimeHandler$RuntimeChangedDelegate"/> > </event-handler> > >#P org.eclipse.jst.servlet.ui >Index: servlet_ui/org/eclipse/jst/servlet/ui/project/facet/WebFacetInstallPage.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/project/facet/WebFacetInstallPage.java,v >retrieving revision 1.21 >diff -u -r1.21 WebFacetInstallPage.java >--- servlet_ui/org/eclipse/jst/servlet/ui/project/facet/WebFacetInstallPage.java 9 Jun 2009 19:29:08 -0000 1.21 >+++ servlet_ui/org/eclipse/jst/servlet/ui/project/facet/WebFacetInstallPage.java 28 Sep 2009 13:12:40 -0000 >@@ -14,9 +14,10 @@ > > import org.eclipse.jface.dialogs.Dialog; > import org.eclipse.jst.j2ee.internal.J2EEConstants; >+import org.eclipse.jst.j2ee.internal.J2EEVersionConstants; >+import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil; > import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage; > import org.eclipse.jst.j2ee.web.project.facet.IWebFacetInstallDataModelProperties; >-import org.eclipse.jst.j2ee.web.project.facet.WebFacetUtils; > import org.eclipse.jst.servlet.ui.IWebUIContextIds; > import org.eclipse.osgi.util.NLS; > import org.eclipse.swt.SWT; >@@ -26,7 +27,6 @@ > import org.eclipse.swt.widgets.Control; > import org.eclipse.swt.widgets.Label; > import org.eclipse.swt.widgets.Text; >-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion; > > /** > * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a> >@@ -80,8 +80,9 @@ > @Override > protected void handleFacetVersionChangedEvent() > { >- final IProjectFacetVersion fv = (IProjectFacetVersion) this.model.getProperty( FACET_VERSION ); >- this.addDD.setVisible( fv == WebFacetUtils.WEB_25 ); >+ String fv = model.getStringProperty(FACET_VERSION_STR); >+ boolean isWeb25OrGreater = J2EEVersionUtil.convertVersionStringToInt(fv) >= J2EEVersionConstants.WEB_2_5_ID; >+ this.addDD.setVisible(isWeb25OrGreater); > } > > @Override >Index: servlet_ui/org/eclipse/jst/servlet/ui/project/facet/WebProjectFirstPage.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/project/facet/WebProjectFirstPage.java,v >retrieving revision 1.8 >diff -u -r1.8 WebProjectFirstPage.java >--- servlet_ui/org/eclipse/jst/servlet/ui/project/facet/WebProjectFirstPage.java 9 Jun 2009 19:29:08 -0000 1.8 >+++ servlet_ui/org/eclipse/jst/servlet/ui/project/facet/WebProjectFirstPage.java 28 Sep 2009 13:12:40 -0000 >@@ -48,7 +48,8 @@ > > facets.add( primaryFacetVersion ); > >- if( primaryFacetVersion == WebFacetUtils.WEB_25 ) >+ if( primaryFacetVersion == WebFacetUtils.WEB_30 || >+ primaryFacetVersion == WebFacetUtils.WEB_25 ) > { > facets.add( JavaFacetUtils.JAVA_50 ); > } >Index: servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/ConvertToWebModuleTypeDialog.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/ConvertToWebModuleTypeDialog.java,v >retrieving revision 1.6 >diff -u -r1.6 ConvertToWebModuleTypeDialog.java >--- servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/ConvertToWebModuleTypeDialog.java 9 Jun 2009 19:29:08 -0000 1.6 >+++ servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/ConvertToWebModuleTypeDialog.java 28 Sep 2009 13:12:40 -0000 >@@ -30,7 +30,7 @@ > private String fShellTitle = IWebWizardConstants.CONVERT_TO_WEB_TITLE; > private String fLabelText = IWebWizardConstants.SELECT_WEB_VERSION; > private static String fSelection= null; >- private String[] fAllowedStrings = new String[] {J2EEVersionConstants.VERSION_2_2_TEXT, J2EEVersionConstants.VERSION_2_3_TEXT, J2EEVersionConstants.VERSION_2_4_TEXT, J2EEVersionConstants.VERSION_2_5_TEXT}; >+ private String[] fAllowedStrings = new String[] {J2EEVersionConstants.VERSION_2_2_TEXT, J2EEVersionConstants.VERSION_2_3_TEXT, J2EEVersionConstants.VERSION_2_4_TEXT, J2EEVersionConstants.VERSION_2_5_TEXT, J2EEVersionConstants.VERSION_3_0_TEXT}; > private int fInitialSelectionIndex = fAllowedStrings.length-1; > > public static String getSelectedVersion() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 252613
:
122402
| 148229