Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 252613 | Differences between
and this patch

Collapse All | Expand All

(-)j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientFacetInstallPage.java (-1 / +4 lines)
Lines 12-18 Link Here
12
package org.eclipse.jst.j2ee.ui.project.facet.appclient;
12
package org.eclipse.jst.j2ee.ui.project.facet.appclient;
13
13
14
import org.eclipse.jface.dialogs.Dialog;
14
import org.eclipse.jface.dialogs.Dialog;
15
import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
15
import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
16
import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
17
import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
16
import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
18
import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
17
import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage;
19
import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage;
18
import org.eclipse.jst.j2ee.project.facet.IAppClientFacetInstallDataModelProperties;
20
import org.eclipse.jst.j2ee.project.facet.IAppClientFacetInstallDataModelProperties;
Lines 55-61 Link Here
55
    protected void handleFacetVersionChangedEvent()
57
    protected void handleFacetVersionChangedEvent()
56
    {
58
    {
57
        final IProjectFacetVersion fv = (IProjectFacetVersion) this.model.getProperty( FACET_VERSION );
59
        final IProjectFacetVersion fv = (IProjectFacetVersion) this.model.getProperty( FACET_VERSION );
58
        this.addDD.setVisible( fv == APPLICATION_CLIENT_50 );
60
        boolean isJEE5OrGreater = J2EEVersionUtil.convertVersionStringToInt(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID;
61
        this.addDD.setVisible(isJEE5OrGreater);
59
    }
62
    }
60
63
61
}
64
}
(-)webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java (-1 / +25 lines)
Lines 110-116 Link Here
110
			if (webroot.getProjectRelativePath().equals(new Path("/"))) //$NON-NLS-1$
110
			if (webroot.getProjectRelativePath().equals(new Path("/"))) //$NON-NLS-1$
111
				webroot.createLink(new Path("/" + model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER)), 0, null); //$NON-NLS-1$
111
				webroot.createLink(new Path("/" + model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER)), 0, null); //$NON-NLS-1$
112
112
113
			if( fv == WebFacetUtils.WEB_25 )
113
			if( fv == WebFacetUtils.WEB_30 )
114
			{
115
				 if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){
116
		                createWeb30DeploymentDescriptor(project, fv, webinfFolder, monitor);
117
		            }
118
			}
119
			else if( fv == WebFacetUtils.WEB_25 )
114
			{
120
			{
115
		         if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){
121
		         if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){
116
		                createWeb25DeploymentDescriptor(project, fv, webinfFolder, monitor);
122
		                createWeb25DeploymentDescriptor(project, fv, webinfFolder, monitor);
Lines 270-275 Link Here
270
		return pjpath.append(model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER));
276
		return pjpath.append(model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER));
271
	}
277
	}
272
	
278
	
279
	// This method still creates a web.xml with a Servlet 2.5 schema, because the Servlet 3.0 one is not yet defined
280
    private void createWeb30DeploymentDescriptor(final IProject project, final IProjectFacetVersion fv, 
281
                                               IFolder webinfFolder, IProgressMonitor monitor) throws CoreException {
282
       // Create the deployment descriptor (web.xml) if one doesn't exist
283
       IFile webxmlFile = webinfFolder.getFile("web.xml"); //$NON-NLS-1$
284
       if (!webxmlFile.exists()) {
285
           try {
286
               // Create a minimal web.xml file, so the model can be initialized
287
               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$
288
               webxmlFile.create(new ByteArrayInputStream(webXmlContents.getBytes("UTF-8")), true, monitor); //$NON-NLS-1$
289
               
290
               // TODO do some stuff with the module
291
           } catch (UnsupportedEncodingException e) {
292
               Logger.getLogger().logError(e);
293
           }
294
       }
295
   }
296
	
273
    private void createWeb25DeploymentDescriptor(final IProject project, final IProjectFacetVersion fv, 
297
    private void createWeb25DeploymentDescriptor(final IProject project, final IProjectFacetVersion fv, 
274
                                               IFolder webinfFolder, IProgressMonitor monitor) throws CoreException {
298
                                               IFolder webinfFolder, IProgressMonitor monitor) throws CoreException {
275
       // Create the deployment descriptor (web.xml) if one doesn't exist
299
       // Create the deployment descriptor (web.xml) if one doesn't exist
(-)webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetUtils.java (+1 lines)
Lines 22-27 Link Here
22
	public static final IProjectFacetVersion WEB_23 = WEB_FACET.getVersion("2.3"); //$NON-NLS-1$
22
	public static final IProjectFacetVersion WEB_23 = WEB_FACET.getVersion("2.3"); //$NON-NLS-1$
23
	public static final IProjectFacetVersion WEB_24 = WEB_FACET.getVersion("2.4"); //$NON-NLS-1$
23
	public static final IProjectFacetVersion WEB_24 = WEB_FACET.getVersion("2.4"); //$NON-NLS-1$
24
	public static final IProjectFacetVersion WEB_25 = WEB_FACET.getVersion("2.5"); //$NON-NLS-1$
24
	public static final IProjectFacetVersion WEB_25 = WEB_FACET.getVersion("2.5"); //$NON-NLS-1$
25
	public static final IProjectFacetVersion WEB_30 = WEB_FACET.getVersion("3.0"); //$NON-NLS-1$
25
	
26
	
26
	public static final IProjectFacet WEB_XDOCLET_FACET = getWebDocletFacet();
27
	public static final IProjectFacet WEB_XDOCLET_FACET = getWebDocletFacet();
27
	
28
	
(-)webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDataModelProvider.java (-2 / +3 lines)
Lines 18-23 Link Here
18
import org.eclipse.core.runtime.Path;
18
import org.eclipse.core.runtime.Path;
19
import org.eclipse.jst.common.project.facet.core.JavaFacetInstallConfig.ChangeEvent;
19
import org.eclipse.jst.common.project.facet.core.JavaFacetInstallConfig.ChangeEvent;
20
import org.eclipse.jst.j2ee.internal.J2EEConstants;
20
import org.eclipse.jst.j2ee.internal.J2EEConstants;
21
import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
21
import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
22
import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
22
import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
23
import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
23
import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
24
import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
Lines 67-74 Link Here
67
			String projectName = model.getStringProperty(FACET_PROJECT_NAME).replace(' ', '_');
68
			String projectName = model.getStringProperty(FACET_PROJECT_NAME).replace(' ', '_');
68
			return projectName + IJ2EEModuleConstants.WAR_EXT;
69
			return projectName + IJ2EEModuleConstants.WAR_EXT;
69
		} else if (propertyName.equals(GENERATE_DD)) {
70
		} else if (propertyName.equals(GENERATE_DD)) {
70
			IProjectFacetVersion facetVersion = (IProjectFacetVersion)getProperty(FACET_VERSION);
71
			String facetVersion = getStringProperty(FACET_VERSION_STR);
71
			if(facetVersion == WebFacetUtils.WEB_25){
72
			if(J2EEVersionUtil.convertVersionStringToInt(facetVersion) >= J2EEVersionConstants.WEB_2_5_ID) {
72
				return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.DYNAMIC_WEB_GENERATE_DD));
73
				return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.DYNAMIC_WEB_GENERATE_DD));
73
			}
74
			}
74
			return Boolean.TRUE;
75
			return Boolean.TRUE;
(-)plugin.xml (-3 / +13 lines)
Lines 418-434 Link Here
418
      </constraint>
418
      </constraint>
419
      <group-member id="modules"/>
419
      <group-member id="modules"/>
420
    </project-facet-version>
420
    </project-facet-version>
421
    
422
    <project-facet-version facet="jst.web" version="3.0">
423
      <constraint>
424
        <and>
425
          <requires facet="jst.java" version="[5.0"/>
426
          <conflicts group="modules"/>
427
        </and>
428
      </constraint>
429
      <group-member id="modules"/>
430
    </project-facet-version>
421
431
422
    <action facet="jst.web" version="[2.2-2.5]" type="INSTALL" id="jst.web.install">
432
    <action facet="jst.web" version="[2.2-3.0]" type="INSTALL" id="jst.web.install">
423
      <delegate class="org.eclipse.jst.j2ee.web.project.facet.WebFacetInstallDelegate"/>
433
      <delegate class="org.eclipse.jst.j2ee.web.project.facet.WebFacetInstallDelegate"/>
424
      <config-factory class="org.eclipse.jst.j2ee.web.project.facet.WebFacetInstallDataModelProvider"/>
434
      <config-factory class="org.eclipse.jst.j2ee.web.project.facet.WebFacetInstallDataModelProvider"/>
425
    </action>
435
    </action>
426
436
427
    <event-handler facet="jst.web" version="[2.2-2.5]" type="RUNTIME_CHANGED">
437
    <event-handler facet="jst.web" version="[2.2-3.0]" type="RUNTIME_CHANGED">
428
      <delegate class="org.eclipse.jst.j2ee.web.project.facet.WebFacetRuntimeChangedDelegate"/>
438
      <delegate class="org.eclipse.jst.j2ee.web.project.facet.WebFacetRuntimeChangedDelegate"/>
429
    </event-handler>
439
    </event-handler>
430
    
440
    
431
    <event-handler type="POST_INSTALL" facet="jst.web" version="[2.2-2.5]">
441
    <event-handler type="POST_INSTALL" facet="jst.web" version="[2.2-3.0]">
432
      <delegate class="org.eclipse.jst.j2ee.web.project.facet.WebFacetPostInstallDelegate"/>
442
      <delegate class="org.eclipse.jst.j2ee.web.project.facet.WebFacetPostInstallDelegate"/>
433
    </event-handler>
443
    </event-handler>
434
    
444
    
(-)plugin.xml (-3 / +13 lines)
Lines 102-117 Link Here
102
      <group-member id="modules"/>
102
      <group-member id="modules"/>
103
    </project-facet-version>
103
    </project-facet-version>
104
104
105
    <action facet="jst.connector" version="1.0,1.5" type="INSTALL" id="jst.connector.install">
105
    <project-facet-version facet="jst.connector" version="1.6">
106
      <constraint>
107
        <and>
108
          <requires facet="jst.java" version="[5.0"/>
109
          <conflicts group="modules"/>
110
        </and>
111
      </constraint>
112
      <group-member id="modules"/>
113
    </project-facet-version>
114
115
    <action facet="jst.connector" version="[1.0-1.6]" type="INSTALL" id="jst.connector.install">
106
      <delegate class="org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetInstallDelegate"/>
116
      <delegate class="org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetInstallDelegate"/>
107
      <config-factory class="org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetInstallDataModelProvider"/>
117
      <config-factory class="org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetInstallDataModelProvider"/>
108
    </action>
118
    </action>
109
    
119
    
110
    <event-handler facet="jst.connector" version="1.0,1.5" type="POST_INSTALL">
120
    <event-handler facet="jst.connector" version="[1.0-1.6]" type="POST_INSTALL">
111
      <delegate class="org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetPostInstallDelegate"/>
121
      <delegate class="org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetPostInstallDelegate"/>
112
    </event-handler>
122
    </event-handler>
113
    
123
    
114
    <event-handler facet="jst.connector" version="1.0,1.5" type="RUNTIME_CHANGED">
124
    <event-handler facet="jst.connector" version="[1.0-1.6]" type="RUNTIME_CHANGED">
115
      <delegate class="org.eclipse.jst.j2ee.project.facet.J2EEFacetRuntimeChangedDelegate"/>
125
      <delegate class="org.eclipse.jst.j2ee.project.facet.J2EEFacetRuntimeChangedDelegate"/>
116
    </event-handler>
126
    </event-handler>
117
    
127
    
(-)ejb_ui/org/eclipse/jst/ejb/ui/project/facet/EjbFacetInstallPage.java (-3 / +5 lines)
Lines 12-18 Link Here
12
12
13
import org.eclipse.jface.dialogs.Dialog;
13
import org.eclipse.jface.dialogs.Dialog;
14
import org.eclipse.jst.ejb.ui.internal.util.EJBUIMessages;
14
import org.eclipse.jst.ejb.ui.internal.util.EJBUIMessages;
15
import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
15
import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
16
import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
17
import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
16
import org.eclipse.jst.j2ee.internal.ejb.project.operations.IEjbFacetInstallDataModelProperties;
18
import org.eclipse.jst.j2ee.internal.ejb.project.operations.IEjbFacetInstallDataModelProperties;
17
import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
19
import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
18
import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage;
20
import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage;
Lines 24-30 Link Here
24
import org.eclipse.swt.widgets.Control;
26
import org.eclipse.swt.widgets.Control;
25
import org.eclipse.swt.widgets.Label;
27
import org.eclipse.swt.widgets.Label;
26
import org.eclipse.swt.widgets.Text;
28
import org.eclipse.swt.widgets.Text;
27
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
28
29
29
30
30
31
Lines 70-77 Link Here
70
	
71
	
71
    protected void handleFacetVersionChangedEvent()
72
    protected void handleFacetVersionChangedEvent()
72
    {
73
    {
73
        final IProjectFacetVersion fv = (IProjectFacetVersion) this.model.getProperty( FACET_VERSION );
74
        String fv = model.getStringProperty(FACET_VERSION_STR);
74
        this.addDD.setVisible( fv == EJB_30 );
75
        boolean isEJB30OrGreater = J2EEVersionUtil.convertVersionStringToInt(fv) >= J2EEVersionConstants.EJB_3_0_ID;
76
        this.addDD.setVisible(isEJB30OrGreater);
75
    }
77
    }
76
78
77
	private void createEJBClientGroup(Composite parent) {
79
	private void createEJBClientGroup(Composite parent) {
(-)archive/org/eclipse/jst/jee/util/internal/JavaEEQuickPeek.java (+21 lines)
Lines 179-184 Link Here
179
						version = J2EEVersionConstants.J2EE_1_4_ID;
179
						version = J2EEVersionConstants.J2EE_1_4_ID;
180
					} else if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_5)) {
180
					} else if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_5)) {
181
						version = J2EEVersionConstants.JEE_5_0_ID;
181
						version = J2EEVersionConstants.JEE_5_0_ID;
182
					} else if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_6)) {
183
						version = J2EEVersionConstants.JEE_6_0_ID;
182
					}
184
					}
183
				}
185
				}
184
				break;
186
				break;
Lines 196-201 Link Here
196
						version = J2EEVersionConstants.J2EE_1_4_ID;
198
						version = J2EEVersionConstants.J2EE_1_4_ID;
197
					} else if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_5)) {
199
					} else if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_5)) {
198
						version = J2EEVersionConstants.JEE_5_0_ID;
200
						version = J2EEVersionConstants.JEE_5_0_ID;
201
					} else if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_6)) {
202
						version = J2EEVersionConstants.JEE_6_0_ID;
199
					}
203
					}
200
				}
204
				}
201
				break;
205
				break;
Lines 211-216 Link Here
211
						version = J2EEVersionConstants.EJB_2_1_ID;
215
						version = J2EEVersionConstants.EJB_2_1_ID;
212
					} else if (schemaName.equals(J2EEConstants.EJBJAR_SCHEMA_3_0)) {
216
					} else if (schemaName.equals(J2EEConstants.EJBJAR_SCHEMA_3_0)) {
213
						version = J2EEVersionConstants.EJB_3_0_ID;
217
						version = J2EEVersionConstants.EJB_3_0_ID;
218
					} else if (schemaName.equals(J2EEConstants.EJBJAR_SCHEMA_3_1)) {
219
						version = J2EEVersionConstants.EJB_3_1_ID;
214
					}
220
					}
215
				}
221
				}
216
				break;
222
				break;
Lines 222-227 Link Here
222
				} else if (schemaName != null) {
228
				} else if (schemaName != null) {
223
					if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_5)) {
229
					if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_5)) {
224
						version = J2EEVersionConstants.JCA_1_5_ID;
230
						version = J2EEVersionConstants.JCA_1_5_ID;
231
					} else if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_6)) {
232
						version = J2EEVersionConstants.JCA_1_6_ID;
225
					}
233
					}
226
				}
234
				}
227
				break;
235
				break;
Lines 237-242 Link Here
237
						version = J2EEVersionConstants.WEB_2_4_ID;
245
						version = J2EEVersionConstants.WEB_2_4_ID;
238
					} else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_2_5)) {
246
					} else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_2_5)) {
239
						version = J2EEVersionConstants.WEB_2_5_ID;
247
						version = J2EEVersionConstants.WEB_2_5_ID;
248
					} else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_3_0)) {
249
						version = J2EEVersionConstants.WEB_3_0_ID;
240
					}
250
					}
241
				}
251
				}
242
				break;
252
				break;
Lines 293-298 Link Here
293
					break;
303
					break;
294
				case J2EEVersionConstants.EJB_3_0_ID:
304
				case J2EEVersionConstants.EJB_3_0_ID:
295
					javaEEVersion = J2EEConstants.JEE_5_0_ID;
305
					javaEEVersion = J2EEConstants.JEE_5_0_ID;
306
					break;
307
				case J2EEVersionConstants.EJB_3_1_ID:
308
					javaEEVersion = J2EEConstants.JEE_6_0_ID;
309
					break;
296
				}
310
				}
297
				break;
311
				break;
298
			case CONNECTOR_TYPE:
312
			case CONNECTOR_TYPE:
Lines 303-308 Link Here
303
				case J2EEVersionConstants.JCA_1_5_ID:
317
				case J2EEVersionConstants.JCA_1_5_ID:
304
					javaEEVersion = J2EEConstants.J2EE_1_4_ID;
318
					javaEEVersion = J2EEConstants.J2EE_1_4_ID;
305
					break;
319
					break;
320
				case J2EEVersionConstants.JCA_1_6_ID:
321
					javaEEVersion = J2EEConstants.JEE_6_0_ID;
322
					break;
306
				}
323
				}
307
				break;
324
				break;
308
			case WEB_TYPE:
325
			case WEB_TYPE:
Lines 318-323 Link Here
318
					break;
335
					break;
319
				case J2EEVersionConstants.WEB_2_5_ID:
336
				case J2EEVersionConstants.WEB_2_5_ID:
320
					javaEEVersion = J2EEVersionConstants.JEE_5_0_ID;
337
					javaEEVersion = J2EEVersionConstants.JEE_5_0_ID;
338
					break;
339
				case J2EEVersionConstants.WEB_3_0_ID:
340
					javaEEVersion = J2EEVersionConstants.JEE_6_0_ID;
341
					break;
321
				}
342
				}
322
				break;
343
				break;
323
		case WEBSERVICES_TYPE:
344
		case WEBSERVICES_TYPE:
(-)mofj2ee/org/eclipse/jst/j2ee/jca/internal/impl/ConnectorResourceImpl.java (+2 lines)
Lines 160-165 Link Here
160
				return J2EEVersionConstants.J2EE_1_3_ID;
160
				return J2EEVersionConstants.J2EE_1_3_ID;
161
			case J2EEVersionConstants.JCA_1_5_ID :
161
			case J2EEVersionConstants.JCA_1_5_ID :
162
				return J2EEVersionConstants.J2EE_1_4_ID;
162
				return J2EEVersionConstants.J2EE_1_4_ID;
163
			case J2EEVersionConstants.JCA_1_6_ID :
164
				return J2EEVersionConstants.JEE_6_0_ID;
163
			default :
165
			default :
164
			return J2EEVersionConstants.J2EE_1_4_ID;
166
			return J2EEVersionConstants.J2EE_1_4_ID;
165
		}
167
		}
(-)commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/util/J2EEFileUtil.java (-19 / +41 lines)
Lines 294-303 Link Here
294
              version = J2EEVersionConstants.J2EE_1_2_ID;
294
              version = J2EEVersionConstants.J2EE_1_2_ID;
295
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_3_TEXT)) {
295
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_3_TEXT)) {
296
              version = J2EEVersionConstants.J2EE_1_3_ID;
296
              version = J2EEVersionConstants.J2EE_1_3_ID;
297
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_4_TEXT)) { //EJB3
297
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_4_TEXT)) {
298
              version = J2EEVersionConstants.J2EE_1_4_ID;
298
              version = J2EEVersionConstants.J2EE_1_4_ID;
299
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) {   //EJB3
299
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) {
300
              version = J2EEVersionConstants.JEE_5_0_ID;                          //EJB3
300
              version = J2EEVersionConstants.JEE_5_0_ID;
301
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_6_0_TEXT)) {
302
              version = J2EEVersionConstants.JEE_6_0_ID;
301
           }
303
           }
302
        } else if (isEJBJarFile(fileURI)) {
304
        } else if (isEJBJarFile(fileURI)) {
303
           if (null == versionAttr) {
305
           if (null == versionAttr) {
Lines 306-315 Link Here
306
              version = J2EEVersionConstants.EJB_1_1_ID;
308
              version = J2EEVersionConstants.EJB_1_1_ID;
307
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_0_TEXT)) {
309
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_0_TEXT)) {
308
              version = J2EEVersionConstants.EJB_2_0_ID;
310
              version = J2EEVersionConstants.EJB_2_0_ID;
309
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_1_TEXT)) { //EJB3
311
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_1_TEXT)) {
310
              version = J2EEVersionConstants.EJB_2_1_ID;
312
              version = J2EEVersionConstants.EJB_2_1_ID;
311
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) { //EJB3
313
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) {
312
              version = J2EEVersionConstants.EJB_3_0_ID;                           //EJB3
314
              version = J2EEVersionConstants.EJB_3_0_ID; 
315
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_3_1_TEXT)) { 
316
              version = J2EEVersionConstants.EJB_3_1_ID;
313
           }
317
           }
314
        } else if (isApplicationClientFile(fileURI)) {
318
        } else if (isApplicationClientFile(fileURI)) {
315
           if (null == versionAttr) {
319
           if (null == versionAttr) {
Lines 320-327 Link Here
320
              version = J2EEVersionConstants.J2EE_1_3_ID;
324
              version = J2EEVersionConstants.J2EE_1_3_ID;
321
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_4_TEXT)) {
325
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_4_TEXT)) {
322
              version = J2EEVersionConstants.J2EE_1_4_ID;
326
              version = J2EEVersionConstants.J2EE_1_4_ID;
323
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) {   //EJB3
327
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) {
324
              version = J2EEVersionConstants.JEE_5_0_ID;                          //EJB3
328
              version = J2EEVersionConstants.JEE_5_0_ID;
329
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_6_0_TEXT)) {
330
              version = J2EEVersionConstants.JEE_6_0_ID;
325
           } 
331
           } 
326
        } else if (isWARFile(fileURI)) {
332
        } else if (isWARFile(fileURI)) {
327
           if (null == versionAttr) {
333
           if (null == versionAttr) {
Lines 332-345 Link Here
332
              version = J2EEVersionConstants.WEB_2_3_ID;
338
              version = J2EEVersionConstants.WEB_2_3_ID;
333
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_4_TEXT)) {
339
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_4_TEXT)) {
334
              version = J2EEVersionConstants.WEB_2_4_ID;
340
              version = J2EEVersionConstants.WEB_2_4_ID;
335
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_5_TEXT)) { //EJB3
341
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_5_TEXT)) {
336
              version = J2EEVersionConstants.WEB_2_5_ID;                           //EJB3
342
              version = J2EEVersionConstants.WEB_2_5_ID;
343
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) {
344
              version = J2EEVersionConstants.WEB_3_0_ID;
337
           }
345
           }
338
        } else if (isRARFile(fileURI)) {
346
        } else if (isRARFile(fileURI)) {
339
           if (null == versionAttr) {
347
           if (null == versionAttr) {
340
              version = J2EEVersionConstants.JCA_1_5_ID;
348
              version = J2EEVersionConstants.JCA_1_5_ID;
341
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_0_TEXT)) {
349
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_0_TEXT)) {
342
              version = J2EEVersionConstants.JCA_1_0_ID;
350
              version = J2EEVersionConstants.JCA_1_0_ID;
351
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_5_TEXT)) {
352
              version = J2EEVersionConstants.JCA_1_5_ID;
353
           } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_6_TEXT)) {
354
              version = J2EEVersionConstants.JCA_1_6_ID;
343
           } else {
355
           } else {
344
              version = J2EEVersionConstants.JCA_1_5_ID;
356
              version = J2EEVersionConstants.JCA_1_5_ID;
345
           }
357
           }
Lines 351-381 Link Here
351
	private static int lookupVersion(String fileURI, String schemaName) {
363
	private static int lookupVersion(String fileURI, String schemaName) {
352
        int version = -1;
364
        int version = -1;
353
        if (isEARFile(fileURI)) {
365
        if (isEARFile(fileURI)) {
354
           if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_5)) {          //EJB3
366
           if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_6)) {
355
              version = J2EEVersionConstants.JEE_5_0_ID;                        //EJB3
367
              version = J2EEVersionConstants.JEE_6_0_ID;
368
           } else if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_5)) {
369
              version = J2EEVersionConstants.JEE_5_0_ID;
356
           } else if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_1_4)) {
370
           } else if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_1_4)) {
357
              version = J2EEVersionConstants.J2EE_1_4_ID;
371
              version = J2EEVersionConstants.J2EE_1_4_ID;
358
           }
372
           }
359
        } else if (isEJBJarFile(fileURI)) {
373
        } else if (isEJBJarFile(fileURI)) {
360
           if ((schemaName.indexOf(J2EEConstants.EJBJAR_SCHEMA_3_0_NS)) != -1) { //EJB3
374
           if ((schemaName.indexOf(J2EEConstants.EJBJAR_SCHEMA_3_1_NS)) != -1) {
361
              version = J2EEVersionConstants.EJB_3_0_ID;                         //EJB3
375
              version = J2EEVersionConstants.EJB_3_1_ID;   
376
           } else if ((schemaName.indexOf(J2EEConstants.EJBJAR_SCHEMA_3_0_NS)) != -1) {
377
              version = J2EEVersionConstants.EJB_3_0_ID;
362
           } else if ((schemaName.indexOf(J2EEConstants.EJBJAR_SCHEMA_2_1_NS)) != -1) {
378
           } else if ((schemaName.indexOf(J2EEConstants.EJBJAR_SCHEMA_2_1_NS)) != -1) {
363
              version = J2EEVersionConstants.EJB_2_1_ID;
379
              version = J2EEVersionConstants.EJB_2_1_ID;
364
           }
380
           }
365
        } else if (isApplicationClientFile(fileURI)) {
381
        } else if (isApplicationClientFile(fileURI)) {
366
           if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_5)) {           //EJB3
382
           if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_6)) {
367
              version = J2EEVersionConstants.JEE_5_0_ID;                        //EJB3
383
              version = J2EEVersionConstants.JEE_6_0_ID;
384
           } else if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_5)) {
385
              version = J2EEVersionConstants.JEE_5_0_ID;
368
           } else if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_1_4)) {
386
           } else if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_1_4)) {
369
              version = J2EEVersionConstants.J2EE_1_4_ID;
387
              version = J2EEVersionConstants.J2EE_1_4_ID;
370
           }
388
           }
371
        } else if (isWARFile(fileURI)) {
389
        } else if (isWARFile(fileURI)) {
372
           if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_2_5)) {             //EJB3
390
           if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_3_0)) {
373
              version = J2EEVersionConstants.WEB_2_5_ID;                         //EJB3
391
              version = J2EEVersionConstants.WEB_3_0_ID;
392
           } else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_2_5)) {
393
              version = J2EEVersionConstants.WEB_2_5_ID;
374
           } else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_2_4)) {
394
           } else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_2_4)) {
375
              version = J2EEVersionConstants.WEB_2_4_ID;
395
              version = J2EEVersionConstants.WEB_2_4_ID;
376
           }
396
           }
377
        } else if (isRARFile(fileURI)) {
397
        } else if (isRARFile(fileURI)) {
378
           if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_5)) {
398
           if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_6)) {
399
              version = J2EEVersionConstants.JCA_1_6_ID;
400
           } else if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_5)) {
379
              version = J2EEVersionConstants.JCA_1_5_ID;
401
              version = J2EEVersionConstants.JCA_1_5_ID;
380
           }
402
           }
381
        }
403
        }
(-)mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBResourceImpl.java (+10 lines)
Lines 148-153 Link Here
148
				return J2EEVersionConstants.J2EE_1_4_ID;
148
				return J2EEVersionConstants.J2EE_1_4_ID;
149
			case J2EEVersionConstants.EJB_3_0_ID :
149
			case J2EEVersionConstants.EJB_3_0_ID :
150
				return J2EEVersionConstants.JEE_5_0_ID;
150
				return J2EEVersionConstants.JEE_5_0_ID;
151
			case J2EEVersionConstants.EJB_3_1_ID :
152
				return J2EEVersionConstants.JEE_6_0_ID;
151
			default :
153
			default :
152
			return J2EEVersionConstants.J2EE_1_4_ID;
154
			return J2EEVersionConstants.J2EE_1_4_ID;
153
		}
155
		}
Lines 170-175 Link Here
170
	public void setModuleVersionID(int id) {
172
	public void setModuleVersionID(int id) {
171
		super.setVersionID(id);
173
		super.setVersionID(id);
172
		switch (id) {
174
		switch (id) {
175
				case (EJB_3_1_ID) :
176
					super.setDoctypeValues(null, null);
177
					primSetVersionID(EJB_3_1_ID);
178
					break;
173
				case (EJB_3_0_ID) :
179
				case (EJB_3_0_ID) :
174
					super.setDoctypeValues(null, null);
180
					super.setDoctypeValues(null, null);
175
					primSetVersionID(EJB_3_0_ID);
181
					primSetVersionID(EJB_3_0_ID);
Lines 195-200 Link Here
195
	 */
201
	 */
196
	public void setJ2EEVersionID(int id) {
202
	public void setJ2EEVersionID(int id) {
197
	switch (id) {
203
	switch (id) {
204
		case (JEE_6_0_ID) :
205
					primSetDoctypeValues(null, null);
206
					primSetVersionID(EJB_3_1_ID);
207
					break;
198
		case (JEE_5_0_ID) :
208
		case (JEE_5_0_ID) :
199
					primSetDoctypeValues(null, null);
209
					primSetDoctypeValues(null, null);
200
					primSetVersionID(EJB_3_0_ID);
210
					primSetVersionID(EJB_3_0_ID);
(-)mofj2ee/org/eclipse/jst/j2ee/internal/J2EEConstants.java (-5 / +14 lines)
Lines 51-57 Link Here
51
    String APP_CLIENT_SYSTEMID_1_3          =       "http://java.sun.com/dtd/application-client_1_3.dtd"; //$NON-NLS-1$
51
    String APP_CLIENT_SYSTEMID_1_3          =       "http://java.sun.com/dtd/application-client_1_3.dtd"; //$NON-NLS-1$
52
    String APP_CLIENT_ALT_SYSTEMID_1_3      =       "http://java.sun.com/dtd/application-client_1.3.dtd"; //$NON-NLS-1$
52
    String APP_CLIENT_ALT_SYSTEMID_1_3      =       "http://java.sun.com/dtd/application-client_1.3.dtd"; //$NON-NLS-1$
53
    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$
53
    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$
54
    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
54
    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$
55
    // The following is still set to the Java EE 5 schema, because to date the Java EE 6 one is not yet defined
56
    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
55
    
57
    
56
    //Application constants
58
    //Application constants
57
    /** "Application_ID"                                                                                                    */
59
    /** "Application_ID"                                                                                                    */
Lines 74-80 Link Here
74
    String APPLICATION_SYSTEMID_1_4         =       "http://java.sun.com/dtd/application_1_4.dtd"; //$NON-NLS-1$
76
    String APPLICATION_SYSTEMID_1_4         =       "http://java.sun.com/dtd/application_1_4.dtd"; //$NON-NLS-1$
75
    String APPLICATION_ALT_SYSTEMID_1_4 =  "http://java.sun.com/dtd/application_1_4.dtd"; //$NON-NLS-1$
77
    String APPLICATION_ALT_SYSTEMID_1_4 =  "http://java.sun.com/dtd/application_1_4.dtd"; //$NON-NLS-1$
76
    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$
78
    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$
77
    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
79
    String APPLICATION_SCHEMA_5         =  "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"; //$NON-NLS-1$
80
    // The following is still set to the Java EE 5 schema, because to date the Java EE 6 one is not yet defined
81
    String APPLICATION_SCHEMA_6         =  "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"; //$NON-NLS-1$ 
78
    
82
    
79
    //EJB Jar Constants
83
    //EJB Jar Constants
80
    /** "ejb-jar_ID"                                                                                                                */
84
    /** "ejb-jar_ID"                                                                                                                */
Lines 96-103 Link Here
96
    String EJBJAR_ALT_SYSTEMID_2_0  =   "http://java.sun.com/dtd/ejb-jar_2.0.dtd"; //$NON-NLS-1$
100
    String EJBJAR_ALT_SYSTEMID_2_0  =   "http://java.sun.com/dtd/ejb-jar_2.0.dtd"; //$NON-NLS-1$
97
    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$
101
    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$
98
    String EJBJAR_SCHEMA_2_1_NS     =   "http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd";//$NON-NLS-1$
102
    String EJBJAR_SCHEMA_2_1_NS     =   "http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd";//$NON-NLS-1$
99
    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
103
    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$ 
100
    String EJBJAR_SCHEMA_3_0_NS     =   "http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"; //$NON-NLS-1$ // EJB3
104
    String EJBJAR_SCHEMA_3_0_NS     =   "http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"; //$NON-NLS-1$
105
    // The following two are still set to the EJB 3.0 schema, because to date the EJB 3.1 one is not yet defined
106
    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$ 
107
    String EJBJAR_SCHEMA_3_1_NS     =   "http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"; //$NON-NLS-1$ 
101
    
108
    
102
    // EAR constants
109
    // EAR constants
103
    
110
    
Lines 124-129 Link Here
124
    String WEBAPP_ALT_SYSTEMID_2_3  =       "http://java.sun.com/dtd/web-app_2.3.dtd"; //$NON-NLS-1$
131
    String WEBAPP_ALT_SYSTEMID_2_3  =       "http://java.sun.com/dtd/web-app_2.3.dtd"; //$NON-NLS-1$
125
    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$
132
    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$
126
    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$
133
    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$
134
    // The following is still set to the Servlet 2.5 schema, because to date the Servlet 3.0 one is not yet defined
135
    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$
127
    //J2C Resource Adapter Constants
136
    //J2C Resource Adapter Constants
128
    /** "J2CResourceAdapter_ID"                                                                                             */
137
    /** "J2CResourceAdapter_ID"                                                                                             */
129
    String RAR_ID                                           =       "J2CResourceAdapter_ID"; //$NON-NLS-1$
138
    String RAR_ID                                           =       "J2CResourceAdapter_ID"; //$NON-NLS-1$
Lines 139-145 Link Here
139
    String CONNECTOR_SYSTEMID_1_0           =       "http://java.sun.com/dtd/connector_1_0.dtd"; //$NON-NLS-1$
148
    String CONNECTOR_SYSTEMID_1_0           =       "http://java.sun.com/dtd/connector_1_0.dtd"; //$NON-NLS-1$
140
    String CONNECTOR_ALT_SYSTEMID_1_0       =       "http://java.sun.com/dtd/connector_1.0.dtd"; //$NON-NLS-1$
149
    String CONNECTOR_ALT_SYSTEMID_1_0       =       "http://java.sun.com/dtd/connector_1.0.dtd"; //$NON-NLS-1$
141
    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$
150
    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$
142
    
151
    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$
143
    //Web Services Constants
152
    //Web Services Constants
144
    /** Doc type for webservices deployment descriptors */
153
    /** Doc type for webservices deployment descriptors */
145
    String WEB_SERVICES_CLIENT_DOCTYPE      = "webservicesclient";  //$NON-NLS-1$
154
    String WEB_SERVICES_CLIENT_DOCTYPE      = "webservicesclient";  //$NON-NLS-1$
(-)mofj2ee/org/eclipse/jst/j2ee/internal/J2EEVersionConstants.java (+11 lines)
Lines 31-45 Link Here
31
	public int J2EE_1_3_ID = 13;
31
	public int J2EE_1_3_ID = 13;
32
	public int J2EE_1_4_ID = 14;
32
	public int J2EE_1_4_ID = 14;
33
	public int JEE_5_0_ID = 50;
33
	public int JEE_5_0_ID = 50;
34
	public int JEE_6_0_ID = 60;
34
	public int EJB_1_0_ID = 10;	
35
	public int EJB_1_0_ID = 10;	
35
	public int EJB_1_1_ID = 11;	
36
	public int EJB_1_1_ID = 11;	
36
	public int EJB_2_0_ID = 20;	
37
	public int EJB_2_0_ID = 20;	
37
	public int EJB_2_1_ID = 21;	
38
	public int EJB_2_1_ID = 21;	
38
	public int EJB_3_0_ID = 30;
39
	public int EJB_3_0_ID = 30;
40
	public int EJB_3_1_ID = 31;
39
	public int WEB_2_2_ID = 22;
41
	public int WEB_2_2_ID = 22;
40
	public int WEB_2_3_ID = 23;
42
	public int WEB_2_3_ID = 23;
41
	public int WEB_2_4_ID = 24;
43
	public int WEB_2_4_ID = 24;
42
	public int WEB_2_5_ID = 25;
44
	public int WEB_2_5_ID = 25;
45
	public int WEB_3_0_ID = 30;
43
	public int TAGLIB_1_1_ID = 11;
46
	public int TAGLIB_1_1_ID = 11;
44
	public int TAGLIB_1_2_ID = 12;
47
	public int TAGLIB_1_2_ID = 12;
45
	public int TAGLIB_2_0_ID = 20;
48
	public int TAGLIB_2_0_ID = 20;
Lines 50-57 Link Here
50
	public int SERVLET_2_3 = 23;
53
	public int SERVLET_2_3 = 23;
51
	public int SERVLET_2_4 = 24;
54
	public int SERVLET_2_4 = 24;
52
	public int SERVLET_2_5 = 25;
55
	public int SERVLET_2_5 = 25;
56
	public int SERVLET_3_0 = 30;
53
	public int JCA_1_0_ID = 10;
57
	public int JCA_1_0_ID = 10;
54
	public int JCA_1_5_ID = 15;
58
	public int JCA_1_5_ID = 15;
59
	public int JCA_1_6_ID = 16;
55
	public int WEBSERVICES_1_0_ID = 10;
60
	public int WEBSERVICES_1_0_ID = 10;
56
	public int WEBSERVICES_1_1_ID = 11;
61
	public int WEBSERVICES_1_1_ID = 11;
57
	public int WEBSERVICES_1_2_ID = 12;
62
	public int WEBSERVICES_1_2_ID = 12;
Lines 65-70 Link Here
65
	public int VERSION_1_3 = 13;	
70
	public int VERSION_1_3 = 13;	
66
	public int VERSION_1_4 = 14;
71
	public int VERSION_1_4 = 14;
67
	public int VERSION_1_5 = 15;
72
	public int VERSION_1_5 = 15;
73
	public int VERSION_1_6 = 16;
68
	public int VERSION_2_0 = 20;
74
	public int VERSION_2_0 = 20;
69
	public int VERSION_2_1 = 21;	
75
	public int VERSION_2_1 = 21;	
70
	public int VERSION_2_2 = 22;	
76
	public int VERSION_2_2 = 22;	
Lines 72-78 Link Here
72
	public int VERSION_2_4 = 24;	
78
	public int VERSION_2_4 = 24;	
73
	public int VERSION_2_5 = 25; 
79
	public int VERSION_2_5 = 25; 
74
	public int VERSION_3_0 = 30; 
80
	public int VERSION_3_0 = 30; 
81
	public int VERSION_3_1 = 31; 
75
	public int VERSION_5_0 = 50; 
82
	public int VERSION_5_0 = 50; 
83
	public int VERSION_6_0 = 60; 
76
	
84
	
77
	public String VERSION_1_0_TEXT		= "1.0"; //$NON-NLS-1$
85
	public String VERSION_1_0_TEXT		= "1.0"; //$NON-NLS-1$
78
	public String VERSION_1_1_TEXT    	= "1.1"; //$NON-NLS-1$
86
	public String VERSION_1_1_TEXT    	= "1.1"; //$NON-NLS-1$
Lines 80-85 Link Here
80
	public String VERSION_1_3_TEXT		= "1.3"; //$NON-NLS-1$
88
	public String VERSION_1_3_TEXT		= "1.3"; //$NON-NLS-1$
81
	public String VERSION_1_4_TEXT		= "1.4"; //$NON-NLS-1$
89
	public String VERSION_1_4_TEXT		= "1.4"; //$NON-NLS-1$
82
	public String VERSION_1_5_TEXT		= "1.5"; //$NON-NLS-1$
90
	public String VERSION_1_5_TEXT		= "1.5"; //$NON-NLS-1$
91
	public String VERSION_1_6_TEXT		= "1.6"; //$NON-NLS-1$
83
	public String VERSION_2_0_TEXT		= "2.0"; //$NON-NLS-1$
92
	public String VERSION_2_0_TEXT		= "2.0"; //$NON-NLS-1$
84
	public String VERSION_2_1_TEXT		= "2.1"; //$NON-NLS-1$
93
	public String VERSION_2_1_TEXT		= "2.1"; //$NON-NLS-1$
85
	public String VERSION_2_2_TEXT		= "2.2"; //$NON-NLS-1$
94
	public String VERSION_2_2_TEXT		= "2.2"; //$NON-NLS-1$
Lines 87-93 Link Here
87
	public String VERSION_2_4_TEXT		= "2.4"; //$NON-NLS-1$
96
	public String VERSION_2_4_TEXT		= "2.4"; //$NON-NLS-1$
88
	public String VERSION_2_5_TEXT		= "2.5"; //$NON-NLS-1$
97
	public String VERSION_2_5_TEXT		= "2.5"; //$NON-NLS-1$
89
	public String VERSION_3_0_TEXT		= "3.0"; //$NON-NLS-1$
98
	public String VERSION_3_0_TEXT		= "3.0"; //$NON-NLS-1$
99
	public String VERSION_3_1_TEXT		= "3.1"; //$NON-NLS-1$
90
	public String VERSION_5_0_TEXT		= "5.0"; //$NON-NLS-1$
100
	public String VERSION_5_0_TEXT		= "5.0"; //$NON-NLS-1$
101
	public String VERSION_6_0_TEXT		= "6.0"; //$NON-NLS-1$
91
	public String VERSION_5_TEXT        = "5";   //$NON-NLS-1$
102
	public String VERSION_5_TEXT        = "5";   //$NON-NLS-1$
92
					
103
					
93
}
104
}
(-)ejbcreation/org/eclipse/jst/j2ee/ejb/project/facet/EjbFacetInstallDelegate.java (-1 / +18 lines)
Lines 100-106 Link Here
100
				}
100
				}
101
			}
101
			}
102
			
102
			
103
            if( fv == IJ2EEFacetConstants.EJB_30 )
103
			if( fv == IJ2EEFacetConstants.EJB_31 )
104
            {
105
                if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){
106
                    // Create the deployment descriptor (ejb-jar.xml) if one doesn't exist
107
                    IFile ejbJarXmlFile = ejbFolder.getFile(J2EEConstants.EJBJAR_DD_URI);
108
                    if (!ejbJarXmlFile.exists()) {
109
                        try {
110
                        	// The content is the one for EJB 3.0 DD, because to date the EJB 3.1 DD is not yet defined
111
                            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$
112
                            ejbJarXmlFile.create(new ByteArrayInputStream(ejbJarXmlContents.getBytes("UTF-8")), true, monitor); //$NON-NLS-1$
113
                        } catch (UnsupportedEncodingException e) {
114
                            EjbPlugin.logError(e);
115
                        }
116
                    }
117
                }
118
            } 
119
			else if( fv == IJ2EEFacetConstants.EJB_30 )
104
            {
120
            {
105
                if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){
121
                if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){
106
                    // Create the deployment descriptor (ejb-jar.xml) if one doesn't exist
122
                    // Create the deployment descriptor (ejb-jar.xml) if one doesn't exist
Lines 163-166 Link Here
163
			}
179
			}
164
		}
180
		}
165
	}
181
	}
182
	
166
}
183
}
(-)plugin.xml (-3 / +13 lines)
Lines 185-201 Link Here
185
    	</constraint>
185
    	</constraint>
186
      	<group-member id="modules"/>
186
      	<group-member id="modules"/>
187
    </project-facet-version>
187
    </project-facet-version>
188
189
	<project-facet-version facet="jst.ejb" version="3.1">
190
		<constraint>
191
 	       <and>
192
 		       	<requires facet="jst.java" version="[5.0"/>
193
 	         	<conflicts group="modules"/>
194
 	       </and>
195
    	</constraint>
196
      	<group-member id="modules"/>
197
    </project-facet-version>
188
    
198
    
189
    <action facet="jst.ejb" version="[1.1-3.0]" type="INSTALL" id="jst.ejb.install">
199
    <action facet="jst.ejb" version="[1.1-3.1]" type="INSTALL" id="jst.ejb.install">
190
      <delegate class="org.eclipse.jst.j2ee.ejb.project.facet.EjbFacetInstallDelegate"/>
200
      <delegate class="org.eclipse.jst.j2ee.ejb.project.facet.EjbFacetInstallDelegate"/>
191
      <config-factory class="org.eclipse.jst.j2ee.internal.ejb.project.operations.EjbFacetInstallDataModelProvider"/>
201
      <config-factory class="org.eclipse.jst.j2ee.internal.ejb.project.operations.EjbFacetInstallDataModelProvider"/>
192
    </action>
202
    </action>
193
    
203
    
194
    <event-handler facet="jst.ejb" version="[1.1-3.0]" type="POST_INSTALL">
204
    <event-handler facet="jst.ejb" version="[1.1-3.1]" type="POST_INSTALL">
195
      <delegate class="org.eclipse.jst.j2ee.ejb.project.facet.EjbFacetPostInstallDelegate"/>
205
      <delegate class="org.eclipse.jst.j2ee.ejb.project.facet.EjbFacetPostInstallDelegate"/>
196
    </event-handler>
206
    </event-handler>
197
    
207
    
198
    <event-handler facet="jst.ejb" version="[1.1-3.0]" type="RUNTIME_CHANGED">
208
    <event-handler facet="jst.ejb" version="[1.1-3.1]" type="RUNTIME_CHANGED">
199
      <delegate class="org.eclipse.jst.j2ee.project.facet.J2EEFacetRuntimeChangedDelegate"/>
209
      <delegate class="org.eclipse.jst.j2ee.project.facet.J2EEFacetRuntimeChangedDelegate"/>
200
    </event-handler>
210
    </event-handler>
201
    
211
    
(-)ejbcreation/org/eclipse/jst/j2ee/internal/ejb/project/operations/EjbFacetInstallDataModelProvider.java (-2 / +3 lines)
Lines 15-20 Link Here
15
import org.eclipse.core.runtime.IPath;
15
import org.eclipse.core.runtime.IPath;
16
import org.eclipse.core.runtime.IStatus;
16
import org.eclipse.core.runtime.IStatus;
17
import org.eclipse.core.runtime.Path;
17
import org.eclipse.core.runtime.Path;
18
import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
18
import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
19
import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
19
import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
20
import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
20
import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
21
import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
Lines 74-81 Link Here
74
			if (getBooleanProperty(CREATE_CLIENT)) {
75
			if (getBooleanProperty(CREATE_CLIENT)) {
75
				return Boolean.TRUE;
76
				return Boolean.TRUE;
76
			}
77
			}
77
			IProjectFacetVersion facetVersion = (IProjectFacetVersion)getProperty(FACET_VERSION);
78
			String facetVersion = getStringProperty(FACET_VERSION_STR);
78
			if (facetVersion == EJB_30) {
79
			if (J2EEVersionUtil.convertVersionStringToInt(facetVersion) >= J2EEVersionConstants.EJB_3_0_ID) {
79
				return J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.EJB_GENERATE_DD);
80
				return J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.EJB_GENERATE_DD);
80
			}
81
			}
81
			return Boolean.TRUE;
82
			return Boolean.TRUE;
(-)plugin.xml (-3 / +14 lines)
Lines 17-33 Link Here
17
      <group-member id="modules"/>     
17
      <group-member id="modules"/>     
18
             
18
             
19
    </project-facet-version>
19
    </project-facet-version>
20
    
21
    <project-facet-version facet="jst.ear" version="6.0">
22
      <constraint>
23
        <and>
24
          <conflicts group="modules"/>
25
          <conflicts facet="jst.java"/>
26
        </and>
27
      </constraint>
28
      <group-member id="modules"/>     
29
             
30
    </project-facet-version>
20
31
21
    <action facet="jst.ear" version="5.0" type="INSTALL" id="jst.ear#5.0#install">
32
    <action facet="jst.ear" version="[5.0-6.0]" type="INSTALL" id="jst.ear#5.0#install">
22
      	   <delegate class="org.eclipse.jst.jee.project.facet.EarFacetInstallDelegate"/>
33
      	   <delegate class="org.eclipse.jst.jee.project.facet.EarFacetInstallDelegate"/>
23
  		   <config-factory class="org.eclipse.jst.j2ee.internal.earcreation.EarFacetInstallDataModelProvider"/>
34
  		   <config-factory class="org.eclipse.jst.j2ee.internal.earcreation.EarFacetInstallDataModelProvider"/>
24
    </action>
35
    </action>
25
      
36
      
26
    <event-handler facet="jst.ear" version="5.0" type="POST_INSTALL">
37
    <event-handler facet="jst.ear" version="[5.0-6.0]" type="POST_INSTALL">
27
      		<delegate class="org.eclipse.jst.jee.project.facet.EarFacetPostInstallDelegate"/>
38
      		<delegate class="org.eclipse.jst.jee.project.facet.EarFacetPostInstallDelegate"/>
28
    </event-handler>  
39
    </event-handler>  
29
    
40
    
30
    <event-handler facet="jst.ear" version="5.0" type="RUNTIME_CHANGED">
41
    <event-handler facet="jst.ear" version="[5.0-6.0]" type="RUNTIME_CHANGED">
31
      <delegate class="org.eclipse.jst.j2ee.project.facet.EarFacetRuntimeHandler$RuntimeChangedDelegate"/>
42
      <delegate class="org.eclipse.jst.j2ee.project.facet.EarFacetRuntimeHandler$RuntimeChangedDelegate"/>
32
	</event-handler>     
43
	</event-handler>     
33
    
44
    
(-)j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EEProjectUtilities.java (-9 / +13 lines)
Lines 90-95 Link Here
90
import org.eclipse.wst.common.frameworks.internal.SimpleValidateEdit;
90
import org.eclipse.wst.common.frameworks.internal.SimpleValidateEdit;
91
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
91
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
92
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
92
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
93
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
93
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
94
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
94
import org.eclipse.wst.server.core.IRuntime;
95
import org.eclipse.wst.server.core.IRuntime;
95
96
Lines 1046-1052 Link Here
1046
	
1047
	
1047
	/**
1048
	/**
1048
	 * @param project
1049
	 * @param project
1049
	 * @return true, if jee version 5.0 (or their respective ejb, web, app versions)
1050
	 * @return true, if jee version 5.0 or later (or their respective ejb, web, app versions)
1050
	 * , it must be noted that this method only looks at the facet & their versions to determine 
1051
	 * , it must be noted that this method only looks at the facet & their versions to determine 
1051
	 * the jee level. It does not read deployment descriptors for performance reasons.
1052
	 * the jee level. It does not read deployment descriptors for performance reasons.
1052
	 */
1053
	 */
Lines 1059-1075 Link Here
1059
			if (facetedProject == null)
1060
			if (facetedProject == null)
1060
				return false;
1061
				return false;
1061
			if(isEARProject(facetedProject)){
1062
			if(isEARProject(facetedProject)){
1062
				IProjectFacet earFacet = ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_EAR_MODULE);
1063
				IProjectFacetVersion fv = facetedProject.getProjectFacetVersion(ENTERPRISE_APPLICATION_FACET);
1063
				ret = facetedProject.hasProjectFacet(earFacet.getVersion(J2EEVersionUtil.convertVersionIntToString(J2EEVersionConstants.JEE_5_0_ID)));
1064
				ret = J2EEVersionUtil.convertVersionStringToInt(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID;
1064
			} else if(isDynamicWebProject(facetedProject)){
1065
			} else if(isDynamicWebProject(facetedProject)){
1065
				IProjectFacet webFacet = ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_WEB_MODULE);
1066
				IProjectFacetVersion fv = facetedProject.getProjectFacetVersion(DYNAMIC_WEB_FACET);
1066
				ret = facetedProject.hasProjectFacet(webFacet.getVersion(J2EEVersionUtil.convertVersionIntToString(J2EEVersionUtil.convertJ2EEVersionIDToWebVersionID(J2EEVersionConstants.JEE_5_0_ID))));
1067
				ret = J2EEVersionUtil.convertWebVersionStringToJ2EEVersionID(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID;
1067
			} else if(isEJBProject(facetedProject)){
1068
			} else if(isEJBProject(facetedProject)){
1068
				IProjectFacet ejbFacet = ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_EJB_MODULE);
1069
				IProjectFacetVersion fv = facetedProject.getProjectFacetVersion(EJB_FACET);
1069
				ret = facetedProject.hasProjectFacet(ejbFacet.getVersion(J2EEVersionUtil.convertVersionIntToString(J2EEVersionUtil.convertJ2EEVersionIDToEJBVersionID(J2EEVersionConstants.JEE_5_0_ID))));
1070
				ret = J2EEVersionUtil.convertEJBVersionStringToJ2EEVersionID(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID;
1070
			} else if(isApplicationClientProject(facetedProject)){
1071
			} else if(isApplicationClientProject(facetedProject)){
1071
				IProjectFacet appFacet = ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_APPCLIENT_MODULE);
1072
				IProjectFacetVersion fv = facetedProject.getProjectFacetVersion(APPLICATION_CLIENT_FACET);
1072
				ret = facetedProject.hasProjectFacet(appFacet.getVersion(J2EEVersionUtil.convertVersionIntToString(J2EEVersionConstants.JEE_5_0_ID)));
1073
				ret = J2EEVersionUtil.convertAppClientVersionStringToJ2EEVersionID(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID;
1074
			} else if (isJCAProject(facetedProject)){
1075
				IProjectFacetVersion fv = facetedProject.getProjectFacetVersion(JCA_FACET);
1076
				ret = J2EEVersionUtil.convertConnectorVersionStringToJ2EEVersionID(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID;
1073
			}
1077
			}
1074
		} catch (CoreException e) {
1078
		} catch (CoreException e) {
1075
			// TODO Auto-generated catch block
1079
			// TODO Auto-generated catch block
(-)archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEArchiveUtilities.java (+8 lines)
Lines 190-195 Link Here
190
						version = J2EEVersionConstants.J2EE_1_4_ID;
190
						version = J2EEVersionConstants.J2EE_1_4_ID;
191
					} else if (versionStr.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) {
191
					} else if (versionStr.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) {
192
						version = J2EEVersionConstants.JEE_5_0_ID;
192
						version = J2EEVersionConstants.JEE_5_0_ID;
193
					} else if (versionStr.equals(J2EEVersionConstants.VERSION_6_0_TEXT)) {
194
						version = J2EEVersionConstants.JEE_6_0_ID;
193
					}
195
					}
194
					break;
196
					break;
195
				case J2EEVersionConstants.CONNECTOR_TYPE:
197
				case J2EEVersionConstants.CONNECTOR_TYPE:
Lines 197-202 Link Here
197
						version = J2EEVersionConstants.JCA_1_0_ID;
199
						version = J2EEVersionConstants.JCA_1_0_ID;
198
					} else if (versionStr.equals(J2EEVersionConstants.VERSION_1_5_TEXT)) {
200
					} else if (versionStr.equals(J2EEVersionConstants.VERSION_1_5_TEXT)) {
199
						version = J2EEVersionConstants.JCA_1_5_ID;
201
						version = J2EEVersionConstants.JCA_1_5_ID;
202
					} else if (versionStr.equals(J2EEVersionConstants.VERSION_1_6_TEXT)) {
203
						version = J2EEVersionConstants.JCA_1_6_ID;
200
					}
204
					}
201
					break;
205
					break;
202
				case J2EEVersionConstants.EJB_TYPE:
206
				case J2EEVersionConstants.EJB_TYPE:
Lines 208-213 Link Here
208
						version = J2EEVersionConstants.EJB_2_1_ID;
212
						version = J2EEVersionConstants.EJB_2_1_ID;
209
					} else if (versionStr.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) {
213
					} else if (versionStr.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) {
210
						version = J2EEVersionConstants.EJB_3_0_ID;
214
						version = J2EEVersionConstants.EJB_3_0_ID;
215
					} else if (versionStr.equals(J2EEVersionConstants.VERSION_3_1_TEXT)) {
216
						version = J2EEVersionConstants.EJB_3_1_ID;
211
					}
217
					}
212
					break;
218
					break;
213
				case J2EEVersionConstants.WEB_TYPE:
219
				case J2EEVersionConstants.WEB_TYPE:
Lines 219-224 Link Here
219
						version = J2EEVersionConstants.WEB_2_4_ID;
225
						version = J2EEVersionConstants.WEB_2_4_ID;
220
					} else if (versionStr.equals(J2EEVersionConstants.VERSION_2_5_TEXT)) {
226
					} else if (versionStr.equals(J2EEVersionConstants.VERSION_2_5_TEXT)) {
221
						version = J2EEVersionConstants.WEB_2_5_ID;
227
						version = J2EEVersionConstants.WEB_2_5_ID;
228
					} else if (versionStr.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) {
229
						version = J2EEVersionConstants.WEB_3_0_ID;
222
					}
230
					}
223
					break;
231
					break;
224
				}
232
				}
(-)plugin.xml (-3 / +13 lines)
Lines 526-542 Link Here
526
      </constraint>
526
      </constraint>
527
      <group-member id="modules"/>     
527
      <group-member id="modules"/>     
528
    </project-facet-version>
528
    </project-facet-version>
529
    
530
    <project-facet-version facet="jst.appclient" version="6.0">
531
      <constraint>
532
        <and>
533
          <requires facet="jst.java" version="[5.0"/>
534
          <conflicts group="modules"/>
535
        </and>
536
      </constraint>
537
      <group-member id="modules"/>     
538
    </project-facet-version>
529
            
539
            
530
    <action type="install" facet="jst.appclient" version="[1.2-5.0]" id="jst.appclient.install">
540
    <action type="install" facet="jst.appclient" version="[1.2-6.0]" id="jst.appclient.install">
531
      <delegate class="org.eclipse.jst.j2ee.project.facet.AppClientFacetInstallDelegate"/>
541
      <delegate class="org.eclipse.jst.j2ee.project.facet.AppClientFacetInstallDelegate"/>
532
      <config-factory class="org.eclipse.jst.j2ee.project.facet.AppClientFacetInstallDataModelProvider"/>
542
      <config-factory class="org.eclipse.jst.j2ee.project.facet.AppClientFacetInstallDataModelProvider"/>
533
    </action>
543
    </action>
534
	  
544
	  
535
    <event-handler type="POST_INSTALL" facet="jst.appclient" version="[1.2-5.0]">
545
    <event-handler type="POST_INSTALL" facet="jst.appclient" version="[1.2-6.0]">
536
      <delegate class="org.eclipse.jst.j2ee.project.facet.AppClientFacetPostInstallDelegate"/>
546
      <delegate class="org.eclipse.jst.j2ee.project.facet.AppClientFacetPostInstallDelegate"/>
537
    </event-handler>
547
    </event-handler>
538
        
548
        
539
    <event-handler type="RUNTIME_CHANGED" facet="jst.appclient" version="[1.2-5.0]">
549
    <event-handler type="RUNTIME_CHANGED" facet="jst.appclient" version="[1.2-6.0]">
540
      <delegate class="org.eclipse.jst.j2ee.project.facet.J2EEFacetRuntimeChangedDelegate"/>
550
      <delegate class="org.eclipse.jst.j2ee.project.facet.J2EEFacetRuntimeChangedDelegate"/>
541
    </event-handler>
551
    </event-handler>
542
	
552
	
(-)j2eecreation/org/eclipse/jst/j2ee/project/facet/IJ2EEFacetConstants.java (+5 lines)
Lines 24-29 Link Here
24
	public static final IProjectFacetVersion ENTERPRISE_APPLICATION_13 = ENTERPRISE_APPLICATION_FACET.getVersion("1.3"); //$NON-NLS-1$
24
	public static final IProjectFacetVersion ENTERPRISE_APPLICATION_13 = ENTERPRISE_APPLICATION_FACET.getVersion("1.3"); //$NON-NLS-1$
25
	public static final IProjectFacetVersion ENTERPRISE_APPLICATION_14 = ENTERPRISE_APPLICATION_FACET.getVersion("1.4"); //$NON-NLS-1$
25
	public static final IProjectFacetVersion ENTERPRISE_APPLICATION_14 = ENTERPRISE_APPLICATION_FACET.getVersion("1.4"); //$NON-NLS-1$
26
	public static final IProjectFacetVersion ENTERPRISE_APPLICATION_50 = ENTERPRISE_APPLICATION_FACET.getVersion("5.0"); //$NON-NLS-1$
26
	public static final IProjectFacetVersion ENTERPRISE_APPLICATION_50 = ENTERPRISE_APPLICATION_FACET.getVersion("5.0"); //$NON-NLS-1$
27
	public static final IProjectFacetVersion ENTERPRISE_APPLICATION_60 = ENTERPRISE_APPLICATION_FACET.getVersion("6.0"); //$NON-NLS-1$
27
	
28
	
28
	public static final String APPLICATION_CLIENT = IModuleConstants.JST_APPCLIENT_MODULE;
29
	public static final String APPLICATION_CLIENT = IModuleConstants.JST_APPCLIENT_MODULE;
29
	public static final IProjectFacet APPLICATION_CLIENT_FACET = ProjectFacetsManager.getProjectFacet(APPLICATION_CLIENT);
30
	public static final IProjectFacet APPLICATION_CLIENT_FACET = ProjectFacetsManager.getProjectFacet(APPLICATION_CLIENT);
Lines 31-36 Link Here
31
	public static final IProjectFacetVersion APPLICATION_CLIENT_13 = APPLICATION_CLIENT_FACET.getVersion("1.3"); //$NON-NLS-1$
32
	public static final IProjectFacetVersion APPLICATION_CLIENT_13 = APPLICATION_CLIENT_FACET.getVersion("1.3"); //$NON-NLS-1$
32
	public static final IProjectFacetVersion APPLICATION_CLIENT_14 = APPLICATION_CLIENT_FACET.getVersion("1.4"); //$NON-NLS-1$
33
	public static final IProjectFacetVersion APPLICATION_CLIENT_14 = APPLICATION_CLIENT_FACET.getVersion("1.4"); //$NON-NLS-1$
33
	public static final IProjectFacetVersion APPLICATION_CLIENT_50 = APPLICATION_CLIENT_FACET.getVersion("5.0"); //$NON-NLS-1$
34
	public static final IProjectFacetVersion APPLICATION_CLIENT_50 = APPLICATION_CLIENT_FACET.getVersion("5.0"); //$NON-NLS-1$
35
	public static final IProjectFacetVersion APPLICATION_CLIENT_60 = APPLICATION_CLIENT_FACET.getVersion("6.0"); //$NON-NLS-1$
34
	
36
	
35
	public static final String EJB = IModuleConstants.JST_EJB_MODULE;
37
	public static final String EJB = IModuleConstants.JST_EJB_MODULE;
36
	public static final IProjectFacet EJB_FACET = ProjectFacetsManager.getProjectFacet(EJB);
38
	public static final IProjectFacet EJB_FACET = ProjectFacetsManager.getProjectFacet(EJB);
Lines 38-43 Link Here
38
	public static final IProjectFacetVersion EJB_20 = EJB_FACET.getVersion("2.0"); //$NON-NLS-1$
40
	public static final IProjectFacetVersion EJB_20 = EJB_FACET.getVersion("2.0"); //$NON-NLS-1$
39
	public static final IProjectFacetVersion EJB_21 = EJB_FACET.getVersion("2.1"); //$NON-NLS-1$
41
	public static final IProjectFacetVersion EJB_21 = EJB_FACET.getVersion("2.1"); //$NON-NLS-1$
40
	public static final IProjectFacetVersion EJB_30 = EJB_FACET.getVersion("3.0"); //$NON-NLS-1$
42
	public static final IProjectFacetVersion EJB_30 = EJB_FACET.getVersion("3.0"); //$NON-NLS-1$
43
	public static final IProjectFacetVersion EJB_31 = EJB_FACET.getVersion("3.1"); //$NON-NLS-1$
41
44
42
	public static final String DYNAMIC_WEB = IModuleConstants.JST_WEB_MODULE;
45
	public static final String DYNAMIC_WEB = IModuleConstants.JST_WEB_MODULE;
43
	public static final IProjectFacet DYNAMIC_WEB_FACET = ProjectFacetsManager.getProjectFacet(DYNAMIC_WEB);
46
	public static final IProjectFacet DYNAMIC_WEB_FACET = ProjectFacetsManager.getProjectFacet(DYNAMIC_WEB);
Lines 45-50 Link Here
45
	public static final IProjectFacetVersion DYNAMIC_WEB_23 = DYNAMIC_WEB_FACET.getVersion("2.3"); //$NON-NLS-1$
48
	public static final IProjectFacetVersion DYNAMIC_WEB_23 = DYNAMIC_WEB_FACET.getVersion("2.3"); //$NON-NLS-1$
46
	public static final IProjectFacetVersion DYNAMIC_WEB_24 = DYNAMIC_WEB_FACET.getVersion("2.4"); //$NON-NLS-1$
49
	public static final IProjectFacetVersion DYNAMIC_WEB_24 = DYNAMIC_WEB_FACET.getVersion("2.4"); //$NON-NLS-1$
47
	public static final IProjectFacetVersion DYNAMIC_WEB_25 = DYNAMIC_WEB_FACET.getVersion("2.5"); //$NON-NLS-1$
50
	public static final IProjectFacetVersion DYNAMIC_WEB_25 = DYNAMIC_WEB_FACET.getVersion("2.5"); //$NON-NLS-1$
51
	public static final IProjectFacetVersion DYNAMIC_WEB_30 = DYNAMIC_WEB_FACET.getVersion("3.0"); //$NON-NLS-1$
48
	
52
	
49
	public static final String DYNAMIC_WEB_XDOCLET = "jst.web.xdoclet"; //$NON-NLS-1$
53
	public static final String DYNAMIC_WEB_XDOCLET = "jst.web.xdoclet"; //$NON-NLS-1$
50
	
54
	
Lines 56-61 Link Here
56
	public static final IProjectFacet JCA_FACET = ProjectFacetsManager.getProjectFacet(JCA);
60
	public static final IProjectFacet JCA_FACET = ProjectFacetsManager.getProjectFacet(JCA);
57
	public static final IProjectFacetVersion JCA_10 = JCA_FACET.getVersion("1.0"); //$NON-NLS-1$
61
	public static final IProjectFacetVersion JCA_10 = JCA_FACET.getVersion("1.0"); //$NON-NLS-1$
58
	public static final IProjectFacetVersion JCA_15 = JCA_FACET.getVersion("1.5"); //$NON-NLS-1$
62
	public static final IProjectFacetVersion JCA_15 = JCA_FACET.getVersion("1.5"); //$NON-NLS-1$
63
	public static final IProjectFacetVersion JCA_16 = JCA_FACET.getVersion("1.6"); //$NON-NLS-1$
59
64
60
	public static final String STATIC_WEB = IModuleConstants.WST_WEB_MODULE;
65
	public static final String STATIC_WEB = IModuleConstants.WST_WEB_MODULE;
61
66
(-)appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDelegate.java (-2 / +22 lines)
Lines 111-120 Link Here
111
		IPath configFolderpath = pjpath.append(configFolderName);
111
		IPath configFolderpath = pjpath.append(configFolderName);
112
		sourceFolder = ws.getRoot().getFolder(configFolderpath);
112
		sourceFolder = ws.getRoot().getFolder(configFolderpath);
113
113
114
		if( fv == IJ2EEFacetConstants.APPLICATION_CLIENT_50 )
114
		if( fv == IJ2EEFacetConstants.APPLICATION_CLIENT_60 )
115
		{
115
		{
116
	        if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){
116
	        if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){
117
	            // Create the deployment descriptor (web.xml) if one doesn't exist
117
	            // Create the deployment descriptor (application-client.xml) if one doesn't exist
118
	            IFile appClientFile = sourceFolder.getFile(new Path(J2EEConstants.APP_CLIENT_DD_URI));
119
	            if (!appClientFile.exists()) {
120
	                try {
121
	                    if(!appClientFile.getParent().exists()
122
	                            && (appClientFile.getParent().getType() ==  IResource.FOLDER)){
123
	                        ((IFolder)appClientFile.getParent()).create(true, true, monitor);
124
	                    }
125
	                    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$
126
	                    appClientFile.create(new ByteArrayInputStream(appClientXmlContents.getBytes("UTF-8")), true, monitor); //$NON-NLS-1$
127
	                   
128
	                } catch (UnsupportedEncodingException e) {
129
	                    Logger.getLogger().logError(e);
130
	                }           
131
	            }
132
	        }
133
		}
134
		else if( fv == IJ2EEFacetConstants.APPLICATION_CLIENT_50 )
135
		{
136
	        if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){
137
	            // Create the deployment descriptor (application-client.xml) if one doesn't exist
118
	            IFile appClientFile = sourceFolder.getFile(new Path(J2EEConstants.APP_CLIENT_DD_URI));
138
	            IFile appClientFile = sourceFolder.getFile(new Path(J2EEConstants.APP_CLIENT_DD_URI));
119
	            if (!appClientFile.exists()) {
139
	            if (!appClientFile.exists()) {
120
	                try {
140
	                try {
(-)appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDataModelProvider.java (-2 / +3 lines)
Lines 14-19 Link Here
14
14
15
import org.eclipse.core.runtime.IPath;
15
import org.eclipse.core.runtime.IPath;
16
import org.eclipse.core.runtime.Path;
16
import org.eclipse.core.runtime.Path;
17
import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
17
import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
18
import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
18
import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
19
import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
19
import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
20
import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
Lines 43-50 Link Here
43
			String projectName = model.getStringProperty(FACET_PROJECT_NAME).replace(' ','_');
44
			String projectName = model.getStringProperty(FACET_PROJECT_NAME).replace(' ','_');
44
			return projectName + IJ2EEModuleConstants.JAR_EXT; 
45
			return projectName + IJ2EEModuleConstants.JAR_EXT; 
45
		} else if (propertyName.equals(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)) {
46
		} else if (propertyName.equals(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)) {
46
			IProjectFacetVersion facetVersion = (IProjectFacetVersion)getProperty(FACET_VERSION);
47
			String facetVersion = getStringProperty(FACET_VERSION_STR);
47
			if(facetVersion == APPLICATION_CLIENT_50){
48
			if(J2EEVersionUtil.convertVersionStringToInt(facetVersion) >= J2EEVersionConstants.JEE_5_0_ID){
48
				return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.APP_CLIENT_GENERATE_DD));
49
				return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.APP_CLIENT_GENERATE_DD));
49
			}
50
			}
50
			return Boolean.TRUE;
51
			return Boolean.TRUE;
(-)earproject/org/eclipse/jst/j2ee/internal/earcreation/EarFacetInstallDataModelProvider.java (-3 / +3 lines)
Lines 17-26 Link Here
17
17
18
import org.eclipse.core.resources.IProject;
18
import org.eclipse.core.resources.IProject;
19
import org.eclipse.core.runtime.IStatus;
19
import org.eclipse.core.runtime.IStatus;
20
import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
20
import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
21
import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
21
import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
22
import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
22
import org.eclipse.jst.j2ee.internal.plugin.J2EEPreferences;
23
import org.eclipse.jst.j2ee.internal.plugin.J2EEPreferences;
23
import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
24
import org.eclipse.jst.j2ee.project.facet.J2EEFacetInstallDataModelProvider;
24
import org.eclipse.jst.j2ee.project.facet.J2EEFacetInstallDataModelProvider;
25
import org.eclipse.wst.common.componentcore.ComponentCore;
25
import org.eclipse.wst.common.componentcore.ComponentCore;
26
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
26
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
Lines 44-51 Link Here
44
		} else if (propertyName.equals(J2EE_PROJECTS_LIST) || propertyName.equals(JAVA_PROJECT_LIST)) {
44
		} else if (propertyName.equals(J2EE_PROJECTS_LIST) || propertyName.equals(JAVA_PROJECT_LIST)) {
45
			return Collections.EMPTY_LIST;
45
			return Collections.EMPTY_LIST;
46
		} else if(propertyName.equals(GENERATE_DD)){
46
		} else if(propertyName.equals(GENERATE_DD)){
47
			IProjectFacetVersion facetVersion = (IProjectFacetVersion)getProperty(FACET_VERSION);
47
			String facetVersion = getStringProperty(FACET_VERSION_STR);
48
			if(facetVersion == IJ2EEFacetConstants.ENTERPRISE_APPLICATION_50){
48
			if(J2EEVersionUtil.convertVersionStringToInt(facetVersion) >= J2EEVersionConstants.JEE_5_0_ID){
49
				return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.APPLICATION_GENERATE_DD));
49
				return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.APPLICATION_GENERATE_DD));
50
			}
50
			}
51
			return Boolean.TRUE;
51
			return Boolean.TRUE;
(-)common/org/eclipse/jst/j2ee/internal/common/J2EEVersionUtil.java (-6 / +51 lines)
Lines 41-46 Link Here
41
		
41
		
42
		case J2EEVersionConstants.SERVLET_2_5:
42
		case J2EEVersionConstants.SERVLET_2_5:
43
			return J2EEVersionConstants.VERSION_2_5_TEXT;
43
			return J2EEVersionConstants.VERSION_2_5_TEXT;
44
		
45
		case J2EEVersionConstants.SERVLET_3_0:
46
			return J2EEVersionConstants.VERSION_3_0_TEXT;
44
		}
47
		}
45
		return ""; //$NON-NLS-1$
48
		return ""; //$NON-NLS-1$
46
49
Lines 63-68 Link Here
63
		
66
		
64
		case J2EEVersionConstants.EJB_3_0_ID:
67
		case J2EEVersionConstants.EJB_3_0_ID:
65
			return J2EEVersionConstants.VERSION_3_0_TEXT;
68
			return J2EEVersionConstants.VERSION_3_0_TEXT;
69
		
70
		case J2EEVersionConstants.EJB_3_1_ID:
71
			return J2EEVersionConstants.VERSION_3_1_TEXT;
66
		}
72
		}
67
		return ""; //$NON-NLS-1$
73
		return ""; //$NON-NLS-1$
68
	}
74
	}
Lines 75-80 Link Here
75
		case J2EEVersionConstants.JCA_1_5_ID:
81
		case J2EEVersionConstants.JCA_1_5_ID:
76
			return J2EEVersionConstants.VERSION_1_5_TEXT;
82
			return J2EEVersionConstants.VERSION_1_5_TEXT;
77
83
84
		case J2EEVersionConstants.JCA_1_6_ID:
85
			return J2EEVersionConstants.VERSION_1_6_TEXT;
86
78
		}
87
		}
79
		return ""; //$NON-NLS-1$
88
		return ""; //$NON-NLS-1$
80
	}
89
	}
Lines 93-98 Link Here
93
		case J2EEVersionConstants.JEE_5_0_ID:
102
		case J2EEVersionConstants.JEE_5_0_ID:
94
			return J2EEVersionConstants.VERSION_5_0_TEXT;
103
			return J2EEVersionConstants.VERSION_5_0_TEXT;
95
104
105
		case J2EEVersionConstants.JEE_6_0_ID:
106
			return J2EEVersionConstants.VERSION_6_0_TEXT;
107
96
		}
108
		}
97
		return "";//$NON-NLS-1$
109
		return "";//$NON-NLS-1$
98
	}
110
	}
Lines 106-111 Link Here
106
			return J2EEVersionConstants.J2EE_1_4_ID;
118
			return J2EEVersionConstants.J2EE_1_4_ID;
107
		if (version.equals(J2EEVersionConstants.VERSION_5_0_TEXT))
119
		if (version.equals(J2EEVersionConstants.VERSION_5_0_TEXT))
108
			return J2EEVersionConstants.JEE_5_0_ID;
120
			return J2EEVersionConstants.JEE_5_0_ID;
121
		if (version.equals(J2EEVersionConstants.VERSION_6_0_TEXT))
122
			return J2EEVersionConstants.JEE_6_0_ID;
109
		// default
123
		// default
110
		return J2EEVersionConstants.JEE_5_0_ID;
124
		return J2EEVersionConstants.JEE_5_0_ID;
111
	}
125
	}
Lines 119-124 Link Here
119
			return J2EEVersionConstants.J2EE_1_4_ID;
133
			return J2EEVersionConstants.J2EE_1_4_ID;
120
		if (version.equals(J2EEVersionConstants.VERSION_3_0_TEXT))
134
		if (version.equals(J2EEVersionConstants.VERSION_3_0_TEXT))
121
			return J2EEVersionConstants.JEE_5_0_ID;
135
			return J2EEVersionConstants.JEE_5_0_ID;
136
		if (version.equals(J2EEVersionConstants.VERSION_3_1_TEXT))
137
			return J2EEVersionConstants.JEE_6_0_ID;
122
		// default
138
		// default
123
		return J2EEVersionConstants.JEE_5_0_ID;
139
		return J2EEVersionConstants.JEE_5_0_ID;
124
	}
140
	}
Lines 132-137 Link Here
132
			return J2EEVersionConstants.J2EE_1_4_ID;
148
			return J2EEVersionConstants.J2EE_1_4_ID;
133
		if (version.equals(J2EEVersionConstants.VERSION_2_5_TEXT))
149
		if (version.equals(J2EEVersionConstants.VERSION_2_5_TEXT))
134
			return J2EEVersionConstants.JEE_5_0_ID;
150
			return J2EEVersionConstants.JEE_5_0_ID;
151
		if (version.equals(J2EEVersionConstants.VERSION_3_0_TEXT))
152
			return J2EEVersionConstants.JEE_6_0_ID;
135
		// default
153
		// default
136
		return J2EEVersionConstants.J2EE_1_4_ID;
154
		return J2EEVersionConstants.J2EE_1_4_ID;
137
	}
155
	}
Lines 141-146 Link Here
141
			return J2EEVersionConstants.J2EE_1_3_ID;
159
			return J2EEVersionConstants.J2EE_1_3_ID;
142
		if (version.equals(J2EEVersionConstants.VERSION_1_5_TEXT))
160
		if (version.equals(J2EEVersionConstants.VERSION_1_5_TEXT))
143
			return J2EEVersionConstants.J2EE_1_4_ID;
161
			return J2EEVersionConstants.J2EE_1_4_ID;
162
		if (version.equals(J2EEVersionConstants.VERSION_1_6_TEXT))
163
			return J2EEVersionConstants.JEE_6_0_ID;
144
		// default
164
		// default
145
		return J2EEVersionConstants.J2EE_1_4_ID;
165
		return J2EEVersionConstants.J2EE_1_4_ID;
146
	}
166
	}
Lines 155-160 Link Here
155
				return J2EEVersionConstants.EJB_2_1_ID;
175
				return J2EEVersionConstants.EJB_2_1_ID;
156
			case J2EEVersionConstants.JEE_5_0_ID:
176
			case J2EEVersionConstants.JEE_5_0_ID:
157
				return J2EEVersionConstants.EJB_3_0_ID;
177
				return J2EEVersionConstants.EJB_3_0_ID;
178
			case J2EEVersionConstants.JEE_6_0_ID:
179
				return J2EEVersionConstants.EJB_3_1_ID;
158
		}
180
		}
159
		// default
181
		// default
160
		return J2EEVersionConstants.EJB_3_0_ID;
182
		return J2EEVersionConstants.EJB_3_0_ID;
Lines 170-175 Link Here
170
				return J2EEVersionConstants.WEB_2_4_ID;
192
				return J2EEVersionConstants.WEB_2_4_ID;
171
			case J2EEVersionConstants.JEE_5_0_ID:
193
			case J2EEVersionConstants.JEE_5_0_ID:
172
				return J2EEVersionConstants.WEB_2_5_ID;
194
				return J2EEVersionConstants.WEB_2_5_ID;
195
			case J2EEVersionConstants.JEE_6_0_ID:
196
				return J2EEVersionConstants.WEB_3_0_ID;
173
		}
197
		}
174
		// default
198
		// default
175
		return J2EEVersionConstants.WEB_2_5_ID;
199
		return J2EEVersionConstants.WEB_2_5_ID;
Lines 180-186 Link Here
180
			case J2EEVersionConstants.J2EE_1_3_ID:
204
			case J2EEVersionConstants.J2EE_1_3_ID:
181
				return J2EEVersionConstants.JCA_1_0_ID;
205
				return J2EEVersionConstants.JCA_1_0_ID;
182
			case J2EEVersionConstants.J2EE_1_4_ID:
206
			case J2EEVersionConstants.J2EE_1_4_ID:
207
			case J2EEVersionConstants.JEE_5_0_ID:
183
				return J2EEVersionConstants.JCA_1_5_ID;
208
				return J2EEVersionConstants.JCA_1_5_ID;
209
			case J2EEVersionConstants.JEE_6_0_ID:
210
				return J2EEVersionConstants.JCA_1_6_ID;
184
		}
211
		}
185
		// default
212
		// default
186
		return J2EEVersionConstants.JCA_1_5_ID;
213
		return J2EEVersionConstants.JCA_1_5_ID;
Lines 226-231 Link Here
226
		else if (version.equals(J2EEVersionConstants.VERSION_1_5_TEXT))
253
		else if (version.equals(J2EEVersionConstants.VERSION_1_5_TEXT))
227
			nVersion = J2EEVersionConstants.VERSION_1_5;
254
			nVersion = J2EEVersionConstants.VERSION_1_5;
228
		
255
		
256
		else if (version.equals(J2EEVersionConstants.VERSION_1_6_TEXT))
257
			nVersion = J2EEVersionConstants.VERSION_1_6;
258
		
229
		else if (version.equals(J2EEVersionConstants.VERSION_2_0_TEXT))
259
		else if (version.equals(J2EEVersionConstants.VERSION_2_0_TEXT))
230
			nVersion = J2EEVersionConstants.VERSION_2_0;
260
			nVersion = J2EEVersionConstants.VERSION_2_0;
231
		
261
		
Lines 242-254 Link Here
242
			nVersion = J2EEVersionConstants.VERSION_2_4;
272
			nVersion = J2EEVersionConstants.VERSION_2_4;
243
		
273
		
244
		else if (version.equals(J2EEVersionConstants.VERSION_2_5_TEXT))
274
		else if (version.equals(J2EEVersionConstants.VERSION_2_5_TEXT))
245
			nVersion = J2EEVersionConstants.VERSION_2_5;		
275
			nVersion = J2EEVersionConstants.VERSION_2_5;	
246
		
247
		else if (version.equals(J2EEVersionConstants.VERSION_5_0_TEXT))
248
			nVersion = J2EEVersionConstants.VERSION_5_0;		
249
276
250
		else if (version.equals(J2EEVersionConstants.VERSION_3_0_TEXT))
277
		else if (version.equals(J2EEVersionConstants.VERSION_3_0_TEXT))
251
			nVersion = J2EEVersionConstants.VERSION_3_0;		
278
			nVersion = J2EEVersionConstants.VERSION_3_0;			
279
280
		else if (version.equals(J2EEVersionConstants.VERSION_3_1_TEXT))
281
			nVersion = J2EEVersionConstants.VERSION_3_1;	
282
		
283
		else if (version.equals(J2EEVersionConstants.VERSION_5_0_TEXT))
284
			nVersion = J2EEVersionConstants.VERSION_5_0;			
285
		
286
		else if (version.equals(J2EEVersionConstants.VERSION_6_0_TEXT))
287
			nVersion = J2EEVersionConstants.VERSION_6_0;	
252
288
253
		return nVersion;
289
		return nVersion;
254
	}
290
	}
Lines 273-278 Link Here
273
		else if (version == J2EEVersionConstants.VERSION_1_5)
309
		else if (version == J2EEVersionConstants.VERSION_1_5)
274
			nVersion = J2EEVersionConstants.VERSION_1_5_TEXT;
310
			nVersion = J2EEVersionConstants.VERSION_1_5_TEXT;
275
		
311
		
312
		else if (version == J2EEVersionConstants.VERSION_1_6)
313
			nVersion = J2EEVersionConstants.VERSION_1_6_TEXT;
314
		
276
		else if (version == J2EEVersionConstants.VERSION_2_0)
315
		else if (version == J2EEVersionConstants.VERSION_2_0)
277
			nVersion = J2EEVersionConstants.VERSION_2_0_TEXT;
316
			nVersion = J2EEVersionConstants.VERSION_2_0_TEXT;
278
		
317
		
Lines 292-301 Link Here
292
			nVersion = J2EEVersionConstants.VERSION_2_5_TEXT;		
331
			nVersion = J2EEVersionConstants.VERSION_2_5_TEXT;		
293
332
294
		else if (version == J2EEVersionConstants.VERSION_3_0)
333
		else if (version == J2EEVersionConstants.VERSION_3_0)
295
			nVersion = J2EEVersionConstants.VERSION_3_0_TEXT;	
334
			nVersion = J2EEVersionConstants.VERSION_3_0_TEXT;		
335
336
		else if (version == J2EEVersionConstants.VERSION_3_1)
337
			nVersion = J2EEVersionConstants.VERSION_3_1_TEXT;	
296
		
338
		
297
		else if (version == J2EEVersionConstants.VERSION_5_0)
339
		else if (version == J2EEVersionConstants.VERSION_5_0)
298
			nVersion = J2EEVersionConstants.VERSION_5_0_TEXT;		
340
			nVersion = J2EEVersionConstants.VERSION_5_0_TEXT;		
341
		
342
		else if (version == J2EEVersionConstants.VERSION_6_0)
343
			nVersion = J2EEVersionConstants.VERSION_6_0_TEXT;	
299
	
344
	
300
		return nVersion;
345
		return nVersion;
301
	}
346
	}
(-)earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEComponentImportDataModelProvider.java (+3 lines)
Lines 71-76 Link Here
71
		case J2EEVersionConstants.JEE_5_0_ID:
71
		case J2EEVersionConstants.JEE_5_0_ID:
72
			javaFacetVersion = JavaFacetUtils.JAVA_50;
72
			javaFacetVersion = JavaFacetUtils.JAVA_50;
73
			break;
73
			break;
74
		case J2EEVersionConstants.JEE_6_0_ID:
75
			javaFacetVersion = JavaFacetUtils.JAVA_60;
76
			break;
74
		}
77
		}
75
		if(javaFacetVersion != null){
78
		if(javaFacetVersion != null){
76
			IDataModel moduleDM = model.getNestedModel(NESTED_MODEL_J2EE_COMPONENT_CREATION);
79
			IDataModel moduleDM = model.getNestedModel(NESTED_MODEL_J2EE_COMPONENT_CREATION);
(-)j2eecreation/org/eclipse/jst/j2ee/project/EarUtilities.java (+8 lines)
Lines 264-269 Link Here
264
			{
264
			{
265
				switch (earVersion)
265
				switch (earVersion)
266
				{
266
				{
267
				case J2EEVersionConstants.VERSION_6_0:
268
					retVal.add(DYNAMIC_WEB_30);
267
				case J2EEVersionConstants.VERSION_5_0:
269
				case J2EEVersionConstants.VERSION_5_0:
268
					retVal.add(DYNAMIC_WEB_25);
270
					retVal.add(DYNAMIC_WEB_25);
269
				case J2EEVersionConstants.VERSION_1_4:
271
				case J2EEVersionConstants.VERSION_1_4:
Lines 278-283 Link Here
278
			{
280
			{
279
				switch (earVersion)
281
				switch (earVersion)
280
				{
282
				{
283
				case J2EEVersionConstants.VERSION_6_0:
284
					retVal.add(EJB_31);
281
				case J2EEVersionConstants.VERSION_5_0:
285
				case J2EEVersionConstants.VERSION_5_0:
282
					retVal.add(EJB_30);
286
					retVal.add(EJB_30);
283
				case J2EEVersionConstants.VERSION_1_4:
287
				case J2EEVersionConstants.VERSION_1_4:
Lines 292-297 Link Here
292
			{
296
			{
293
				switch (earVersion)
297
				switch (earVersion)
294
				{
298
				{
299
				case J2EEVersionConstants.VERSION_6_0:
300
					retVal.add(JCA_16);
295
				case J2EEVersionConstants.VERSION_5_0:
301
				case J2EEVersionConstants.VERSION_5_0:
296
				case J2EEVersionConstants.VERSION_1_4:
302
				case J2EEVersionConstants.VERSION_1_4:
297
					retVal.add(JCA_15);
303
					retVal.add(JCA_15);
Lines 305-310 Link Here
305
			{
311
			{
306
				switch (earVersion)
312
				switch (earVersion)
307
				{
313
				{
314
				case J2EEVersionConstants.VERSION_6_0:
315
					retVal.add(APPLICATION_CLIENT_60);
308
				case J2EEVersionConstants.VERSION_5_0:
316
				case J2EEVersionConstants.VERSION_5_0:
309
					retVal.add(APPLICATION_CLIENT_50);
317
					retVal.add(APPLICATION_CLIENT_50);
310
				case J2EEVersionConstants.VERSION_1_4:
318
				case J2EEVersionConstants.VERSION_1_4:
(-)servlet_ui/org/eclipse/jst/servlet/ui/project/facet/WebFacetInstallPage.java (-4 / +5 lines)
Lines 13-21 Link Here
13
package org.eclipse.jst.servlet.ui.project.facet;
13
package org.eclipse.jst.servlet.ui.project.facet;
14
14
15
import org.eclipse.jface.dialogs.Dialog;
15
import org.eclipse.jface.dialogs.Dialog;
16
import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
17
import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
16
import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage;
18
import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage;
17
import org.eclipse.jst.j2ee.web.project.facet.IWebFacetInstallDataModelProperties;
19
import org.eclipse.jst.j2ee.web.project.facet.IWebFacetInstallDataModelProperties;
18
import org.eclipse.jst.j2ee.web.project.facet.WebFacetUtils;
19
import org.eclipse.jst.servlet.ui.IWebUIContextIds;
20
import org.eclipse.jst.servlet.ui.IWebUIContextIds;
20
import org.eclipse.osgi.util.NLS;
21
import org.eclipse.osgi.util.NLS;
21
import org.eclipse.swt.SWT;
22
import org.eclipse.swt.SWT;
Lines 24-30 Link Here
24
import org.eclipse.swt.widgets.Control;
25
import org.eclipse.swt.widgets.Control;
25
import org.eclipse.swt.widgets.Label;
26
import org.eclipse.swt.widgets.Label;
26
import org.eclipse.swt.widgets.Text;
27
import org.eclipse.swt.widgets.Text;
27
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
28
28
29
/**
29
/**
30
 * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
30
 * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
Lines 74-81 Link Here
74
	
74
	
75
	protected void handleFacetVersionChangedEvent()
75
	protected void handleFacetVersionChangedEvent()
76
	{
76
	{
77
	    final IProjectFacetVersion fv = (IProjectFacetVersion) this.model.getProperty( FACET_VERSION );
77
	    String fv = model.getStringProperty(FACET_VERSION_STR);
78
	    this.addDD.setVisible( fv == WebFacetUtils.WEB_25 );
78
	    boolean isWeb25OrGreater = J2EEVersionUtil.convertVersionStringToInt(fv) >= J2EEVersionConstants.WEB_2_5_ID;
79
	    this.addDD.setVisible(isWeb25OrGreater);
79
	}
80
	}
80
	
81
	
81
	protected String[] getValidationPropertyNames() {
82
	protected String[] getValidationPropertyNames() {
(-)servlet_ui/org/eclipse/jst/servlet/ui/project/facet/WebProjectFirstPage.java (-1 / +2 lines)
Lines 46-52 Link Here
46
	    
46
	    
47
	    facets.add( primaryFacetVersion );
47
	    facets.add( primaryFacetVersion );
48
	    
48
	    
49
	    if( primaryFacetVersion == WebFacetUtils.WEB_25 )
49
	    if( primaryFacetVersion == WebFacetUtils.WEB_30 || 
50
	    	primaryFacetVersion == WebFacetUtils.WEB_25 )
50
	    {
51
	    {
51
	        facets.add( JavaFacetUtils.JAVA_50 );
52
	        facets.add( JavaFacetUtils.JAVA_50 );
52
	    }
53
	    }
(-)servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/ConvertToWebModuleTypeDialog.java (-1 / +1 lines)
Lines 30-36 Link Here
30
	private String fShellTitle = IWebWizardConstants.CONVERT_TO_WEB_TITLE;
30
	private String fShellTitle = IWebWizardConstants.CONVERT_TO_WEB_TITLE;
31
	private String fLabelText = IWebWizardConstants.SELECT_WEB_VERSION;
31
	private String fLabelText = IWebWizardConstants.SELECT_WEB_VERSION;
32
	private static String fSelection= null;
32
	private static String fSelection= null;
33
	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};
33
	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};
34
	private int fInitialSelectionIndex = fAllowedStrings.length-1;
34
	private int fInitialSelectionIndex = fAllowedStrings.length-1;
35
	
35
	
36
	public static String getSelectedVersion() {
36
	public static String getSelectedVersion() {

Return to bug 252613