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 122402 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
252613_patch.txt (text/plain), 72.71 KB, created by
Kaloyan Raev
on 2009-01-13 06:57:10 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Kaloyan Raev
Created:
2009-01-13 06:57:10 EST
Size:
72.71 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#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.8 >diff -u -r1.8 AppClientFacetInstallPage.java >--- j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientFacetInstallPage.java 24 Jul 2008 19:58:31 -0000 1.8 >+++ j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientFacetInstallPage.java 13 Jan 2009 11:48:36 -0000 >@@ -12,7 +12,9 @@ > package org.eclipse.jst.j2ee.ui.project.facet.appclient; > > import org.eclipse.jface.dialogs.Dialog; >+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; >@@ -55,7 +57,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.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.40 >diff -u -r1.40 WebFacetInstallDelegate.java >--- webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java 6 Nov 2008 07:02:19 -0000 1.40 >+++ webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java 13 Jan 2009 11:48:38 -0000 >@@ -110,7 +110,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); >@@ -270,6 +276,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) { >+ Logger.getLogger().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.8 >diff -u -r1.8 WebFacetUtils.java >--- webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetUtils.java 26 Mar 2008 10:25:59 -0000 1.8 >+++ webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetUtils.java 13 Jan 2009 11:48:38 -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.42 >diff -u -r1.42 WebFacetInstallDataModelProvider.java >--- webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDataModelProvider.java 24 Jul 2008 19:59:06 -0000 1.42 >+++ webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDataModelProvider.java 13 Jan 2009 11:48:38 -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; >@@ -67,8 +68,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.75 >diff -u -r1.75 plugin.xml >--- plugin.xml 20 Feb 2008 13:29:03 -0000 1.75 >+++ plugin.xml 13 Jan 2009 11:48:38 -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.jca >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.jca/plugin.xml,v >retrieving revision 1.39 >diff -u -r1.39 plugin.xml >--- plugin.xml 18 Jul 2007 19:17:22 -0000 1.39 >+++ plugin.xml 13 Jan 2009 11:48:39 -0000 >@@ -102,16 +102,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.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.10 >diff -u -r1.10 EjbFacetInstallPage.java >--- ejb_ui/org/eclipse/jst/ejb/ui/project/facet/EjbFacetInstallPage.java 4 Aug 2008 17:08:43 -0000 1.10 >+++ ejb_ui/org/eclipse/jst/ejb/ui/project/facet/EjbFacetInstallPage.java 13 Jan 2009 11:48:40 -0000 >@@ -12,7 +12,9 @@ > > import org.eclipse.jface.dialogs.Dialog; > import org.eclipse.jst.ejb.ui.internal.util.EJBUIMessages; >+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.ejb.project.operations.IEjbFacetInstallDataModelProperties; > import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages; > import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage; >@@ -24,7 +26,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; > > > >@@ -70,8 +71,9 @@ > > 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 void createEJBClientGroup(Composite parent) { >#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.8 >diff -u -r1.8 JavaEEQuickPeek.java >--- archive/org/eclipse/jst/jee/util/internal/JavaEEQuickPeek.java 16 Jan 2008 14:47:30 -0000 1.8 >+++ archive/org/eclipse/jst/jee/util/internal/JavaEEQuickPeek.java 13 Jan 2009 11:48:41 -0000 >@@ -179,6 +179,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; >@@ -196,6 +198,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; >@@ -211,6 +215,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; >@@ -222,6 +228,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; >@@ -237,6 +245,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; >@@ -293,6 +303,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: >@@ -303,6 +317,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: >@@ -318,6 +335,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.4 >diff -u -r1.4 ConnectorResourceImpl.java >--- mofj2ee/org/eclipse/jst/j2ee/jca/internal/impl/ConnectorResourceImpl.java 7 Jun 2007 19:26:49 -0000 1.4 >+++ mofj2ee/org/eclipse/jst/j2ee/jca/internal/impl/ConnectorResourceImpl.java 13 Jan 2009 11:48:42 -0000 >@@ -160,6 +160,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.3 >diff -u -r1.3 J2EEFileUtil.java >--- commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/util/J2EEFileUtil.java 7 Jun 2007 19:27:01 -0000 1.3 >+++ commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/util/J2EEFileUtil.java 13 Jan 2009 11:48:42 -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.5 >diff -u -r1.5 EJBResourceImpl.java >--- mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBResourceImpl.java 11 Mar 2008 22:27:45 -0000 1.5 >+++ mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBResourceImpl.java 13 Jan 2009 11:48:42 -0000 >@@ -148,6 +148,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; > } >@@ -170,6 +172,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); >@@ -195,6 +201,10 @@ > */ > 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.15 >diff -u -r1.15 J2EEConstants.java >--- mofj2ee/org/eclipse/jst/j2ee/internal/J2EEConstants.java 11 Mar 2008 13:35:00 -0000 1.15 >+++ mofj2ee/org/eclipse/jst/j2ee/internal/J2EEConstants.java 13 Jan 2009 11:48:42 -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" */ >@@ -74,7 +76,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" */ >@@ -96,8 +100,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 > >@@ -124,6 +131,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$ >@@ -139,7 +148,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.8 >diff -u -r1.8 J2EEVersionConstants.java >--- mofj2ee/org/eclipse/jst/j2ee/internal/J2EEVersionConstants.java 16 Jan 2008 14:47:30 -0000 1.8 >+++ mofj2ee/org/eclipse/jst/j2ee/internal/J2EEVersionConstants.java 13 Jan 2009 11:48:42 -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.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.42 >diff -u -r1.42 EjbFacetInstallDelegate.java >--- ejbcreation/org/eclipse/jst/j2ee/ejb/project/facet/EjbFacetInstallDelegate.java 6 Nov 2008 07:02:28 -0000 1.42 >+++ ejbcreation/org/eclipse/jst/j2ee/ejb/project/facet/EjbFacetInstallDelegate.java 13 Jan 2009 11:48:44 -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$ >+ 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.74 >diff -u -r1.74 plugin.xml >--- plugin.xml 15 Jul 2008 15:08:52 -0000 1.74 >+++ plugin.xml 13 Jan 2009 11:48:44 -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.29 >diff -u -r1.29 EjbFacetInstallDataModelProvider.java >--- ejbcreation/org/eclipse/jst/j2ee/internal/ejb/project/operations/EjbFacetInstallDataModelProvider.java 4 Aug 2008 17:08:47 -0000 1.29 >+++ ejbcreation/org/eclipse/jst/j2ee/internal/ejb/project/operations/EjbFacetInstallDataModelProvider.java 13 Jan 2009 11:48:44 -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; >@@ -74,8 +75,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.jee >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.jee/plugin.xml,v >retrieving revision 1.17 >diff -u -r1.17 plugin.xml >--- plugin.xml 29 Apr 2008 03:57:49 -0000 1.17 >+++ plugin.xml 13 Jan 2009 11:48:45 -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.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.67 >diff -u -r1.67 J2EEProjectUtilities.java >--- j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EEProjectUtilities.java 29 Oct 2008 14:16:27 -0000 1.67 >+++ j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EEProjectUtilities.java 13 Jan 2009 11:48:47 -0000 >@@ -90,6 +90,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; > >@@ -1046,7 +1047,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. > */ >@@ -1059,17 +1060,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) { > // TODO Auto-generated catch block >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.23 >diff -u -r1.23 JavaEEArchiveUtilities.java >--- archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEArchiveUtilities.java 2 Dec 2008 21:40:39 -0000 1.23 >+++ archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEArchiveUtilities.java 13 Jan 2009 11:48:46 -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.124 >diff -u -r1.124 plugin.xml >--- plugin.xml 16 Oct 2008 19:53:12 -0000 1.124 >+++ plugin.xml 13 Jan 2009 11:48:46 -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.5 >diff -u -r1.5 IJ2EEFacetConstants.java >--- j2eecreation/org/eclipse/jst/j2ee/project/facet/IJ2EEFacetConstants.java 1 Oct 2008 20:55:26 -0000 1.5 >+++ j2eecreation/org/eclipse/jst/j2ee/project/facet/IJ2EEFacetConstants.java 13 Jan 2009 11:48:47 -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 static final 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 static final 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 static final 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 static final 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.33 >diff -u -r1.33 AppClientFacetInstallDelegate.java >--- appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDelegate.java 6 Nov 2008 07:02:37 -0000 1.33 >+++ appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDelegate.java 13 Jan 2009 11:48:46 -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$ >+ appClientFile.create(new ByteArrayInputStream(appClientXmlContents.getBytes("UTF-8")), true, monitor); //$NON-NLS-1$ >+ >+ } catch (UnsupportedEncodingException e) { >+ Logger.getLogger().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.18 >diff -u -r1.18 AppClientFacetInstallDataModelProvider.java >--- appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDataModelProvider.java 24 Jul 2008 19:58:52 -0000 1.18 >+++ appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDataModelProvider.java 13 Jan 2009 11:48:46 -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; >@@ -43,8 +44,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.17 >diff -u -r1.17 EarFacetInstallDataModelProvider.java >--- earproject/org/eclipse/jst/j2ee/internal/earcreation/EarFacetInstallDataModelProvider.java 6 Jul 2007 19:34:27 -0000 1.17 >+++ earproject/org/eclipse/jst/j2ee/internal/earcreation/EarFacetInstallDataModelProvider.java 13 Jan 2009 11:48:46 -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; >@@ -44,8 +44,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.7 >diff -u -r1.7 J2EEVersionUtil.java >--- common/org/eclipse/jst/j2ee/internal/common/J2EEVersionUtil.java 7 Jun 2007 19:28:17 -0000 1.7 >+++ common/org/eclipse/jst/j2ee/internal/common/J2EEVersionUtil.java 13 Jan 2009 11:48:46 -0000 >@@ -41,6 +41,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$ > >@@ -63,6 +66,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$ > } >@@ -75,6 +81,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$ > } >@@ -93,6 +102,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$ > } >@@ -106,6 +118,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; > } >@@ -119,6 +133,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; > } >@@ -132,6 +148,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; > } >@@ -141,6 +159,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; > } >@@ -155,6 +175,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; >@@ -170,6 +192,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; >@@ -180,7 +204,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; >@@ -226,6 +253,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; > >@@ -242,13 +272,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; > } >@@ -273,6 +309,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; > >@@ -292,10 +331,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.11 >diff -u -r1.11 J2EEComponentImportDataModelProvider.java >--- earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEComponentImportDataModelProvider.java 7 Jun 2007 19:28:12 -0000 1.11 >+++ earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEComponentImportDataModelProvider.java 13 Jan 2009 11:48:46 -0000 >@@ -71,6 +71,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.4 >diff -u -r1.4 EarUtilities.java >--- j2eecreation/org/eclipse/jst/j2ee/project/EarUtilities.java 1 Oct 2008 20:55:26 -0000 1.4 >+++ j2eecreation/org/eclipse/jst/j2ee/project/EarUtilities.java 13 Jan 2009 11:48:47 -0000 >@@ -264,6 +264,8 @@ > { > switch (earVersion) > { >+ case J2EEVersionConstants.VERSION_6_0: >+ retVal.add(DYNAMIC_WEB_30); > case J2EEVersionConstants.VERSION_5_0: > retVal.add(DYNAMIC_WEB_25); > case J2EEVersionConstants.VERSION_1_4: >@@ -278,6 +280,8 @@ > { > switch (earVersion) > { >+ case J2EEVersionConstants.VERSION_6_0: >+ retVal.add(EJB_31); > case J2EEVersionConstants.VERSION_5_0: > retVal.add(EJB_30); > case J2EEVersionConstants.VERSION_1_4: >@@ -292,6 +296,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); >@@ -305,6 +311,8 @@ > { > switch (earVersion) > { >+ case J2EEVersionConstants.VERSION_6_0: >+ retVal.add(APPLICATION_CLIENT_60); > case J2EEVersionConstants.VERSION_5_0: > retVal.add(APPLICATION_CLIENT_50); > case J2EEVersionConstants.VERSION_1_4: >#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.15 >diff -u -r1.15 WebFacetInstallPage.java >--- servlet_ui/org/eclipse/jst/servlet/ui/project/facet/WebFacetInstallPage.java 24 Jul 2008 19:59:13 -0000 1.15 >+++ servlet_ui/org/eclipse/jst/servlet/ui/project/facet/WebFacetInstallPage.java 13 Jan 2009 11:48:48 -0000 >@@ -13,9 +13,10 @@ > package org.eclipse.jst.servlet.ui.project.facet; > > import org.eclipse.jface.dialogs.Dialog; >+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; >@@ -24,7 +25,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> >@@ -74,8 +74,9 @@ > > 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); > } > > protected String[] getValidationPropertyNames() { >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.5 >diff -u -r1.5 WebProjectFirstPage.java >--- servlet_ui/org/eclipse/jst/servlet/ui/project/facet/WebProjectFirstPage.java 21 Feb 2008 17:55:23 -0000 1.5 >+++ servlet_ui/org/eclipse/jst/servlet/ui/project/facet/WebProjectFirstPage.java 13 Jan 2009 11:48:48 -0000 >@@ -46,7 +46,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.3 >diff -u -r1.3 ConvertToWebModuleTypeDialog.java >--- servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/ConvertToWebModuleTypeDialog.java 30 Sep 2008 21:14:09 -0000 1.3 >+++ servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/ConvertToWebModuleTypeDialog.java 13 Jan 2009 11:48:48 -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