[jboss-cvs] Repository SVN: r7762 - eclipse/webtools/patches.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed May 7 16:46:30 EDT 2008


Author: mculpepper at jboss.com
Date: 2008-05-07 16:46:30 -0400 (Wed, 07 May 2008)
New Revision: 7762

Added:
   eclipse/webtools/patches/webtools-20080506003122.patch
Log:
adding source patch

Added: eclipse/webtools/patches/webtools-20080506003122.patch
===================================================================
--- eclipse/webtools/patches/webtools-20080506003122.patch	                        (rev 0)
+++ eclipse/webtools/patches/webtools-20080506003122.patch	2008-05-07 20:46:30 UTC (rev 7762)
@@ -0,0 +1,99 @@
+Index: earproject/org/eclipse/jst/jee/internal/deployables/JEEDeployableFactory.java
+===================================================================
+RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.jee/earproject/org/eclipse/jst/jee/internal/deployables/JEEDeployableFactory.java,v
+retrieving revision 1.2.2.1.2.1
+diff -u -r1.2.2.1.2.1 JEEDeployableFactory.java
+--- earproject/org/eclipse/jst/jee/internal/deployables/JEEDeployableFactory.java	24 Mar 2008 19:12:30 -0000	1.2.2.1.2.1
++++ earproject/org/eclipse/jst/jee/internal/deployables/JEEDeployableFactory.java	7 May 2008 20:09:13 -0000
+@@ -30,6 +30,7 @@
+ import org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable;
+ import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
+ import org.eclipse.jst.j2ee.jca.Connector;
++import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
+ import org.eclipse.jst.j2ee.webapplication.WebApp;
+ import org.eclipse.wst.common.componentcore.ArtifactEdit;
+ import org.eclipse.wst.common.componentcore.ComponentCore;
+@@ -141,28 +142,60 @@
+ 						ArtifactEdit moduleEdit = null;
+ 						try {
+ 							if (j2eeModule.isEjbModule()) {
+-								moduleEdit = ComponentUtilities.getArtifactEditForRead(moduleComponent, J2EEProjectUtilities.EJB);
+-								EJBJar ejbJar = (EJBJar) moduleEdit.getContentModelRoot();
+-								moduleType = J2EEProjectUtilities.EJB;
+-								moduleVersion = ejbJar.getVersion();
++								try {
++									moduleEdit = ComponentUtilities.getArtifactEditForRead(moduleComponent, J2EEProjectUtilities.EJB);
++									EJBJar ejbJar = (EJBJar) moduleEdit.getContentModelRoot();
++									moduleType = J2EEProjectUtilities.EJB;
++									moduleVersion = ejbJar.getVersion();
++								} catch( NullPointerException npe ) {
++									moduleType = IJ2EEFacetConstants.EJB; 
++									moduleVersion = IJ2EEFacetConstants.EJB_30.getVersionString();
++								} catch( ClassCastException cce ) {
++									moduleType = IJ2EEFacetConstants.EJB; 
++									moduleVersion = IJ2EEFacetConstants.EJB_30.getVersionString();
++								}
+ 							}
+ 							else if (j2eeModule.isWebModule()) {
+-								moduleEdit = ComponentUtilities.getArtifactEditForRead(moduleComponent, J2EEProjectUtilities.DYNAMIC_WEB);
+-								WebApp webApp = (WebApp) moduleEdit.getContentModelRoot();
+-								moduleType = J2EEProjectUtilities.DYNAMIC_WEB;
+-								moduleVersion = webApp.getVersion();
++								try {
++									moduleEdit = ComponentUtilities.getArtifactEditForRead(moduleComponent, J2EEProjectUtilities.DYNAMIC_WEB);
++									WebApp webApp = (WebApp) moduleEdit.getContentModelRoot();
++									moduleType = J2EEProjectUtilities.DYNAMIC_WEB;
++									moduleVersion = webApp.getVersion();
++								} catch( NullPointerException npe ) {
++									moduleType = IJ2EEFacetConstants.DYNAMIC_WEB;
++									moduleVersion = IJ2EEFacetConstants.DYNAMIC_WEB_24.getVersionString();
++								} catch( ClassCastException cce ) {
++									moduleType = IJ2EEFacetConstants.DYNAMIC_WEB;
++									moduleVersion = IJ2EEFacetConstants.DYNAMIC_WEB_24.getVersionString();
++								}
+ 							}
+ 							else if (j2eeModule.isConnectorModule()) {
+-								moduleEdit = ComponentUtilities.getArtifactEditForRead(moduleComponent, J2EEProjectUtilities.JCA);
+-								Connector connector = (Connector) moduleEdit.getContentModelRoot();
+-								moduleType = J2EEProjectUtilities.JCA;
+-								moduleVersion = connector.getVersion();
++								try {
++									moduleEdit = ComponentUtilities.getArtifactEditForRead(moduleComponent, J2EEProjectUtilities.JCA);
++									Connector connector = (Connector) moduleEdit.getContentModelRoot();
++									moduleType = J2EEProjectUtilities.JCA;
++									moduleVersion = connector.getVersion();
++								} catch( NullPointerException npe ) {
++									moduleType = IJ2EEFacetConstants.JCA;
++									moduleVersion = "1.5";
++								} catch( ClassCastException cce ) {
++									moduleType = IJ2EEFacetConstants.JCA;
++									moduleVersion = "1.5";
++								}
+ 							}
+ 							else if (j2eeModule.isJavaModule()) {
+-								moduleEdit = ComponentUtilities.getArtifactEditForRead(moduleComponent, J2EEProjectUtilities.APPLICATION_CLIENT);
+-								ApplicationClient appClient = (ApplicationClient) moduleEdit.getContentModelRoot();
+-								moduleType = J2EEProjectUtilities.APPLICATION_CLIENT;
+-								moduleVersion = appClient.getVersion();
++								try {
++									moduleEdit = ComponentUtilities.getArtifactEditForRead(moduleComponent, J2EEProjectUtilities.APPLICATION_CLIENT);
++									ApplicationClient appClient = (ApplicationClient) moduleEdit.getContentModelRoot();
++									moduleType = J2EEProjectUtilities.APPLICATION_CLIENT;
++									moduleVersion = appClient.getVersion();
++								} catch( NullPointerException npe ) {
++									moduleType = IJ2EEFacetConstants.APPLICATION_CLIENT;
++									moduleVersion = IJ2EEFacetConstants.APPLICATION_CLIENT_50.getVersionString();
++								} catch( ClassCastException cce ) {
++									moduleType = IJ2EEFacetConstants.APPLICATION_CLIENT;
++									moduleVersion = IJ2EEFacetConstants.APPLICATION_CLIENT_50.getVersionString();
++								}
+ 							}
+ 						} finally {
+ 							if (moduleEdit!=null)
+@@ -207,4 +240,4 @@
+ 	protected void clearCache() {
+ 		moduleDelegates = new HashMap(5);
+ 	}
+-}
++}
+\ No newline at end of file


Property changes on: eclipse/webtools/patches/webtools-20080506003122.patch
___________________________________________________________________
Name: svn:executable
   + *




More information about the jboss-cvs-commits mailing list