View | Details | Raw Unified | Return to bug 252613 | Differences between
and this patch

Collapse All | Expand All

(-)plugin.xml (-3 / +14 lines)
Lines 80-85 Link Here
80
      <label>%CONN_FACET_LABEL</label>
80
      <label>%CONN_FACET_LABEL</label>
81
      <description>%CONN_FACET_DESCRIPTION</description>
81
      <description>%CONN_FACET_DESCRIPTION</description>
82
      <icon>icons/full/obj16/Connector.gif</icon>
82
      <icon>icons/full/obj16/Connector.gif</icon>
83
      <default-version version="1.5"/>
83
    </project-facet>
84
    </project-facet>
84
85
85
    <project-facet-version facet="jst.connector" version="1.0">
86
    <project-facet-version facet="jst.connector" version="1.0">
Lines 102-117 Link Here
102
      <group-member id="modules"/>
103
      <group-member id="modules"/>
103
    </project-facet-version>
104
    </project-facet-version>
104
105
105
    <action facet="jst.connector" version="1.0,1.5" type="INSTALL" id="jst.connector.install">
106
    <project-facet-version facet="jst.connector" version="1.6">
107
      <constraint>
108
        <and>
109
          <requires facet="jst.java" version="[5.0"/>
110
          <conflicts group="modules"/>
111
        </and>
112
      </constraint>
113
      <group-member id="modules"/>
114
    </project-facet-version>
115
116
    <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"/>
117
      <delegate class="org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetInstallDelegate"/>
107
      <config-factory class="org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetInstallDataModelProvider"/>
118
      <config-factory class="org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetInstallDataModelProvider"/>
108
    </action>
119
    </action>
109
    
120
    
110
    <event-handler facet="jst.connector" version="1.0,1.5" type="POST_INSTALL">
121
    <event-handler facet="jst.connector" version="[1.0-1.6]" type="POST_INSTALL">
111
      <delegate class="org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetPostInstallDelegate"/>
122
      <delegate class="org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetPostInstallDelegate"/>
112
    </event-handler>
123
    </event-handler>
113
    
124
    
114
    <event-handler facet="jst.connector" version="1.0,1.5" type="RUNTIME_CHANGED">
125
    <event-handler facet="jst.connector" version="[1.0-1.6]" type="RUNTIME_CHANGED">
115
      <delegate class="org.eclipse.jst.j2ee.project.facet.J2EEFacetRuntimeChangedDelegate"/>
126
      <delegate class="org.eclipse.jst.j2ee.project.facet.J2EEFacetRuntimeChangedDelegate"/>
116
    </event-handler>
127
    </event-handler>
117
    
128
    
(-)archive/org/eclipse/jst/jee/util/internal/JavaEEQuickPeek.java (+21 lines)
Lines 173-178 Link Here
173
						version = J2EEVersionConstants.J2EE_1_4_ID;
173
						version = J2EEVersionConstants.J2EE_1_4_ID;
174
					} else if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_5)) {
174
					} else if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_5)) {
175
						version = J2EEVersionConstants.JEE_5_0_ID;
175
						version = J2EEVersionConstants.JEE_5_0_ID;
176
					} else if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_6)) {
177
						version = J2EEVersionConstants.JEE_6_0_ID;
176
					}
178
					}
177
				}
179
				}
178
				break;
180
				break;
Lines 190-195 Link Here
190
						version = J2EEVersionConstants.J2EE_1_4_ID;
192
						version = J2EEVersionConstants.J2EE_1_4_ID;
191
					} else if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_5)) {
193
					} else if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_5)) {
192
						version = J2EEVersionConstants.JEE_5_0_ID;
194
						version = J2EEVersionConstants.JEE_5_0_ID;
195
					} else if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_6)) {
196
						version = J2EEVersionConstants.JEE_6_0_ID;
193
					}
197
					}
194
				}
198
				}
195
				break;
199
				break;
Lines 205-210 Link Here
205
						version = J2EEVersionConstants.EJB_2_1_ID;
209
						version = J2EEVersionConstants.EJB_2_1_ID;
206
					} else if (schemaName.equals(J2EEConstants.EJBJAR_SCHEMA_3_0)) {
210
					} else if (schemaName.equals(J2EEConstants.EJBJAR_SCHEMA_3_0)) {
207
						version = J2EEVersionConstants.EJB_3_0_ID;
211
						version = J2EEVersionConstants.EJB_3_0_ID;
212
					} else if (schemaName.equals(J2EEConstants.EJBJAR_SCHEMA_3_1)) {
213
						version = J2EEVersionConstants.EJB_3_1_ID;
208
					}
214
					}
209
				}
215
				}
210
				break;
216
				break;
Lines 216-221 Link Here
216
				} else if (schemaName != null) {
222
				} else if (schemaName != null) {
217
					if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_5)) {
223
					if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_5)) {
218
						version = J2EEVersionConstants.JCA_1_5_ID;
224
						version = J2EEVersionConstants.JCA_1_5_ID;
225
					} else if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_6)) {
226
						version = J2EEVersionConstants.JCA_1_6_ID;
219
					}
227
					}
220
				}
228
				}
221
				break;
229
				break;
Lines 231-236 Link Here
231
						version = J2EEVersionConstants.WEB_2_4_ID;
239
						version = J2EEVersionConstants.WEB_2_4_ID;
232
					} else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_2_5)) {
240
					} else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_2_5)) {
233
						version = J2EEVersionConstants.WEB_2_5_ID;
241
						version = J2EEVersionConstants.WEB_2_5_ID;
242
					} else if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_3_0)) {
243
						version = J2EEVersionConstants.WEB_3_0_ID;
234
					}
244
					}
235
				}
245
				}
236
				break;
246
				break;
Lines 287-292 Link Here
287
					break;
297
					break;
288
				case J2EEVersionConstants.EJB_3_0_ID:
298
				case J2EEVersionConstants.EJB_3_0_ID:
289
					javaEEVersion = J2EEConstants.JEE_5_0_ID;
299
					javaEEVersion = J2EEConstants.JEE_5_0_ID;
300
					break;
301
				case J2EEVersionConstants.EJB_3_1_ID:
302
					javaEEVersion = J2EEConstants.JEE_6_0_ID;
303
					break;
290
				}
304
				}
291
				break;
305
				break;
292
			case CONNECTOR_TYPE:
306
			case CONNECTOR_TYPE:
Lines 297-302 Link Here
297
				case J2EEVersionConstants.JCA_1_5_ID:
311
				case J2EEVersionConstants.JCA_1_5_ID:
298
					javaEEVersion = J2EEConstants.J2EE_1_4_ID;
312
					javaEEVersion = J2EEConstants.J2EE_1_4_ID;
299
					break;
313
					break;
314
				case J2EEVersionConstants.JCA_1_6_ID:
315
					javaEEVersion = J2EEConstants.JEE_6_0_ID;
316
					break;
300
				}
317
				}
301
				break;
318
				break;
302
			case WEB_TYPE:
319
			case WEB_TYPE:
Lines 312-317 Link Here
312
					break;
329
					break;
313
				case J2EEVersionConstants.WEB_2_5_ID:
330
				case J2EEVersionConstants.WEB_2_5_ID:
314
					javaEEVersion = J2EEVersionConstants.JEE_5_0_ID;
331
					javaEEVersion = J2EEVersionConstants.JEE_5_0_ID;
332
					break;
333
				case J2EEVersionConstants.WEB_3_0_ID:
334
					javaEEVersion = J2EEVersionConstants.JEE_6_0_ID;
335
					break;
315
				}
336
				}
316
				break;
337
				break;
317
		case WEBSERVICES_TYPE:
338
		case WEBSERVICES_TYPE:
(-)mofj2ee/org/eclipse/jst/j2ee/jca/internal/impl/ConnectorResourceImpl.java (+2 lines)
Lines 170-175 Link Here
170
				return J2EEVersionConstants.J2EE_1_3_ID;
170
				return J2EEVersionConstants.J2EE_1_3_ID;
171
			case J2EEVersionConstants.JCA_1_5_ID :
171
			case J2EEVersionConstants.JCA_1_5_ID :
172
				return J2EEVersionConstants.J2EE_1_4_ID;
172
				return J2EEVersionConstants.J2EE_1_4_ID;
173
			case J2EEVersionConstants.JCA_1_6_ID :
174
				return J2EEVersionConstants.JEE_6_0_ID;
173
			default :
175
			default :
174
			return J2EEVersionConstants.J2EE_1_4_ID;
176
			return J2EEVersionConstants.J2EE_1_4_ID;
175
		}
177
		}
(-)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 155-160 Link Here
155
				return J2EEVersionConstants.J2EE_1_4_ID;
155
				return J2EEVersionConstants.J2EE_1_4_ID;
156
			case J2EEVersionConstants.EJB_3_0_ID :
156
			case J2EEVersionConstants.EJB_3_0_ID :
157
				return J2EEVersionConstants.JEE_5_0_ID;
157
				return J2EEVersionConstants.JEE_5_0_ID;
158
			case J2EEVersionConstants.EJB_3_1_ID :
159
				return J2EEVersionConstants.JEE_6_0_ID;
158
			default :
160
			default :
159
			return J2EEVersionConstants.J2EE_1_4_ID;
161
			return J2EEVersionConstants.J2EE_1_4_ID;
160
		}
162
		}
Lines 178-183 Link Here
178
	public void setModuleVersionID(int id) {
180
	public void setModuleVersionID(int id) {
179
		super.setVersionID(id);
181
		super.setVersionID(id);
180
		switch (id) {
182
		switch (id) {
183
				case (EJB_3_1_ID) :
184
					super.setDoctypeValues(null, null);
185
					primSetVersionID(EJB_3_1_ID);
186
					break;
181
				case (EJB_3_0_ID) :
187
				case (EJB_3_0_ID) :
182
					super.setDoctypeValues(null, null);
188
					super.setDoctypeValues(null, null);
183
					primSetVersionID(EJB_3_0_ID);
189
					primSetVersionID(EJB_3_0_ID);
Lines 204-209 Link Here
204
	@Override
210
	@Override
205
	public void setJ2EEVersionID(int id) {
211
	public void setJ2EEVersionID(int id) {
206
	switch (id) {
212
	switch (id) {
213
		case (JEE_6_0_ID) :
214
					primSetDoctypeValues(null, null);
215
					primSetVersionID(EJB_3_1_ID);
216
					break;
207
		case (JEE_5_0_ID) :
217
		case (JEE_5_0_ID) :
208
					primSetDoctypeValues(null, null);
218
					primSetDoctypeValues(null, null);
209
					primSetVersionID(EJB_3_0_ID);
219
					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 75-81 Link Here
75
    String APPLICATION_SYSTEMID_1_4         =       "http://java.sun.com/dtd/application_1_4.dtd"; //$NON-NLS-1$
77
    String APPLICATION_SYSTEMID_1_4         =       "http://java.sun.com/dtd/application_1_4.dtd"; //$NON-NLS-1$
76
    String APPLICATION_ALT_SYSTEMID_1_4 =  "http://java.sun.com/dtd/application_1_4.dtd"; //$NON-NLS-1$
78
    String APPLICATION_ALT_SYSTEMID_1_4 =  "http://java.sun.com/dtd/application_1_4.dtd"; //$NON-NLS-1$
77
    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$
79
    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_5         =  "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"; //$NON-NLS-1$ // EJB3
80
    String APPLICATION_SCHEMA_5         =  "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"; //$NON-NLS-1$
81
    // The following is still set to the Java EE 5 schema, because to date the Java EE 6 one is not yet defined
82
    String APPLICATION_SCHEMA_6         =  "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"; //$NON-NLS-1$ 
79
    
83
    
80
    //EJB Jar Constants
84
    //EJB Jar Constants
81
    /** "ejb-jar_ID"                                                                                                                */
85
    /** "ejb-jar_ID"                                                                                                                */
Lines 97-104 Link Here
97
    String EJBJAR_ALT_SYSTEMID_2_0  =   "http://java.sun.com/dtd/ejb-jar_2.0.dtd"; //$NON-NLS-1$
101
    String EJBJAR_ALT_SYSTEMID_2_0  =   "http://java.sun.com/dtd/ejb-jar_2.0.dtd"; //$NON-NLS-1$
98
    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$
102
    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$
99
    String EJBJAR_SCHEMA_2_1_NS     =   "http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd";//$NON-NLS-1$
103
    String EJBJAR_SCHEMA_2_1_NS     =   "http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd";//$NON-NLS-1$
100
    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
104
    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$ 
101
    String EJBJAR_SCHEMA_3_0_NS     =   "http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"; //$NON-NLS-1$ // EJB3
105
    String EJBJAR_SCHEMA_3_0_NS     =   "http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"; //$NON-NLS-1$
106
    // The following two are still set to the EJB 3.0 schema, because to date the EJB 3.1 one is not yet defined
107
    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$ 
108
    String EJBJAR_SCHEMA_3_1_NS     =   "http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"; //$NON-NLS-1$ 
102
    
109
    
103
    // EAR constants
110
    // EAR constants
104
    
111
    
Lines 125-130 Link Here
125
    String WEBAPP_ALT_SYSTEMID_2_3  =       "http://java.sun.com/dtd/web-app_2.3.dtd"; //$NON-NLS-1$
132
    String WEBAPP_ALT_SYSTEMID_2_3  =       "http://java.sun.com/dtd/web-app_2.3.dtd"; //$NON-NLS-1$
126
    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$
133
    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$
127
    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
    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$
135
    // The following is still set to the Servlet 2.5 schema, because to date the Servlet 3.0 one is not yet defined
136
    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$
128
    //J2C Resource Adapter Constants
137
    //J2C Resource Adapter Constants
129
    /** "J2CResourceAdapter_ID"                                                                                             */
138
    /** "J2CResourceAdapter_ID"                                                                                             */
130
    String RAR_ID                                           =       "J2CResourceAdapter_ID"; //$NON-NLS-1$
139
    String RAR_ID                                           =       "J2CResourceAdapter_ID"; //$NON-NLS-1$
Lines 140-146 Link Here
140
    String CONNECTOR_SYSTEMID_1_0           =       "http://java.sun.com/dtd/connector_1_0.dtd"; //$NON-NLS-1$
149
    String CONNECTOR_SYSTEMID_1_0           =       "http://java.sun.com/dtd/connector_1_0.dtd"; //$NON-NLS-1$
141
    String CONNECTOR_ALT_SYSTEMID_1_0       =       "http://java.sun.com/dtd/connector_1.0.dtd"; //$NON-NLS-1$
150
    String CONNECTOR_ALT_SYSTEMID_1_0       =       "http://java.sun.com/dtd/connector_1.0.dtd"; //$NON-NLS-1$
142
    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$
151
    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$
143
    
152
    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$
144
    //Web Services Constants
153
    //Web Services Constants
145
    /** Doc type for webservices deployment descriptors */
154
    /** Doc type for webservices deployment descriptors */
146
    String WEB_SERVICES_CLIENT_DOCTYPE      = "webservicesclient";  //$NON-NLS-1$
155
    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
}
(-)webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java (-1 / +25 lines)
Lines 109-115 Link Here
109
			if (webroot.getProjectRelativePath().equals(new Path("/"))) //$NON-NLS-1$
109
			if (webroot.getProjectRelativePath().equals(new Path("/"))) //$NON-NLS-1$
110
				webroot.createLink(new Path("/" + model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER)), 0, null); //$NON-NLS-1$
110
				webroot.createLink(new Path("/" + model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER)), 0, null); //$NON-NLS-1$
111
111
112
			if( fv == WebFacetUtils.WEB_25 )
112
			if( fv == WebFacetUtils.WEB_30 )
113
			{
114
				 if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){
115
		                createWeb30DeploymentDescriptor(project, fv, webinfFolder, monitor);
116
		            }
117
			}
118
			else if( fv == WebFacetUtils.WEB_25 )
113
			{
119
			{
114
		         if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){
120
		         if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){
115
		                createWeb25DeploymentDescriptor(project, fv, webinfFolder, monitor);
121
		                createWeb25DeploymentDescriptor(project, fv, webinfFolder, monitor);
Lines 269-274 Link Here
269
		return pjpath.append(model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER));
275
		return pjpath.append(model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER));
270
	}
276
	}
271
	
277
	
278
	// This method still creates a web.xml with a Servlet 2.5 schema, because the Servlet 3.0 one is not yet defined
279
    private void createWeb30DeploymentDescriptor(final IProject project, final IProjectFacetVersion fv, 
280
                                               IFolder webinfFolder, IProgressMonitor monitor) throws CoreException {
281
       // Create the deployment descriptor (web.xml) if one doesn't exist
282
       IFile webxmlFile = webinfFolder.getFile("web.xml"); //$NON-NLS-1$
283
       if (!webxmlFile.exists()) {
284
           try {
285
               // Create a minimal web.xml file, so the model can be initialized
286
               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$
287
               webxmlFile.create(new ByteArrayInputStream(webXmlContents.getBytes("UTF-8")), true, monitor); //$NON-NLS-1$
288
               
289
               // TODO do some stuff with the module
290
           } catch (UnsupportedEncodingException e) {
291
        	   WebPlugin.logError(e);
292
           }
293
       }
294
   }
295
	
272
    private void createWeb25DeploymentDescriptor(final IProject project, final IProjectFacetVersion fv, 
296
    private void createWeb25DeploymentDescriptor(final IProject project, final IProjectFacetVersion fv, 
273
                                               IFolder webinfFolder, IProgressMonitor monitor) throws CoreException {
297
                                               IFolder webinfFolder, IProgressMonitor monitor) throws CoreException {
274
       // Create the deployment descriptor (web.xml) if one doesn't exist
298
       // 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 68-75 Link Here
68
			String projectName = model.getStringProperty(FACET_PROJECT_NAME).replace(' ', '_');
69
			String projectName = model.getStringProperty(FACET_PROJECT_NAME).replace(' ', '_');
69
			return projectName + IJ2EEModuleConstants.WAR_EXT;
70
			return projectName + IJ2EEModuleConstants.WAR_EXT;
70
		} else if (propertyName.equals(GENERATE_DD)) {
71
		} else if (propertyName.equals(GENERATE_DD)) {
71
			IProjectFacetVersion facetVersion = (IProjectFacetVersion)getProperty(FACET_VERSION);
72
			String facetVersion = getStringProperty(FACET_VERSION_STR);
72
			if(facetVersion == WebFacetUtils.WEB_25){
73
			if(J2EEVersionUtil.convertVersionStringToInt(facetVersion) >= J2EEVersionConstants.WEB_2_5_ID) {
73
				return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.DYNAMIC_WEB_GENERATE_DD));
74
				return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.DYNAMIC_WEB_GENERATE_DD));
74
			}
75
			}
75
			return Boolean.TRUE;
76
			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
    
(-)j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientFacetInstallPage.java (-1 / +4 lines)
Lines 13-19 Link Here
13
13
14
import org.eclipse.jface.dialogs.Dialog;
14
import org.eclipse.jface.dialogs.Dialog;
15
import org.eclipse.jst.j2ee.internal.J2EEConstants;
15
import org.eclipse.jst.j2ee.internal.J2EEConstants;
16
import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
16
import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
17
import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
18
import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
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;
19
import org.eclipse.jst.j2ee.project.facet.IAppClientFacetInstallDataModelProperties;
21
import org.eclipse.jst.j2ee.project.facet.IAppClientFacetInstallDataModelProperties;
Lines 59-65 Link Here
59
	protected void handleFacetVersionChangedEvent()
61
	protected void handleFacetVersionChangedEvent()
60
    {
62
    {
61
        final IProjectFacetVersion fv = (IProjectFacetVersion) this.model.getProperty( FACET_VERSION );
63
        final IProjectFacetVersion fv = (IProjectFacetVersion) this.model.getProperty( FACET_VERSION );
62
        this.addDD.setVisible( fv == APPLICATION_CLIENT_50 );
64
        boolean isJEE5OrGreater = J2EEVersionUtil.convertVersionStringToInt(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID;
65
        this.addDD.setVisible(isJEE5OrGreater);
63
    }
66
    }
64
67
65
}
68
}
(-)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$ //$NON-NLS-2$
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 76-83 Link Here
76
			if (getBooleanProperty(CREATE_CLIENT)) {
77
			if (getBooleanProperty(CREATE_CLIENT)) {
77
				return Boolean.TRUE;
78
				return Boolean.TRUE;
78
			}
79
			}
79
			IProjectFacetVersion facetVersion = (IProjectFacetVersion)getProperty(FACET_VERSION);
80
			String facetVersion = getStringProperty(FACET_VERSION_STR);
80
			if (facetVersion == EJB_30) {
81
			if (J2EEVersionUtil.convertVersionStringToInt(facetVersion) >= J2EEVersionConstants.EJB_3_0_ID) {
81
				return J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.EJB_GENERATE_DD);
82
				return J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.EJB_GENERATE_DD);
82
			}
83
			}
83
			return Boolean.TRUE;
84
			return Boolean.TRUE;
(-)j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EEProjectUtilities.java (-9 / +13 lines)
Lines 91-96 Link Here
91
import org.eclipse.wst.common.frameworks.internal.SimpleValidateEdit;
91
import org.eclipse.wst.common.frameworks.internal.SimpleValidateEdit;
92
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
92
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
93
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
93
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
94
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
94
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
95
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
95
import org.eclipse.wst.server.core.IRuntime;
96
import org.eclipse.wst.server.core.IRuntime;
96
97
Lines 996-1002 Link Here
996
	
997
	
997
	/**
998
	/**
998
	 * @param project
999
	 * @param project
999
	 * @return true, if jee version 5.0 (or their respective ejb, web, app versions)
1000
	 * @return true, if jee version 5.0 or later (or their respective ejb, web, app versions)
1000
	 * , it must be noted that this method only looks at the facet & their versions to determine 
1001
	 * , it must be noted that this method only looks at the facet & their versions to determine 
1001
	 * the jee level. It does not read deployment descriptors for performance reasons.
1002
	 * the jee level. It does not read deployment descriptors for performance reasons.
1002
	 */
1003
	 */
Lines 1009-1025 Link Here
1009
			if (facetedProject == null)
1010
			if (facetedProject == null)
1010
				return false;
1011
				return false;
1011
			if(isEARProject(facetedProject)){
1012
			if(isEARProject(facetedProject)){
1012
				IProjectFacet earFacet = ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_EAR_MODULE);
1013
				IProjectFacetVersion fv = facetedProject.getProjectFacetVersion(ENTERPRISE_APPLICATION_FACET);
1013
				ret = facetedProject.hasProjectFacet(earFacet.getVersion(J2EEVersionUtil.convertVersionIntToString(J2EEVersionConstants.JEE_5_0_ID)));
1014
				ret = J2EEVersionUtil.convertVersionStringToInt(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID;
1014
			} else if(isDynamicWebProject(facetedProject)){
1015
			} else if(isDynamicWebProject(facetedProject)){
1015
				IProjectFacet webFacet = ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_WEB_MODULE);
1016
				IProjectFacetVersion fv = facetedProject.getProjectFacetVersion(DYNAMIC_WEB_FACET);
1016
				ret = facetedProject.hasProjectFacet(webFacet.getVersion(J2EEVersionUtil.convertVersionIntToString(J2EEVersionUtil.convertJ2EEVersionIDToWebVersionID(J2EEVersionConstants.JEE_5_0_ID))));
1017
				ret = J2EEVersionUtil.convertWebVersionStringToJ2EEVersionID(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID;
1017
			} else if(isEJBProject(facetedProject)){
1018
			} else if(isEJBProject(facetedProject)){
1018
				IProjectFacet ejbFacet = ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_EJB_MODULE);
1019
				IProjectFacetVersion fv = facetedProject.getProjectFacetVersion(EJB_FACET);
1019
				ret = facetedProject.hasProjectFacet(ejbFacet.getVersion(J2EEVersionUtil.convertVersionIntToString(J2EEVersionUtil.convertJ2EEVersionIDToEJBVersionID(J2EEVersionConstants.JEE_5_0_ID))));
1020
				ret = J2EEVersionUtil.convertEJBVersionStringToJ2EEVersionID(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID;
1020
			} else if(isApplicationClientProject(facetedProject)){
1021
			} else if(isApplicationClientProject(facetedProject)){
1021
				IProjectFacet appFacet = ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_APPCLIENT_MODULE);
1022
				IProjectFacetVersion fv = facetedProject.getProjectFacetVersion(APPLICATION_CLIENT_FACET);
1022
				ret = facetedProject.hasProjectFacet(appFacet.getVersion(J2EEVersionUtil.convertVersionIntToString(J2EEVersionConstants.JEE_5_0_ID)));
1023
				ret = J2EEVersionUtil.convertAppClientVersionStringToJ2EEVersionID(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID;
1024
			} else if (isJCAProject(facetedProject)){
1025
				IProjectFacetVersion fv = facetedProject.getProjectFacetVersion(JCA_FACET);
1026
				ret = J2EEVersionUtil.convertConnectorVersionStringToJ2EEVersionID(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID;
1023
			}
1027
			}
1024
		} catch (CoreException e) {
1028
		} catch (CoreException e) {
1025
			J2EEPlugin.logError(e);
1029
			J2EEPlugin.logError(e);
(-)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 IProjectFacet APPLICATION_CLIENT_FACET = ProjectFacetsManager.getProjectFacet(APPLICATION_CLIENT);
30
	public 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 IProjectFacet EJB_FACET = ProjectFacetsManager.getProjectFacet(EJB);
38
	public 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 IProjectFacet DYNAMIC_WEB_FACET = ProjectFacetsManager.getProjectFacet(DYNAMIC_WEB);
46
	public 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 IProjectFacet JCA_FACET = ProjectFacetsManager.getProjectFacet(JCA);
60
	public 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$ //$NON-NLS-2$
126
	                    appClientFile.create(new ByteArrayInputStream(appClientXmlContents.getBytes("UTF-8")), true, monitor); //$NON-NLS-1$
127
	                   
128
	                } catch (UnsupportedEncodingException e) {
129
	                	J2EEPlugin.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 45-52 Link Here
45
			String projectName = model.getStringProperty(FACET_PROJECT_NAME).replace(' ','_');
46
			String projectName = model.getStringProperty(FACET_PROJECT_NAME).replace(' ','_');
46
			return projectName + IJ2EEModuleConstants.JAR_EXT; 
47
			return projectName + IJ2EEModuleConstants.JAR_EXT; 
47
		} else if (propertyName.equals(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)) {
48
		} else if (propertyName.equals(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)) {
48
			IProjectFacetVersion facetVersion = (IProjectFacetVersion)getProperty(FACET_VERSION);
49
			String facetVersion = getStringProperty(FACET_VERSION_STR);
49
			if(facetVersion == APPLICATION_CLIENT_50){
50
			if(J2EEVersionUtil.convertVersionStringToInt(facetVersion) >= J2EEVersionConstants.JEE_5_0_ID){
50
				return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.APP_CLIENT_GENERATE_DD));
51
				return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.APP_CLIENT_GENERATE_DD));
51
			}
52
			}
52
			return Boolean.TRUE;
53
			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 48-55 Link Here
48
		} else if (propertyName.equals(J2EE_PROJECTS_LIST) || propertyName.equals(JAVA_PROJECT_LIST)) {
48
		} else if (propertyName.equals(J2EE_PROJECTS_LIST) || propertyName.equals(JAVA_PROJECT_LIST)) {
49
			return Collections.EMPTY_LIST;
49
			return Collections.EMPTY_LIST;
50
		} else if(propertyName.equals(GENERATE_DD)){
50
		} else if(propertyName.equals(GENERATE_DD)){
51
			IProjectFacetVersion facetVersion = (IProjectFacetVersion)getProperty(FACET_VERSION);
51
			String facetVersion = getStringProperty(FACET_VERSION_STR);
52
			if(facetVersion == IJ2EEFacetConstants.ENTERPRISE_APPLICATION_50){
52
			if(J2EEVersionUtil.convertVersionStringToInt(facetVersion) >= J2EEVersionConstants.JEE_5_0_ID){
53
				return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.APPLICATION_GENERATE_DD));
53
				return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.APPLICATION_GENERATE_DD));
54
			}
54
			}
55
			return Boolean.TRUE;
55
			return Boolean.TRUE;
(-)common/org/eclipse/jst/j2ee/internal/common/J2EEVersionUtil.java (-6 / +51 lines)
Lines 35-40 Link Here
35
		
35
		
36
		case J2EEVersionConstants.SERVLET_2_5:
36
		case J2EEVersionConstants.SERVLET_2_5:
37
			return J2EEVersionConstants.VERSION_2_5_TEXT;
37
			return J2EEVersionConstants.VERSION_2_5_TEXT;
38
		
39
		case J2EEVersionConstants.SERVLET_3_0:
40
			return J2EEVersionConstants.VERSION_3_0_TEXT;
38
		}
41
		}
39
		return ""; //$NON-NLS-1$
42
		return ""; //$NON-NLS-1$
40
43
Lines 57-62 Link Here
57
		
60
		
58
		case J2EEVersionConstants.EJB_3_0_ID:
61
		case J2EEVersionConstants.EJB_3_0_ID:
59
			return J2EEVersionConstants.VERSION_3_0_TEXT;
62
			return J2EEVersionConstants.VERSION_3_0_TEXT;
63
		
64
		case J2EEVersionConstants.EJB_3_1_ID:
65
			return J2EEVersionConstants.VERSION_3_1_TEXT;
60
		}
66
		}
61
		return ""; //$NON-NLS-1$
67
		return ""; //$NON-NLS-1$
62
	}
68
	}
Lines 69-74 Link Here
69
		case J2EEVersionConstants.JCA_1_5_ID:
75
		case J2EEVersionConstants.JCA_1_5_ID:
70
			return J2EEVersionConstants.VERSION_1_5_TEXT;
76
			return J2EEVersionConstants.VERSION_1_5_TEXT;
71
77
78
		case J2EEVersionConstants.JCA_1_6_ID:
79
			return J2EEVersionConstants.VERSION_1_6_TEXT;
80
72
		}
81
		}
73
		return ""; //$NON-NLS-1$
82
		return ""; //$NON-NLS-1$
74
	}
83
	}
Lines 87-92 Link Here
87
		case J2EEVersionConstants.JEE_5_0_ID:
96
		case J2EEVersionConstants.JEE_5_0_ID:
88
			return J2EEVersionConstants.VERSION_5_0_TEXT;
97
			return J2EEVersionConstants.VERSION_5_0_TEXT;
89
98
99
		case J2EEVersionConstants.JEE_6_0_ID:
100
			return J2EEVersionConstants.VERSION_6_0_TEXT;
101
90
		}
102
		}
91
		return "";//$NON-NLS-1$
103
		return "";//$NON-NLS-1$
92
	}
104
	}
Lines 100-105 Link Here
100
			return J2EEVersionConstants.J2EE_1_4_ID;
112
			return J2EEVersionConstants.J2EE_1_4_ID;
101
		if (version.equals(J2EEVersionConstants.VERSION_5_0_TEXT))
113
		if (version.equals(J2EEVersionConstants.VERSION_5_0_TEXT))
102
			return J2EEVersionConstants.JEE_5_0_ID;
114
			return J2EEVersionConstants.JEE_5_0_ID;
115
		if (version.equals(J2EEVersionConstants.VERSION_6_0_TEXT))
116
			return J2EEVersionConstants.JEE_6_0_ID;
103
		// default
117
		// default
104
		return J2EEVersionConstants.JEE_5_0_ID;
118
		return J2EEVersionConstants.JEE_5_0_ID;
105
	}
119
	}
Lines 113-118 Link Here
113
			return J2EEVersionConstants.J2EE_1_4_ID;
127
			return J2EEVersionConstants.J2EE_1_4_ID;
114
		if (version.equals(J2EEVersionConstants.VERSION_3_0_TEXT))
128
		if (version.equals(J2EEVersionConstants.VERSION_3_0_TEXT))
115
			return J2EEVersionConstants.JEE_5_0_ID;
129
			return J2EEVersionConstants.JEE_5_0_ID;
130
		if (version.equals(J2EEVersionConstants.VERSION_3_1_TEXT))
131
			return J2EEVersionConstants.JEE_6_0_ID;
116
		// default
132
		// default
117
		return J2EEVersionConstants.JEE_5_0_ID;
133
		return J2EEVersionConstants.JEE_5_0_ID;
118
	}
134
	}
Lines 126-131 Link Here
126
			return J2EEVersionConstants.J2EE_1_4_ID;
142
			return J2EEVersionConstants.J2EE_1_4_ID;
127
		if (version.equals(J2EEVersionConstants.VERSION_2_5_TEXT))
143
		if (version.equals(J2EEVersionConstants.VERSION_2_5_TEXT))
128
			return J2EEVersionConstants.JEE_5_0_ID;
144
			return J2EEVersionConstants.JEE_5_0_ID;
145
		if (version.equals(J2EEVersionConstants.VERSION_3_0_TEXT))
146
			return J2EEVersionConstants.JEE_6_0_ID;
129
		// default
147
		// default
130
		return J2EEVersionConstants.J2EE_1_4_ID;
148
		return J2EEVersionConstants.J2EE_1_4_ID;
131
	}
149
	}
Lines 135-140 Link Here
135
			return J2EEVersionConstants.J2EE_1_3_ID;
153
			return J2EEVersionConstants.J2EE_1_3_ID;
136
		if (version.equals(J2EEVersionConstants.VERSION_1_5_TEXT))
154
		if (version.equals(J2EEVersionConstants.VERSION_1_5_TEXT))
137
			return J2EEVersionConstants.J2EE_1_4_ID;
155
			return J2EEVersionConstants.J2EE_1_4_ID;
156
		if (version.equals(J2EEVersionConstants.VERSION_1_6_TEXT))
157
			return J2EEVersionConstants.JEE_6_0_ID;
138
		// default
158
		// default
139
		return J2EEVersionConstants.J2EE_1_4_ID;
159
		return J2EEVersionConstants.J2EE_1_4_ID;
140
	}
160
	}
Lines 149-154 Link Here
149
				return J2EEVersionConstants.EJB_2_1_ID;
169
				return J2EEVersionConstants.EJB_2_1_ID;
150
			case J2EEVersionConstants.JEE_5_0_ID:
170
			case J2EEVersionConstants.JEE_5_0_ID:
151
				return J2EEVersionConstants.EJB_3_0_ID;
171
				return J2EEVersionConstants.EJB_3_0_ID;
172
			case J2EEVersionConstants.JEE_6_0_ID:
173
				return J2EEVersionConstants.EJB_3_1_ID;
152
		}
174
		}
153
		// default
175
		// default
154
		return J2EEVersionConstants.EJB_3_0_ID;
176
		return J2EEVersionConstants.EJB_3_0_ID;
Lines 164-169 Link Here
164
				return J2EEVersionConstants.WEB_2_4_ID;
186
				return J2EEVersionConstants.WEB_2_4_ID;
165
			case J2EEVersionConstants.JEE_5_0_ID:
187
			case J2EEVersionConstants.JEE_5_0_ID:
166
				return J2EEVersionConstants.WEB_2_5_ID;
188
				return J2EEVersionConstants.WEB_2_5_ID;
189
			case J2EEVersionConstants.JEE_6_0_ID:
190
				return J2EEVersionConstants.WEB_3_0_ID;
167
		}
191
		}
168
		// default
192
		// default
169
		return J2EEVersionConstants.WEB_2_5_ID;
193
		return J2EEVersionConstants.WEB_2_5_ID;
Lines 174-180 Link Here
174
			case J2EEVersionConstants.J2EE_1_3_ID:
198
			case J2EEVersionConstants.J2EE_1_3_ID:
175
				return J2EEVersionConstants.JCA_1_0_ID;
199
				return J2EEVersionConstants.JCA_1_0_ID;
176
			case J2EEVersionConstants.J2EE_1_4_ID:
200
			case J2EEVersionConstants.J2EE_1_4_ID:
201
			case J2EEVersionConstants.JEE_5_0_ID:
177
				return J2EEVersionConstants.JCA_1_5_ID;
202
				return J2EEVersionConstants.JCA_1_5_ID;
203
			case J2EEVersionConstants.JEE_6_0_ID:
204
				return J2EEVersionConstants.JCA_1_6_ID;
178
		}
205
		}
179
		// default
206
		// default
180
		return J2EEVersionConstants.JCA_1_5_ID;
207
		return J2EEVersionConstants.JCA_1_5_ID;
Lines 220-225 Link Here
220
		else if (version.equals(J2EEVersionConstants.VERSION_1_5_TEXT))
247
		else if (version.equals(J2EEVersionConstants.VERSION_1_5_TEXT))
221
			nVersion = J2EEVersionConstants.VERSION_1_5;
248
			nVersion = J2EEVersionConstants.VERSION_1_5;
222
		
249
		
250
		else if (version.equals(J2EEVersionConstants.VERSION_1_6_TEXT))
251
			nVersion = J2EEVersionConstants.VERSION_1_6;
252
		
223
		else if (version.equals(J2EEVersionConstants.VERSION_2_0_TEXT))
253
		else if (version.equals(J2EEVersionConstants.VERSION_2_0_TEXT))
224
			nVersion = J2EEVersionConstants.VERSION_2_0;
254
			nVersion = J2EEVersionConstants.VERSION_2_0;
225
		
255
		
Lines 236-248 Link Here
236
			nVersion = J2EEVersionConstants.VERSION_2_4;
266
			nVersion = J2EEVersionConstants.VERSION_2_4;
237
		
267
		
238
		else if (version.equals(J2EEVersionConstants.VERSION_2_5_TEXT))
268
		else if (version.equals(J2EEVersionConstants.VERSION_2_5_TEXT))
239
			nVersion = J2EEVersionConstants.VERSION_2_5;		
269
			nVersion = J2EEVersionConstants.VERSION_2_5;	
240
		
241
		else if (version.equals(J2EEVersionConstants.VERSION_5_0_TEXT))
242
			nVersion = J2EEVersionConstants.VERSION_5_0;		
243
270
244
		else if (version.equals(J2EEVersionConstants.VERSION_3_0_TEXT))
271
		else if (version.equals(J2EEVersionConstants.VERSION_3_0_TEXT))
245
			nVersion = J2EEVersionConstants.VERSION_3_0;		
272
			nVersion = J2EEVersionConstants.VERSION_3_0;			
273
274
		else if (version.equals(J2EEVersionConstants.VERSION_3_1_TEXT))
275
			nVersion = J2EEVersionConstants.VERSION_3_1;	
276
		
277
		else if (version.equals(J2EEVersionConstants.VERSION_5_0_TEXT))
278
			nVersion = J2EEVersionConstants.VERSION_5_0;			
279
		
280
		else if (version.equals(J2EEVersionConstants.VERSION_6_0_TEXT))
281
			nVersion = J2EEVersionConstants.VERSION_6_0;	
246
282
247
		return nVersion;
283
		return nVersion;
248
	}
284
	}
Lines 267-272 Link Here
267
		else if (version == J2EEVersionConstants.VERSION_1_5)
303
		else if (version == J2EEVersionConstants.VERSION_1_5)
268
			nVersion = J2EEVersionConstants.VERSION_1_5_TEXT;
304
			nVersion = J2EEVersionConstants.VERSION_1_5_TEXT;
269
		
305
		
306
		else if (version == J2EEVersionConstants.VERSION_1_6)
307
			nVersion = J2EEVersionConstants.VERSION_1_6_TEXT;
308
		
270
		else if (version == J2EEVersionConstants.VERSION_2_0)
309
		else if (version == J2EEVersionConstants.VERSION_2_0)
271
			nVersion = J2EEVersionConstants.VERSION_2_0_TEXT;
310
			nVersion = J2EEVersionConstants.VERSION_2_0_TEXT;
272
		
311
		
Lines 286-295 Link Here
286
			nVersion = J2EEVersionConstants.VERSION_2_5_TEXT;		
325
			nVersion = J2EEVersionConstants.VERSION_2_5_TEXT;		
287
326
288
		else if (version == J2EEVersionConstants.VERSION_3_0)
327
		else if (version == J2EEVersionConstants.VERSION_3_0)
289
			nVersion = J2EEVersionConstants.VERSION_3_0_TEXT;	
328
			nVersion = J2EEVersionConstants.VERSION_3_0_TEXT;		
329
330
		else if (version == J2EEVersionConstants.VERSION_3_1)
331
			nVersion = J2EEVersionConstants.VERSION_3_1_TEXT;	
290
		
332
		
291
		else if (version == J2EEVersionConstants.VERSION_5_0)
333
		else if (version == J2EEVersionConstants.VERSION_5_0)
292
			nVersion = J2EEVersionConstants.VERSION_5_0_TEXT;		
334
			nVersion = J2EEVersionConstants.VERSION_5_0_TEXT;		
335
		
336
		else if (version == J2EEVersionConstants.VERSION_6_0)
337
			nVersion = J2EEVersionConstants.VERSION_6_0_TEXT;	
293
	
338
	
294
		return nVersion;
339
		return nVersion;
295
	}
340
	}
(-)earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEComponentImportDataModelProvider.java (+3 lines)
Lines 63-68 Link Here
63
		case J2EEVersionConstants.JEE_5_0_ID:
63
		case J2EEVersionConstants.JEE_5_0_ID:
64
			javaFacetVersion = JavaFacetUtils.JAVA_50;
64
			javaFacetVersion = JavaFacetUtils.JAVA_50;
65
			break;
65
			break;
66
		case J2EEVersionConstants.JEE_6_0_ID:
67
			javaFacetVersion = JavaFacetUtils.JAVA_60;
68
			break;
66
		}
69
		}
67
		if(javaFacetVersion != null){
70
		if(javaFacetVersion != null){
68
			IDataModel moduleDM = model.getNestedModel(NESTED_MODEL_J2EE_COMPONENT_CREATION);
71
			IDataModel moduleDM = model.getNestedModel(NESTED_MODEL_J2EE_COMPONENT_CREATION);
(-)j2eecreation/org/eclipse/jst/j2ee/project/EarUtilities.java (+8 lines)
Lines 269-274 Link Here
269
			{
269
			{
270
				switch (earVersion)
270
				switch (earVersion)
271
				{
271
				{
272
				case J2EEVersionConstants.VERSION_6_0:
273
					retVal.add(DYNAMIC_WEB_30);
272
				case J2EEVersionConstants.VERSION_5_0:
274
				case J2EEVersionConstants.VERSION_5_0:
273
					retVal.add(DYNAMIC_WEB_25);
275
					retVal.add(DYNAMIC_WEB_25);
274
					//$FALL-THROUGH$
276
					//$FALL-THROUGH$
Lines 287-292 Link Here
287
			{
289
			{
288
				switch (earVersion)
290
				switch (earVersion)
289
				{
291
				{
292
				case J2EEVersionConstants.VERSION_6_0:
293
					retVal.add(EJB_31);
290
				case J2EEVersionConstants.VERSION_5_0:
294
				case J2EEVersionConstants.VERSION_5_0:
291
					retVal.add(EJB_30);
295
					retVal.add(EJB_30);
292
					//$FALL-THROUGH$
296
					//$FALL-THROUGH$
Lines 304-309 Link Here
304
			{
308
			{
305
				switch (earVersion)
309
				switch (earVersion)
306
				{
310
				{
311
				case J2EEVersionConstants.VERSION_6_0:
312
					retVal.add(JCA_16);
307
				case J2EEVersionConstants.VERSION_5_0:
313
				case J2EEVersionConstants.VERSION_5_0:
308
				case J2EEVersionConstants.VERSION_1_4:
314
				case J2EEVersionConstants.VERSION_1_4:
309
					retVal.add(JCA_15);
315
					retVal.add(JCA_15);
Lines 319-324 Link Here
319
			{
325
			{
320
				switch (earVersion)
326
				switch (earVersion)
321
				{
327
				{
328
				case J2EEVersionConstants.VERSION_6_0:
329
					retVal.add(APPLICATION_CLIENT_60);
322
				case J2EEVersionConstants.VERSION_5_0:
330
				case J2EEVersionConstants.VERSION_5_0:
323
					retVal.add(APPLICATION_CLIENT_50);
331
					retVal.add(APPLICATION_CLIENT_50);
324
					//$FALL-THROUGH$
332
					//$FALL-THROUGH$
(-)ejb_ui/org/eclipse/jst/ejb/ui/project/facet/EjbFacetInstallPage.java (-3 / +5 lines)
Lines 14-20 Link Here
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.ejb.project.operations.IEjbFacetInstallDataModelProperties;
15
import org.eclipse.jst.j2ee.ejb.project.operations.IEjbFacetInstallDataModelProperties;
16
import org.eclipse.jst.j2ee.internal.J2EEConstants;
16
import org.eclipse.jst.j2ee.internal.J2EEConstants;
17
import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
17
import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
18
import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
19
import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
18
import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
20
import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
19
import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage;
21
import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage;
20
import org.eclipse.swt.SWT;
22
import org.eclipse.swt.SWT;
Lines 26-32 Link Here
26
import org.eclipse.swt.widgets.Group;
28
import org.eclipse.swt.widgets.Group;
27
import org.eclipse.swt.widgets.Label;
29
import org.eclipse.swt.widgets.Label;
28
import org.eclipse.swt.widgets.Text;
30
import org.eclipse.swt.widgets.Text;
29
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
30
31
31
32
32
33
Lines 76-83 Link Here
76
    @Override
77
    @Override
77
	protected void handleFacetVersionChangedEvent()
78
	protected void handleFacetVersionChangedEvent()
78
    {
79
    {
79
        final IProjectFacetVersion fv = (IProjectFacetVersion) this.model.getProperty( FACET_VERSION );
80
        String fv = model.getStringProperty(FACET_VERSION_STR);
80
        this.addDD.setVisible( fv == EJB_30 );
81
        boolean isEJB30OrGreater = J2EEVersionUtil.convertVersionStringToInt(fv) >= J2EEVersionConstants.EJB_3_0_ID;
82
        this.addDD.setVisible(isEJB30OrGreater);
81
    }
83
    }
82
    
84
    
83
    private Composite createEjbClientComposite(Composite parent) {
85
    private Composite createEjbClientComposite(Composite parent) {
(-)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
    
(-)servlet_ui/org/eclipse/jst/servlet/ui/project/facet/WebFacetInstallPage.java (-4 / +5 lines)
Lines 14-22 Link Here
14
14
15
import org.eclipse.jface.dialogs.Dialog;
15
import org.eclipse.jface.dialogs.Dialog;
16
import org.eclipse.jst.j2ee.internal.J2EEConstants;
16
import org.eclipse.jst.j2ee.internal.J2EEConstants;
17
import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
18
import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
17
import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage;
19
import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage;
18
import org.eclipse.jst.j2ee.web.project.facet.IWebFacetInstallDataModelProperties;
20
import org.eclipse.jst.j2ee.web.project.facet.IWebFacetInstallDataModelProperties;
19
import org.eclipse.jst.j2ee.web.project.facet.WebFacetUtils;
20
import org.eclipse.jst.servlet.ui.IWebUIContextIds;
21
import org.eclipse.jst.servlet.ui.IWebUIContextIds;
21
import org.eclipse.osgi.util.NLS;
22
import org.eclipse.osgi.util.NLS;
22
import org.eclipse.swt.SWT;
23
import org.eclipse.swt.SWT;
Lines 26-32 Link Here
26
import org.eclipse.swt.widgets.Control;
27
import org.eclipse.swt.widgets.Control;
27
import org.eclipse.swt.widgets.Label;
28
import org.eclipse.swt.widgets.Label;
28
import org.eclipse.swt.widgets.Text;
29
import org.eclipse.swt.widgets.Text;
29
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
30
30
31
/**
31
/**
32
 * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
32
 * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
Lines 80-87 Link Here
80
	@Override
80
	@Override
81
	protected void handleFacetVersionChangedEvent()
81
	protected void handleFacetVersionChangedEvent()
82
	{
82
	{
83
	    final IProjectFacetVersion fv = (IProjectFacetVersion) this.model.getProperty( FACET_VERSION );
83
	    String fv = model.getStringProperty(FACET_VERSION_STR);
84
	    this.addDD.setVisible( fv == WebFacetUtils.WEB_25 );
84
	    boolean isWeb25OrGreater = J2EEVersionUtil.convertVersionStringToInt(fv) >= J2EEVersionConstants.WEB_2_5_ID;
85
	    this.addDD.setVisible(isWeb25OrGreater);
85
	}
86
	}
86
	
87
	
87
	@Override
88
	@Override
(-)servlet_ui/org/eclipse/jst/servlet/ui/project/facet/WebProjectFirstPage.java (-1 / +2 lines)
Lines 48-54 Link Here
48
	    
48
	    
49
	    facets.add( primaryFacetVersion );
49
	    facets.add( primaryFacetVersion );
50
	    
50
	    
51
	    if( primaryFacetVersion == WebFacetUtils.WEB_25 )
51
	    if( primaryFacetVersion == WebFacetUtils.WEB_30 || 
52
	    	primaryFacetVersion == WebFacetUtils.WEB_25 )
52
	    {
53
	    {
53
	        facets.add( JavaFacetUtils.JAVA_50 );
54
	        facets.add( JavaFacetUtils.JAVA_50 );
54
	    }
55
	    }
(-)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