Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRosendo Martinez2013-05-01 18:10:42 +0000
committerRoberto Sanchez2013-05-01 18:10:42 +0000
commit5e2b4349a92be2a625eb72237c69cef44e027b49 (patch)
tree8558d48813b449f28e486d0f2da1b0211ad9edf7
parentdc4ed8f558254c661868f9db437d1ee1578e0c12 (diff)
downloadwebtools.javaee-5e2b4349a92be2a625eb72237c69cef44e027b49.tar.gz
webtools.javaee-5e2b4349a92be2a625eb72237c69cef44e027b49.tar.xz
webtools.javaee-5e2b4349a92be2a625eb72237c69cef44e027b49.zip
[400485] Add content types for JavaEE7 namespace
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEVersionConstants.java3
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/contenttype/JEE7ContentDescriber.java76
-rw-r--r--plugins/org.eclipse.jst.jee/plugin.properties10
-rw-r--r--plugins/org.eclipse.jst.jee/plugin.xml134
4 files changed, 219 insertions, 4 deletions
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEVersionConstants.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEVersionConstants.java
index cac65fd33..0d434d45b 100644
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEVersionConstants.java
+++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEVersionConstants.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2007 IBM Corporation and others.
+ * Copyright (c) 2001, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -48,6 +48,7 @@ public interface J2EEVersionConstants {
public int WEB_3_0_ID = 30;
public int WEB_3_1_ID = 31;
public int WEBFRAGMENT_3_0_ID = 30;
+ public int WEBFRAGMENT_3_1_ID = 31;
public int TAGLIB_1_1_ID = 11;
public int TAGLIB_1_2_ID = 12;
public int TAGLIB_2_0_ID = 20;
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/contenttype/JEE7ContentDescriber.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/contenttype/JEE7ContentDescriber.java
new file mode 100644
index 000000000..c13903653
--- /dev/null
+++ b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/contenttype/JEE7ContentDescriber.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2013 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.jee.contenttype;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.content.IContentDescriber;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.jst.jee.util.internal.JavaEEQuickPeek;
+
+/**
+ * A content describer for detecting a j2ee module
+ */
+public final class JEE7ContentDescriber implements IContentDescriber {
+ public JEE7ContentDescriber() {
+ super();
+ }
+
+ public final static QualifiedName JEEVERSION = new QualifiedName("jee-version", "7.0"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ public int describe(InputStream contents, IContentDescription description) throws IOException {
+
+ JavaEEQuickPeek quickPeek = new JavaEEQuickPeek(contents);
+ switch (quickPeek.getType()) {
+ case JavaEEQuickPeek.APPLICATION_CLIENT_TYPE:
+ case JavaEEQuickPeek.APPLICATION_TYPE:
+ switch (quickPeek.getVersion()) {
+ case JavaEEQuickPeek.JEE_7_0_ID:
+ return VALID;
+ }
+ return INVALID;
+ case JavaEEQuickPeek.EJB_TYPE:
+ switch (quickPeek.getVersion()) {
+ case JavaEEQuickPeek.EJB_3_2_ID:
+ return VALID;
+ }
+ return INVALID;
+ case JavaEEQuickPeek.WEB_TYPE:
+ switch (quickPeek.getVersion()) {
+ case JavaEEQuickPeek.WEB_3_1_ID:
+ return VALID;
+ }
+ return INVALID;
+ case JavaEEQuickPeek.WEBFRAGMENT_TYPE:
+ switch (quickPeek.getVersion()) {
+ case JavaEEQuickPeek.WEBFRAGMENT_3_1_ID:
+ return VALID;
+ }
+ return INVALID;
+ case JavaEEQuickPeek.CONNECTOR_TYPE:
+ switch (quickPeek.getVersion()) {
+ case JavaEEQuickPeek.JCA_1_7_ID:
+ return VALID;
+ }
+ return INVALID;
+ }
+
+ return INVALID;
+ }
+
+ public QualifiedName[] getSupportedOptions() {
+
+ return new QualifiedName[] { JEEVERSION };
+ }
+
+}
diff --git a/plugins/org.eclipse.jst.jee/plugin.properties b/plugins/org.eclipse.jst.jee/plugin.properties
index ad17edf82..79b405e76 100644
--- a/plugins/org.eclipse.jst.jee/plugin.properties
+++ b/plugins/org.eclipse.jst.jee/plugin.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
+# Copyright (c) 2005, 2013 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -20,4 +20,10 @@ ee6ejbContentType=Java EE 6 EJB Content
ee6webContentType=Java EE 6 Web Content
ee6webfragmentContentType=Java EE 6 Web Fragment Content
ee6earContentType=Java EE 6 EAR Content
-ee6appclientContentType=Java EE 6 Application Client Content \ No newline at end of file
+ee6appclientContentType=Java EE 6 Application Client Content
+ee7connectorContentType=Java EE 7 Connector Content
+ee7ejbContentType=Java EE 7 EJB Content
+ee7webContentType=Java EE 7 Web Content
+ee7webfragmentContentType=Java EE 7 Web Fragment Content
+ee7earContentType=Java EE 7 EAR Content
+ee7appclientContentType=Java EE 7 Application Client Content
diff --git a/plugins/org.eclipse.jst.jee/plugin.xml b/plugins/org.eclipse.jst.jee/plugin.xml
index 346332565..53d8aa9be 100644
--- a/plugins/org.eclipse.jst.jee/plugin.xml
+++ b/plugins/org.eclipse.jst.jee/plugin.xml
@@ -85,7 +85,55 @@
<contentTypeBinding
contentTypeId="org.eclipse.jst.jee.ee6webfragmentDD">
</contentTypeBinding>
- </resourceFactory>
+ </resourceFactory>
+ <resourceFactory
+ class="org.eclipse.jst.javaee.jca.internal.util.JcaResourceFactoryImpl"
+ isDefault="false"
+ shortSegment="ra.xml">
+ <contentTypeBinding
+ contentTypeId="org.eclipse.jst.jee.ee7connectorDD">
+ </contentTypeBinding>
+ </resourceFactory>
+ <resourceFactory
+ class="org.eclipse.jst.javaee.web.internal.util.WebResourceFactoryImpl"
+ isDefault="false"
+ shortSegment="web.xml">
+ <contentTypeBinding
+ contentTypeId="org.eclipse.jst.jee.ee7webDD">
+ </contentTypeBinding>
+ </resourceFactory>
+ <resourceFactory
+ class="org.eclipse.jst.javaee.ejb.internal.util.EjbResourceFactoryImpl"
+ isDefault="false"
+ shortSegment="ejb-jar.xml">
+ <contentTypeBinding
+ contentTypeId="org.eclipse.jst.jee.ee7ejbDD">
+ </contentTypeBinding>
+ </resourceFactory>
+ <resourceFactory
+ class="org.eclipse.jst.javaee.applicationclient.internal.util.ApplicationclientResourceFactoryImpl"
+ isDefault="false"
+ shortSegment="application-client.xml">
+ <contentTypeBinding
+ contentTypeId="org.eclipse.jst.jee.ee7appclientDD">
+ </contentTypeBinding>
+ </resourceFactory>
+ <resourceFactory
+ class="org.eclipse.jst.javaee.application.internal.util.ApplicationResourceFactoryImpl"
+ isDefault="false"
+ shortSegment="application.xml">
+ <contentTypeBinding
+ contentTypeId="org.eclipse.jst.jee.ee7earDD">
+ </contentTypeBinding>
+ </resourceFactory>
+ <resourceFactory
+ class="org.eclipse.jst.javaee.webfragment.internal.util.WebfragmentResourceFactoryImpl"
+ isDefault="false"
+ shortSegment="web-fragment.xml">
+ <contentTypeBinding
+ contentTypeId="org.eclipse.jst.jee.ee7webfragmentDD">
+ </contentTypeBinding>
+ </resourceFactory>
</extension>
<extension
@@ -334,6 +382,90 @@
</extension>
<extension
+ point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ file-names="ejb-jar.xml"
+ id="ee7ejbDD"
+ base-type="org.eclipse.core.runtime.xml"
+ name="%ee7ejbContentType"
+ priority="high">
+ <describer
+ class="org.eclipse.jst.jee.contenttype.JEE7ContentDescriber">
+ </describer>
+ </content-type>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ file-names="web.xml"
+ id="ee7webDD"
+ base-type="org.eclipse.core.runtime.xml"
+ name="%ee7webContentType"
+ priority="high">
+ <describer
+ class="org.eclipse.jst.jee.contenttype.JEE7ContentDescriber">
+ </describer>
+ </content-type>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ file-names="web-fragment.xml"
+ id="ee7webfragmentDD"
+ base-type="org.eclipse.core.runtime.xml"
+ name="%ee7webfragmentContentType"
+ priority="high">
+ <describer
+ class="org.eclipse.jst.jee.contenttype.JEE7ContentDescriber">
+ </describer>
+ </content-type>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ file-names="application.xml"
+ id="ee7earDD"
+ base-type="org.eclipse.core.runtime.xml"
+ name="%ee7earContentType"
+ priority="high">
+ <describer
+ class="org.eclipse.jst.jee.contenttype.JEE7ContentDescriber">
+ </describer>
+ </content-type>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ file-names="application-client.xml"
+ id="ee7appclientDD"
+ base-type="org.eclipse.core.runtime.xml"
+ name="%ee7appclientContentType"
+ priority="high">
+ <describer
+ class="org.eclipse.jst.jee.contenttype.JEE7ContentDescriber">
+ </describer>
+ </content-type>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ file-names="ra.xml"
+ id="ee7connectorDD"
+ base-type="org.eclipse.core.runtime.xml"
+ name="%ee7connectorContentType"
+ priority="high">
+ <describer
+ class="org.eclipse.jst.jee.contenttype.JEE7ContentDescriber">
+ </describer>
+ </content-type>
+ </extension>
+
+ <extension
point="org.eclipse.jst.j2ee.J2EEModelProvider">
<provider>
<modelProvider factoryClass="org.eclipse.jst.jee.model.internal.EAR5ModelProviderFactory"/>

Back to the top