[565498] (partial) New Servlet/Filter/Listener wizards should account for Jakarta package names
diff --git a/plugins/org.eclipse.jst.j2ee.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.j2ee.core/META-INF/MANIFEST.MF index 13f392d..768c385 100644 --- a/plugins/org.eclipse.jst.j2ee.core/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.jst.j2ee.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name.0 Bundle-SymbolicName: org.eclipse.jst.j2ee.core; singleton:=true -Bundle-Version: 1.4.100.qualifier +Bundle-Version: 1.4.200.qualifier Bundle-Activator: org.eclipse.jst.j2ee.core.internal.plugin.J2EECorePlugin Bundle-Vendor: %Bundle-Vendor.0 Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/util/J2EEFileUtil.java b/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/util/J2EEFileUtil.java index 756149b..a313a88 100644 --- a/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/util/J2EEFileUtil.java +++ b/plugins/org.eclipse.jst.j2ee.core/commonArchive/org/eclipse/jst/j2ee/commonarchivecore/internal/util/J2EEFileUtil.java
@@ -289,7 +289,7 @@ int version = -1; if (isEARFile(fileURI)) { if (null == versionAttr) { - version = J2EEVersionConstants.J2EE_1_4_ID; + version = J2EEVersionConstants.JEE_8_0_ID; } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_2_TEXT)) { version = J2EEVersionConstants.J2EE_1_2_ID; } else if (versionAttr.equals(J2EEVersionConstants.VERSION_1_3_TEXT)) { @@ -352,11 +352,11 @@ version = J2EEVersionConstants.WEB_3_0_ID; } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_5_TEXT)) { version = J2EEVersionConstants.WEB_2_5_ID; - } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_3_TEXT)) { - version = J2EEVersionConstants.WEB_2_4_ID; - } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_2_TEXT)) { - version = J2EEVersionConstants.WEB_2_3_ID; } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_4_TEXT)) { + version = J2EEVersionConstants.WEB_2_4_ID; + } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_3_TEXT)) { + version = J2EEVersionConstants.WEB_2_3_ID; + } else if (versionAttr.equals(J2EEVersionConstants.VERSION_2_2_TEXT)) { version = J2EEVersionConstants.WEB_2_2_ID; } } else if (isRARFile(fileURI)) {
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 d75b345..4a9a3b4 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
@@ -60,6 +60,7 @@ public int JSP_1_1_ID = 11; public int JSP_1_2_ID = 12; public int JSP_2_0_ID = 20; + public int JSP_3_0_ID = 30; public int SERVLET_2_2 = 22; public int SERVLET_2_3 = 23; public int SERVLET_2_4 = 24;
diff --git a/plugins/org.eclipse.jst.j2ee.core/pom.xml b/plugins/org.eclipse.jst.j2ee.core/pom.xml index d9e0953..873558d 100644 --- a/plugins/org.eclipse.jst.j2ee.core/pom.xml +++ b/plugins/org.eclipse.jst.j2ee.core/pom.xml
@@ -21,6 +21,6 @@ <groupId>org.eclipse.webtools.javaee</groupId> <artifactId>org.eclipse.jst.j2ee.core</artifactId> - <version>1.4.100-SNAPSHOT</version> + <version>1.4.200-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project>
diff --git a/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/META-INF/MANIFEST.MF index bb99d90..61383d4 100644 --- a/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name.0 Bundle-SymbolicName: org.eclipse.jst.j2ee.ejb.annotations.xdoclet; singleton:=true -Bundle-Version: 1.2.300.qualifier +Bundle-Version: 1.2.400.qualifier Bundle-ClassPath: . Bundle-Activator: org.eclipse.jst.j2ee.ejb.annotations.internal.xdoclet.XDocletAnnotationPlugin Bundle-Vendor: %Bundle-Vendor.0 @@ -26,7 +26,7 @@ org.eclipse.jst.j2ee;bundle-version="[1.1.0,1.3.0)", org.eclipse.jst.j2ee.ejb;bundle-version="[1.1.0,1.2.0)", org.eclipse.wst.common.emfworkbench.integration;bundle-version="[1.1.0,2.0.0)", - org.eclipse.jst.j2ee.web;bundle-version="[1.1.0,1.2.0)", + org.eclipse.jst.j2ee.web;bundle-version="[1.2.0,2.0.0)", org.eclipse.wst.common.modulecore;bundle-version="[1.1.0,2.0.0)", org.eclipse.jem.workbench;bundle-version="[2.0.0,3.0.0)", org.eclipse.jem.util;bundle-version="[2.0.0,3.0.0)",
diff --git a/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/pom.xml b/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/pom.xml index 25389d1..fa01b17 100644 --- a/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/pom.xml +++ b/plugins/org.eclipse.jst.j2ee.ejb.annotations.xdoclet/pom.xml
@@ -21,6 +21,6 @@ <groupId>org.eclipse.webtools.ejb</groupId> <artifactId>org.eclipse.jst.j2ee.ejb.annotations.xdoclet</artifactId> - <version>1.2.300-SNAPSHOT</version> + <version>1.2.400-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project>
diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.j2ee.navigator.ui/META-INF/MANIFEST.MF index b88865d..2022ac9 100644 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.jst.j2ee.navigator.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Plugin.name Bundle-SymbolicName: org.eclipse.jst.j2ee.navigator.ui; singleton:=true -Bundle-Version: 1.1.800.qualifier +Bundle-Version: 1.1.900.qualifier Bundle-Activator: org.eclipse.jst.j2ee.navigator.internal.plugin.J2EENavigatorPlugin Bundle-Vendor: %Plugin.providerName Bundle-Localization: plugin @@ -17,7 +17,7 @@ org.eclipse.emf.edit;bundle-version="[2.2.0,3.0.0)", org.eclipse.emf.edit.ui;bundle-version="[2.2.0,3.0.0)", org.eclipse.wst.common.emfworkbench.integration;bundle-version="[1.2.0,2.0.0)", - org.eclipse.wst.common.frameworks;bundle-version="[1.2.0,2.0.0)", + org.eclipse.wst.common.frameworks;bundle-version="[1.2.202,2.0.0)", org.eclipse.jdt.ui;bundle-version="[3.2.0,4.0.0)", org.eclipse.jst.j2ee;bundle-version="[1.1.0,1.3.0)", org.eclipse.jface.text;bundle-version="[3.2.0,4.0.0)", @@ -33,7 +33,7 @@ org.eclipse.ui.navigator.resources;bundle-version="[3.2.0,4.0.0)", org.eclipse.wst.common.emf;bundle-version="[1.2.0,2.0.0)", org.eclipse.jst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)", - org.eclipse.jst.j2ee.web;bundle-version="[1.1.0,1.2.0)", + org.eclipse.jst.j2ee.web;bundle-version="[1.2.0,2.0.0)", org.eclipse.jst.j2ee.jca;bundle-version="[1.1.0,1.2.0)", org.eclipse.jst.j2ee.ejb;bundle-version="[1.1.0,1.2.0)", org.eclipse.core.expressions;bundle-version="[3.2.0,4.0.0)",
diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/ModuleIdentifierSerializer.java b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/ModuleIdentifierSerializer.java index 12162c6..cc72989 100644 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/ModuleIdentifierSerializer.java +++ b/plugins/org.eclipse.jst.j2ee.navigator.ui/j2ee-navigator/org/eclipse/jst/j2ee/navigator/internal/dnd/ModuleIdentifierSerializer.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2006 IBM Corporation and others. + * Copyright (c) 2003, 2021 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 @@ -29,7 +29,7 @@ * @see org.eclipse.wst.common.navigator.internal.views.navigator.dnd.ISerializer#toByteArray(java.lang.Object) */ public byte[] toByteArray(Object data) { - IProject project = (IProject) AdaptabilityUtility.getAdapter(data, IProject.class); + IProject project = AdaptabilityUtility.getAdapter(data, IProject.class); if (project != null) return project.getName().getBytes(); return null;
diff --git a/plugins/org.eclipse.jst.j2ee.navigator.ui/pom.xml b/plugins/org.eclipse.jst.j2ee.navigator.ui/pom.xml index 146d7cb..7a1ef7f 100644 --- a/plugins/org.eclipse.jst.j2ee.navigator.ui/pom.xml +++ b/plugins/org.eclipse.jst.j2ee.navigator.ui/pom.xml
@@ -21,6 +21,6 @@ <groupId>org.eclipse.webtools.javaee</groupId> <artifactId>org.eclipse.jst.j2ee.navigator.ui</artifactId> - <version>1.1.800-SNAPSHOT</version> + <version>1.1.900-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project>
diff --git a/plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF index fcded24..69dfb4e 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name.0 Bundle-SymbolicName: org.eclipse.jst.j2ee.ui; singleton:=true -Bundle-Version: 1.1.931.qualifier +Bundle-Version: 1.1.1000.qualifier Bundle-Activator: org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin Bundle-Vendor: %Bundle-Vendor.0 Bundle-Localization: plugin @@ -35,7 +35,7 @@ org.eclipse.jst.j2ee;bundle-version="[1.1.501,1.3.0)", org.eclipse.jst.j2ee.ejb;bundle-version="[1.1.0,1.2.0)", org.eclipse.jst.j2ee.jca;bundle-version="[1.1.0,1.2.0)", - org.eclipse.jst.j2ee.web;bundle-version="[1.1.0,1.2.0)", + org.eclipse.jst.j2ee.web;bundle-version="[1.2.0,2.0.0)", org.eclipse.emf.edit.ui;bundle-version="[2.2.0,3.0.0)", org.eclipse.jdt.ui;bundle-version="[3.2.0,4.0.0)", org.eclipse.wst.validation;bundle-version="[1.2.0,2.0.0)",
diff --git a/plugins/org.eclipse.jst.j2ee.ui/pom.xml b/plugins/org.eclipse.jst.j2ee.ui/pom.xml index a662a4c..175445a 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/pom.xml +++ b/plugins/org.eclipse.jst.j2ee.ui/pom.xml
@@ -21,6 +21,6 @@ <groupId>org.eclipse.webtools.javaee</groupId> <artifactId>org.eclipse.jst.j2ee.ui</artifactId> - <version>1.1.931-SNAPSHOT</version> + <version>1.1.1000-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project>
diff --git a/plugins/org.eclipse.jst.j2ee.web/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.j2ee.web/META-INF/MANIFEST.MF index 08199d8..a520673 100644 --- a/plugins/org.eclipse.jst.j2ee.web/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.jst.j2ee.web/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: Web Plug-in Bundle-SymbolicName: org.eclipse.jst.j2ee.web; singleton:=true -Bundle-Version: 1.1.1100.qualifier +Bundle-Version: 1.2.0.qualifier Bundle-Activator: org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin Bundle-Vendor: Eclipse.org Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.jst.j2ee.web/pom.xml b/plugins/org.eclipse.jst.j2ee.web/pom.xml index 11fce54..4a3a09e 100644 --- a/plugins/org.eclipse.jst.j2ee.web/pom.xml +++ b/plugins/org.eclipse.jst.j2ee.web/pom.xml
@@ -21,6 +21,6 @@ <groupId>org.eclipse.webtools.javaee</groupId> <artifactId>org.eclipse.jst.j2ee.web</artifactId> - <version>1.1.1100-SNAPSHOT</version> + <version>1.2.0-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project>
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateFilterTemplateModel.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateFilterTemplateModel.java index 1203451..0f0ec62 100644 --- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateFilterTemplateModel.java +++ b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateFilterTemplateModel.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 SAP AG and others. + * Copyright (c) 2007, 2021 SAP AG 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
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateListenerTemplateModel.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateListenerTemplateModel.java index 291c9fc..77cd5d4 100644 --- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateListenerTemplateModel.java +++ b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateListenerTemplateModel.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 SAP AG and others. + * Copyright (c) 2007, 2021 SAP AG 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
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateServletTemplateModel.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateServletTemplateModel.java index 0db0466..849e5a8 100644 --- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateServletTemplateModel.java +++ b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateServletTemplateModel.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2008 IBM Corporation and others. + * Copyright (c) 2003, 2021 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 @@ -41,6 +41,16 @@ import static org.eclipse.jst.j2ee.web.IServletConstants.GET_SERVLET_CONFIG_SIGNATURE; import static org.eclipse.jst.j2ee.web.IServletConstants.GET_SERVLET_INFO_SIGNATURE; import static org.eclipse.jst.j2ee.web.IServletConstants.HTTP_SERVICE_SIGNATURE; +import static org.eclipse.jst.j2ee.web.IServletConstants.JAKARTA_DESTROY_SIGNATURE; +import static org.eclipse.jst.j2ee.web.IServletConstants.JAKARTA_DO_DELETE_SIGNATURE; +import static org.eclipse.jst.j2ee.web.IServletConstants.JAKARTA_DO_GET_SIGNATURE; +import static org.eclipse.jst.j2ee.web.IServletConstants.JAKARTA_DO_HEAD_SIGNATURE; +import static org.eclipse.jst.j2ee.web.IServletConstants.JAKARTA_DO_POST_SIGNATURE; +import static org.eclipse.jst.j2ee.web.IServletConstants.JAKARTA_DO_PUT_SIGNATURE; +import static org.eclipse.jst.j2ee.web.IServletConstants.JAKARTA_DO_TRACE_SIGNATURE; +import static org.eclipse.jst.j2ee.web.IServletConstants.JAKARTA_GET_SERVLET_CONFIG_SIGNATURE; +import static org.eclipse.jst.j2ee.web.IServletConstants.JAKARTA_GET_SERVLET_INFO_SIGNATURE; +import static org.eclipse.jst.j2ee.web.IServletConstants.JAKARTA_HTTP_SERVICE_SIGNATURE; import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_DESTROY; import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_DO_DELETE; import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_DO_GET; @@ -65,6 +75,16 @@ import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_WEB_SERVLET; import static org.eclipse.jst.j2ee.web.IServletConstants.SERVICE_SIGNATURE; import static org.eclipse.jst.j2ee.web.IServletConstants.SERVLET_INIT_SIGNATURE; +//import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_ANNOTATION_INIT_PARAM; +//import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_HTTP_SERVLET_REQUEST; +//import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_HTTP_SERVLET_RESPONSE; +//import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_SERVLET_CONFIG; +//import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_SERVLET_EXCEPTION; +//import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_SERVLET_REQUEST; +//import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_SERVLET_RESPONSE; +//import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_WEB_SERVLET; +import static org.eclipse.jst.j2ee.web.IServletConstants.JAKARTA_SERVICE_SIGNATURE; +import static org.eclipse.jst.j2ee.web.IServletConstants.JAKARTA_SERVLET_INIT_SIGNATURE; import java.util.Collection; import java.util.Hashtable; @@ -90,6 +110,7 @@ @Override public Collection<String> getImports() { + // TODO: vary based on datamodel EE version Collection<String> collection = super.getImports(); if (shouldGenInit()) { @@ -128,9 +149,6 @@ if (getInitParams()!= null && getInitParams().size()>0){ collection.add(QUALIFIED_ANNOTATION_INIT_PARAM); } - - - } return collection; @@ -302,6 +320,21 @@ (METHOD_DO_TRACE.equals(method.getName()) && DO_TRACE_SIGNATURE.equals(method.getSignature()))) { iterator.remove(); } + if ((METHOD_INIT.equals(method.getName()) && JAKARTA_SERVLET_INIT_SIGNATURE.equals(method.getSignature())) || + (METHOD_DESTROY.equals(method.getName()) && JAKARTA_DESTROY_SIGNATURE.equals(method.getSignature())) || + (METHOD_GET_SERVLET_CONFIG.equals(method.getName()) && JAKARTA_GET_SERVLET_CONFIG_SIGNATURE.equals(method.getSignature())) || + (METHOD_GET_SERVLET_INFO.equals(method.getName()) && JAKARTA_GET_SERVLET_INFO_SIGNATURE.equals(method.getSignature())) || + (METHOD_SERVICE.equals(method.getName()) && JAKARTA_SERVICE_SIGNATURE.equals(method.getSignature())) || + (METHOD_SERVICE.equals(method.getName()) && JAKARTA_HTTP_SERVICE_SIGNATURE.equals(method.getSignature())) || + (METHOD_DO_GET.equals(method.getName()) && JAKARTA_DO_GET_SIGNATURE.equals(method.getSignature())) || + (METHOD_DO_POST.equals(method.getName()) && JAKARTA_DO_POST_SIGNATURE.equals(method.getSignature())) || + (METHOD_DO_PUT.equals(method.getName()) && JAKARTA_DO_PUT_SIGNATURE.equals(method.getSignature())) || + (METHOD_DO_DELETE.equals(method.getName()) && JAKARTA_DO_DELETE_SIGNATURE.equals(method.getSignature())) || + (METHOD_DO_HEAD.equals(method.getName()) && JAKARTA_DO_HEAD_SIGNATURE.equals(method.getSignature())) || + (METHOD_DO_OPTIONS.equals(method.getName()) && METHOD_DO_OPTIONS.equals(method.getSignature())) || + (METHOD_DO_TRACE.equals(method.getName()) && JAKARTA_DO_TRACE_SIGNATURE.equals(method.getSignature()))) { + iterator.remove(); + } } return unimplementedMethods;
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateWebClassTemplateModel.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateWebClassTemplateModel.java index 798cfe4..b66c4ef 100644 --- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateWebClassTemplateModel.java +++ b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateWebClassTemplateModel.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 SAP AG and others. + * Copyright (c) 2007, 2021 SAP AG 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 @@ -29,6 +29,7 @@ public static final String SERVLET_3 = "3.0"; //$NON-NLS-1$ public static final String SERVLET_3_1 = "3.1"; //$NON-NLS-1$ public static final String SERVLET_4_0 = "4.0"; //$NON-NLS-1$ + public static final String SERVLET_5_0 = "5.0"; //$NON-NLS-1$ public CreateWebClassTemplateModel(IDataModel dataModel) { super(dataModel);
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/FilterSupertypesValidator.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/FilterSupertypesValidator.java index 6850d31..a9f9d17 100644 --- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/FilterSupertypesValidator.java +++ b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/FilterSupertypesValidator.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 SAP AG and others. + * Copyright (c) 2007, 2021 SAP AG 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 @@ -11,21 +11,24 @@ package org.eclipse.jst.j2ee.internal.web.operations; import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_FILTER; +import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_FILTER; import org.eclipse.wst.common.frameworks.datamodel.IDataModel; public class FilterSupertypesValidator extends AbstractSupertypesValidator { - public static boolean isFilterSuperclass(IDataModel dataModel) { if (hasSuperInterface(dataModel, getSuperclass(dataModel), QUALIFIED_FILTER)) return true; - + if (hasSuperInterface(dataModel, getSuperclass(dataModel), QUALIFIED_JAKARTA_FILTER)) + return true; + for (Object iface : getInterfaces(dataModel)) { if (hasSuperInterface(dataModel, (String) iface, QUALIFIED_FILTER)) return true; + if (hasSuperInterface(dataModel, (String) iface, QUALIFIED_JAKARTA_FILTER)) + return true; } - + return false; } - }
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewFilterClassDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewFilterClassDataModelProvider.java index f92875f..21ef143 100644 --- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewFilterClassDataModelProvider.java +++ b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewFilterClassDataModelProvider.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 SAP AG and others. + * Copyright (c) 2007, 2021 SAP AG 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 @@ -22,6 +22,7 @@ import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.DISPLAY_NAME; import static org.eclipse.jst.j2ee.internal.web.operations.INewFilterClassDataModelProperties.ASYNC_SUPPORT; import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_FILTER; +import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_FILTER; import java.util.ArrayList; import java.util.List; @@ -29,14 +30,15 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.jst.j2ee.internal.common.operations.NewJavaClassDataModelProvider; +import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin; import org.eclipse.jst.j2ee.model.IModelProvider; import org.eclipse.jst.j2ee.model.ModelProviderManager; +import org.eclipse.jst.j2ee.web.IServletConstants; import org.eclipse.jst.j2ee.web.validation.UrlPattern; import org.eclipse.osgi.util.NLS; import org.eclipse.wst.common.frameworks.datamodel.IDataModel; import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation; import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider; -import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin; public class NewFilterClassDataModelProvider extends NewWebClassDataModelProvider { @@ -46,6 +48,7 @@ * interfaces */ private final static String[] FILTER_INTERFACES = { QUALIFIED_FILTER }; + private final static String[] JAKARTA_FILTER_INTERFACES = { QUALIFIED_JAKARTA_FILTER }; @Override public boolean isPropertyEnabled(String propertyName) { @@ -119,8 +122,18 @@ return Boolean.TRUE; else if (propertyName.equals(FILTER_MAPPINGS)) return getDefaultFilterMapping(); - else if (propertyName.equals(INTERFACES)) + else if (propertyName.equals(INTERFACES)) { + if (projectUsesJakartaPackages()) { + return getJakartaFilterInterfaces(); + } return getFilterInterfaces(); + } + else if (propertyName.equals(SUPERCLASS)) { + if (projectUsesJakartaPackages()) { + return IServletConstants.QUALIFIED_JAKARTA_HTTP_FILTER; + } + return IServletConstants.QUALIFIED_HTTP_FILTER; + } // Otherwise check super for default value for property return super.getDefaultProperty(propertyName); @@ -158,7 +171,7 @@ public IStatus validate(String propertyName) { // If our default is the superclass, we know it is ok if (propertyName.equals(SUPERCLASS) && "".equals(getStringProperty(propertyName))) //$NON-NLS-1$ - return WTPCommonPlugin.OK_STATUS; + return WebPlugin.OK_STATUS; // Validate init params if (propertyName.equals(INIT_PARAM)) return validateInitParamList((List) getProperty(propertyName)); @@ -189,11 +202,11 @@ boolean dup = hasDuplicatesInStringArrayList(prop); if (dup) { String msg = WebMessages.ERR_DUPLICATED_INIT_PARAMETER; - return WTPCommonPlugin.createErrorStatus(msg); + return WebPlugin.createStatus(IStatus.ERROR, msg); } } // Return OK - return WTPCommonPlugin.OK_STATUS; + return WebPlugin.OK_STATUS; } /** @@ -212,20 +225,20 @@ boolean dup = hasDuplicatesInFilterMappingItemList(prop); if (dup) { String msg = WebMessages.ERR_DUPLICATED_URL_MAPPING; - return WTPCommonPlugin.createErrorStatus(msg); + return WebPlugin.createStatus(IStatus.ERROR, msg); } String isValidValue = validateValue(prop); if (isValidValue != null && isValidValue.length() > 0) { NLS.bind(WebMessages.ERR_URL_PATTERN_INVALID, isValidValue); String resourceString = WebMessages.getResourceString(WebMessages.ERR_URL_PATTERN_INVALID, new String[]{isValidValue}); - return WTPCommonPlugin.createErrorStatus(resourceString); + return WebPlugin.createStatus(IStatus.ERROR, resourceString); } } else { String msg = WebMessages.ERR_FILTER_MAPPING_EMPTY; - return WTPCommonPlugin.createErrorStatus(msg); + return WebPlugin.createStatus(IStatus.ERROR, msg); } // Return OK - return WTPCommonPlugin.OK_STATUS; + return WebPlugin.OK_STATUS; } private boolean hasDuplicatesInFilterMappingItemList(List<IFilterMappingItem> input) { @@ -276,17 +289,17 @@ /** * This method will return the list of filter interfaces to be implemented - * for the new servlet java class. It will intialize the list using lazy + * for the new filter java class. It will initialize the list using lazy * initialization to the minimum interfaces required by the data model * FILTER_INTERFACES. This method will not return null. * * @see #FILTER_INTERFACES * - * @return List of servlet interfaces to be implemented + * @return List of filter interfaces to be implemented */ private List getFilterInterfaces() { if (interfaceList == null) { - interfaceList = new ArrayList(); + interfaceList = new ArrayList<String>(FILTER_INTERFACES.length); // Add minimum required list of servlet interfaces to be implemented for (int i = 0; i < FILTER_INTERFACES.length; i++) { interfaceList.add(FILTER_INTERFACES[i]); @@ -297,6 +310,28 @@ } /** + * This method will return the list of filter interfaces to be implemented + * for the new filter java class. It will initialize the list using lazy + * initialization to the minimum interfaces required by the data model + * FILTER_INTERFACES. This method will not return null. + * + * @see #FILTER_INTERFACES + * + * @return List of filter interfaces to be implemented + */ + private List<String> getJakartaFilterInterfaces() { + if (jakartaInterfaceList == null) { + jakartaInterfaceList = new ArrayList<String>(JAKARTA_FILTER_INTERFACES.length); + // Add minimum required list of servlet interfaces to be implemented + for (int i = 0; i < JAKARTA_FILTER_INTERFACES.length; i++) { + jakartaInterfaceList.add(JAKARTA_FILTER_INTERFACES[i]); + } + } + // Return interface list + return interfaceList; + } + + /** * This method is intended for internal use only. This will validate whether * the display name selected is a valid display name for the filter in the * specified web application. It will make sure the name is not empty and @@ -312,10 +347,10 @@ // Ensure the filter display name is not null or empty if (prop == null || prop.trim().length() == 0) { String msg = WebMessages.ERR_DISPLAY_NAME_EMPTY; - return WTPCommonPlugin.createErrorStatus(msg); + return WebPlugin.createStatus(IStatus.ERROR, msg); } if (getTargetProject() == null || getTargetComponent() == null) - return WTPCommonPlugin.OK_STATUS; + return WebPlugin.OK_STATUS; IModelProvider provider = ModelProviderManager.getModelProvider(getTargetProject()); Object mObj = provider.getModelObject(); @@ -335,7 +370,7 @@ // If the filter name already exists, throw an error if (exists) { String msg = WebMessages.getResourceString(WebMessages.ERR_FILTER_NAME_EXIST, new String[]{prop}); - return WTPCommonPlugin.createErrorStatus(msg); + return WebPlugin.createStatus(IStatus.ERROR, msg); } } else if (mObj instanceof org.eclipse.jst.javaee.web.WebApp) { org.eclipse.jst.javaee.web.WebApp webApp = (org.eclipse.jst.javaee.web.WebApp) mObj; @@ -353,12 +388,12 @@ // If the filter name already exists, throw an error if (exists) { String msg = WebMessages.getResourceString(WebMessages.ERR_FILTER_NAME_EXIST, new String[] {prop}); - return WTPCommonPlugin.createErrorStatus(msg); + return WebPlugin.createStatus(IStatus.ERROR, msg); } } // Otherwise, return OK - return WTPCommonPlugin.OK_STATUS; + return WebPlugin.OK_STATUS; } @Override
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewListenerClassDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewListenerClassDataModelProvider.java index 59ca4b8..2657046 100644 --- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewListenerClassDataModelProvider.java +++ b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewListenerClassDataModelProvider.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2012 SAP AG and others. + * Copyright (c) 2007, 2021 SAP AG 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 @@ -12,6 +12,7 @@ import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.INTERFACES; +import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.USE_EXISTING_CLASS; import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SESSION_ACTIVATION_LISTENER; import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SESSION_ATTRIBUTE_LISTENER; import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SESSION_BINDING_LISTENER; @@ -19,18 +20,27 @@ import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SESSION_LISTENER; import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_CONTEXT_ATTRIBUTE_LISTENER; import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_CONTEXT_LISTENER; +import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_REQUEST_ASYNC_EVENT_LISTENER; import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_REQUEST_ATTRIBUTE_LISTENER; import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_REQUEST_LISTENER; -import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_REQUEST_ASYNC_EVENT_LISTENER; -import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.USE_EXISTING_CLASS; +import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_HTTP_SESSION_ACTIVATION_LISTENER; +import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_HTTP_SESSION_ATTRIBUTE_LISTENER; +import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_HTTP_SESSION_BINDING_LISTENER; +import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_HTTP_SESSION_ID_LISTENER; +import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_HTTP_SESSION_LISTENER; +import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_SERVLET_CONTEXT_ATTRIBUTE_LISTENER; +import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_SERVLET_CONTEXT_LISTENER; +import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_SERVLET_REQUEST_ASYNC_EVENT_LISTENER; +import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_SERVLET_REQUEST_ATTRIBUTE_LISTENER; +import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_SERVLET_REQUEST_LISTENER; import java.util.List; import org.eclipse.core.runtime.IStatus; import org.eclipse.jst.j2ee.internal.common.operations.NewJavaClassDataModelProvider; +import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin; import org.eclipse.wst.common.frameworks.datamodel.IDataModel; import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation; -import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin; /** * The NewListenerClassDataModelProvider is a subclass of @@ -68,17 +78,30 @@ NewWebClassDataModelProvider { public static final String[] LISTENER_INTERFACES = { - QUALIFIED_SERVLET_CONTEXT_LISTENER, - QUALIFIED_SERVLET_CONTEXT_ATTRIBUTE_LISTENER, - QUALIFIED_HTTP_SESSION_LISTENER, - QUALIFIED_HTTP_SESSION_ATTRIBUTE_LISTENER, - QUALIFIED_HTTP_SESSION_ACTIVATION_LISTENER, - QUALIFIED_HTTP_SESSION_BINDING_LISTENER, - QUALIFIED_HTTP_SESSION_ID_LISTENER, - QUALIFIED_SERVLET_REQUEST_LISTENER, - QUALIFIED_SERVLET_REQUEST_ATTRIBUTE_LISTENER, - QUALIFIED_SERVLET_REQUEST_ASYNC_EVENT_LISTENER - }; + QUALIFIED_SERVLET_CONTEXT_LISTENER, + QUALIFIED_SERVLET_CONTEXT_ATTRIBUTE_LISTENER, + QUALIFIED_HTTP_SESSION_LISTENER, + QUALIFIED_HTTP_SESSION_ATTRIBUTE_LISTENER, + QUALIFIED_HTTP_SESSION_ACTIVATION_LISTENER, + QUALIFIED_HTTP_SESSION_BINDING_LISTENER, + QUALIFIED_HTTP_SESSION_ID_LISTENER, + QUALIFIED_SERVLET_REQUEST_LISTENER, + QUALIFIED_SERVLET_REQUEST_ATTRIBUTE_LISTENER, + QUALIFIED_SERVLET_REQUEST_ASYNC_EVENT_LISTENER + }; + + public static final String[] JAKARTA_LISTENER_INTERFACES = { + QUALIFIED_JAKARTA_SERVLET_CONTEXT_LISTENER, + QUALIFIED_JAKARTA_SERVLET_CONTEXT_ATTRIBUTE_LISTENER, + QUALIFIED_JAKARTA_HTTP_SESSION_LISTENER, + QUALIFIED_JAKARTA_HTTP_SESSION_ATTRIBUTE_LISTENER, + QUALIFIED_JAKARTA_HTTP_SESSION_ACTIVATION_LISTENER, + QUALIFIED_JAKARTA_HTTP_SESSION_BINDING_LISTENER, + QUALIFIED_JAKARTA_HTTP_SESSION_ID_LISTENER, + QUALIFIED_JAKARTA_SERVLET_REQUEST_LISTENER, + QUALIFIED_JAKARTA_SERVLET_REQUEST_ATTRIBUTE_LISTENER, + QUALIFIED_JAKARTA_SERVLET_REQUEST_ASYNC_EVENT_LISTENER + }; /** * Subclasses may extend this method to provide their own default operation @@ -132,13 +155,19 @@ break; } } + for (String iface : JAKARTA_LISTENER_INTERFACES) { + if (interfaces.contains(iface)) { + atLeastOneSelected = true; + break; + } + } } if (atLeastOneSelected) { - return WTPCommonPlugin.OK_STATUS; + return WebPlugin.OK_STATUS; } String msg = WebMessages.ERR_NO_LISTENER_SELECTED; - return WTPCommonPlugin.createErrorStatus(msg); + return WebPlugin.createStatus(IStatus.ERROR, msg); } }
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewServletClassDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewServletClassDataModelProvider.java index 8d8f50c..b5dd573 100644 --- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewServletClassDataModelProvider.java +++ b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewServletClassDataModelProvider.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2008 IBM Corporation and others. + * Copyright (c) 2003, 2021 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 @@ -16,6 +16,7 @@ import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.CLASS_NAME; import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.INTERFACES; import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.SUPERCLASS; +import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.ASYNC_SUPPORT; import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DESTROY; import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DO_DELETE; import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DO_GET; @@ -34,7 +35,6 @@ import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.TEMPLATE_FILE; import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.TO_STRING; import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.URL_MAPPINGS; -import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.ASYNC_SUPPORT; import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.DISPLAY_NAME; import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SERVLET; import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET; @@ -48,6 +48,7 @@ import org.eclipse.jst.j2ee.commonarchivecore.internal.util.J2EEFileUtil; import org.eclipse.jst.j2ee.model.IModelProvider; import org.eclipse.jst.j2ee.model.ModelProviderManager; +import org.eclipse.jst.j2ee.web.IServletConstants; import org.eclipse.jst.j2ee.web.validation.UrlPattern; import org.eclipse.osgi.util.NLS; import org.eclipse.wst.common.frameworks.datamodel.IDataModel; @@ -238,8 +239,12 @@ return getDefaultUrlMapping(); else if (propertyName.equals(INTERFACES)) return getServletInterfaces(); - else if (propertyName.equals(SUPERCLASS)) + else if (propertyName.equals(SUPERCLASS)) { + if (projectUsesJakartaPackages()) { + return IServletConstants.QUALIFIED_JAKARTA_HTTP_SERVLET; + } return SERVLET_SUPERCLASS; + } else if (propertyName.equals(TEMPLATE_FILE)) return ANNOTATED_TEMPLATE_DEFAULT; else if (propertyName.equals(NON_ANNOTATED_TEMPLATE_FILE))
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewWebClassDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewWebClassDataModelProvider.java index 3d10a8a..cb17cc6 100644 --- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewWebClassDataModelProvider.java +++ b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewWebClassDataModelProvider.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2012 SAP AG and others. + * Copyright (c) 2007, 2021 SAP AG 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 @@ -31,6 +31,8 @@ import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; +import org.eclipse.jdt.core.IJavaProject; +import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.Signature; import org.eclipse.jem.util.emf.workbench.ProjectUtilities; import org.eclipse.jst.j2ee.application.internal.operations.IAnnotationsDataModel; @@ -40,6 +42,7 @@ import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities; import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin; import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities; +import org.eclipse.jst.j2ee.web.IServletConstants; import org.eclipse.jst.j2ee.web.project.facet.WebFacetUtils; import org.eclipse.wst.common.componentcore.internal.util.FacetedProjectUtilities; import org.eclipse.wst.common.frameworks.datamodel.IDataModel; @@ -90,7 +93,8 @@ * The cache of all the interfaces the web artifact java class will * implement. */ - protected List interfaceList; + protected List<String> interfaceList; + protected List<String> jakartaInterfaceList; private String classNameCache = ""; //$NON-NLS-1$ private String existingClassNameCache = ""; //$NON-NLS-1$ @@ -198,6 +202,39 @@ return false; } + + /** + * @return <code>True</code> when generated classes should refer to types in the <code>jakarta.*</code> + * packages rather than the older <code>javax.*</code> packages. + */ + protected boolean projectUsesJakartaPackages() { + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(getStringProperty(PROJECT_NAME)); + if (project != null && project.isAccessible()) { + // long term, the default when otehrwise not determinable should be the newer one + try { + IJavaProject javaProject = JavaCore.create(project); + if (javaProject != null && javaProject.exists()) { + if (javaProject.findType(IServletConstants.QUALIFIED_JAKARTA_HTTP_SERVLET) != null) { + return true; + } + } + } + catch (CoreException e) { + WTPCommonPlugin.logError(e); + } + try { + // check to see if it is Jakarta Servlet 5 or newer + if (FacetedProjectFramework.hasProjectFacet(project, WebFacetUtils.WEB_FACET.getId(), WebFacetUtils.WEB_50.getVersionString())) { + return true; + } + } + catch (CoreException e) { + WebPlugin.log(e); + } + } + return false; + } + @SuppressWarnings("restriction") public String getJavaEEVersion() { IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(getStringProperty(PROJECT_NAME));
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/ServletSupertypesValidator.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/ServletSupertypesValidator.java index 727d27e..6a0e7db 100644 --- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/ServletSupertypesValidator.java +++ b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/ServletSupertypesValidator.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 SAP AG and others. + * Copyright (c) 2007, 2021 SAP AG 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 @@ -11,30 +11,48 @@ package org.eclipse.jst.j2ee.internal.web.operations; import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_GENERIC_SERVLET; +import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_GENERIC_SERVLET; import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SERVLET; +import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_HTTP_SERVLET; import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET; +import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_JAKARTA_SERVLET; import org.eclipse.wst.common.frameworks.datamodel.IDataModel; public class ServletSupertypesValidator extends AbstractSupertypesValidator { public static boolean isHttpServletSuperclass(IDataModel dataModel) { + if (QUALIFIED_JAKARTA_HTTP_SERVLET.equals(getSuperclass(dataModel))) + return true; + if (QUALIFIED_HTTP_SERVLET.equals(getSuperclass(dataModel))) return true; - + + if (hasSuperclass(dataModel, getSuperclass(dataModel), QUALIFIED_JAKARTA_HTTP_SERVLET)) + return true; + if (hasSuperclass(dataModel, getSuperclass(dataModel), QUALIFIED_HTTP_SERVLET)) return true; - + return false; } public static boolean isGenericServletSuperclass(IDataModel dataModel) { - if (QUALIFIED_HTTP_SERVLET.equals(getSuperclass(dataModel))) + if (QUALIFIED_JAKARTA_HTTP_SERVLET.equals(getSuperclass(dataModel))) return true; + if (QUALIFIED_HTTP_SERVLET.equals(getSuperclass(dataModel))) + return true; + + if (QUALIFIED_JAKARTA_GENERIC_SERVLET.equals(getSuperclass(dataModel))) + return true; + if (QUALIFIED_GENERIC_SERVLET.equals(getSuperclass(dataModel))) return true; + if (hasSuperclass(dataModel, getSuperclass(dataModel), QUALIFIED_JAKARTA_GENERIC_SERVLET)) + return true; + if (hasSuperclass(dataModel, getSuperclass(dataModel), QUALIFIED_GENERIC_SERVLET)) return true; @@ -42,19 +60,33 @@ } public static boolean isServletSuperclass(IDataModel dataModel) { + if (QUALIFIED_JAKARTA_HTTP_SERVLET.equals(getSuperclass(dataModel))) + return true; + if (QUALIFIED_HTTP_SERVLET.equals(getSuperclass(dataModel))) return true; + if (QUALIFIED_JAKARTA_GENERIC_SERVLET.equals(getSuperclass(dataModel))) + return true; + if (QUALIFIED_GENERIC_SERVLET.equals(getSuperclass(dataModel))) return true; + if (getInterfaces(dataModel).contains(QUALIFIED_JAKARTA_SERVLET)) + return true; + if (getInterfaces(dataModel).contains(QUALIFIED_SERVLET)) return true; + if (hasSuperInterface(dataModel, getSuperclass(dataModel), QUALIFIED_JAKARTA_SERVLET)) + return true; + if (hasSuperInterface(dataModel, getSuperclass(dataModel), QUALIFIED_SERVLET)) return true; for (Object iface : getInterfaces(dataModel)) { + if (hasSuperInterface(dataModel, (String) iface, QUALIFIED_JAKARTA_SERVLET)) + return true; if (hasSuperInterface(dataModel, (String) iface, QUALIFIED_SERVLET)) return true; }
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/plugin/WebPlugin.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/plugin/WebPlugin.java index fe55546..ba81fa0 100644 --- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/plugin/WebPlugin.java +++ b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/plugin/WebPlugin.java
@@ -56,6 +56,7 @@ // LibDir Change Listener public static final String LIBDIRCHANGE_BUILDER_ID = "com.ibm.etools.webtools.LibDirBuilder"; //$NON-NLS-1$ public static final String PLUGIN_ID = "org.eclipse.jst.j2ee.web"; //$NON-NLS-1$ + public static final IStatus OK_STATUS = new Status(IStatus.OK, PLUGIN_ID, "ok"); //$NON-NLS-1$ // LibCopy builder ID public static final String LIBCOPY_BUILDER_ID = "org.eclipse.jst.j2ee.LibCopyBuilder"; //$NON-NLS-1$ // Validation part of the plugin
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/web/IServletConstants.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/web/IServletConstants.java index b1257a1..1718f80 100644 --- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/web/IServletConstants.java +++ b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/web/IServletConstants.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 SAP AG and others. + * Copyright (c) 2008, 2021 SAP AG 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 @@ -18,12 +18,21 @@ public static final String QUALIFIED_GENERIC_SERVLET = "javax.servlet.GenericServlet"; //$NON-NLS-1$ public static final String QUALIFIED_HTTP_SERVLET = "javax.servlet.http.HttpServlet"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_SERVLET = "jakarta.servlet.Servlet"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_GENERIC_SERVLET = "jakarta.servlet.GenericServlet"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_HTTP_SERVLET = "jakarta.servlet.http.HttpServlet"; //$NON-NLS-1$ + public static final String QUALIFIED_WEB_SERVLET = "javax.servlet.annotation.WebServlet"; //$NON-NLS-1$ public static final String QUALIFIED_WEB_LISTENER = "javax.servlet.annotation.WebListener"; //$NON-NLS-1$ public static final String QUALIFIED_WEB_FILTER = "javax.servlet.annotation.WebFilter"; //$NON-NLS-1$ public static final String QUALIFIED_ANNOTATION_INIT_PARAM = "javax.servlet.annotation.WebInitParam"; //$NON-NLS-1$ public static final String QUALIFIED_ANNOTATION_DISPATCHER_TYPE = "javax.servlet.DispatcherType"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_WEB_SERVLET = "jakarta.servlet.annotation.WebServlet"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_WEB_LISTENER = "jakarta.servlet.annotation.WebListener"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_WEB_FILTER = "jakarta.servlet.annotation.WebFilter"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_ANNOTATION_INIT_PARAM = "jakarta.servlet.annotation.WebInitParam"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_ANNOTATION_DISPATCHER_TYPE = "jakarta.servlet.DispatcherType"; //$NON-NLS-1$ public static final String QUALIFIED_SERVLET_EXCEPTION = "javax.servlet.ServletException"; //$NON-NLS-1$ public static final String QUALIFIED_SERVLET_CONFIG = "javax.servlet.ServletConfig"; //$NON-NLS-1$ @@ -32,9 +41,22 @@ public static final String QUALIFIED_HTTP_SERVLET_REQUEST = "javax.servlet.http.HttpServletRequest"; //$NON-NLS-1$ public static final String QUALIFIED_HTTP_SERVLET_RESPONSE = "javax.servlet.http.HttpServletResponse"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_SERVLET_EXCEPTION = "jakarta.servlet.ServletException"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_SERVLET_CONFIG = "jakarta.servlet.ServletConfig"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_SERVLET_REQUEST = "jakarta.servlet.ServletRequest"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_SERVLET_RESPONSE = "jakarta.servlet.ServletResponse"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_HTTP_SERVLET_REQUEST = "jakarta.servlet.http.HttpServletRequest"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_HTTP_SERVLET_RESPONSE = "jakarta.servlet.http.HttpServletResponse"; //$NON-NLS-1$ + public static final String QUALIFIED_FILTER = "javax.servlet.Filter"; //$NON-NLS-1$ public static final String QUALIFIED_FILTER_CONFIG = "javax.servlet.FilterConfig"; //$NON-NLS-1$ public static final String QUALIFIED_FILTER_CHAIN = "javax.servlet.FilterChain"; //$NON-NLS-1$ + public static final String QUALIFIED_HTTP_FILTER = "javax.servlet.http.HttpFilter"; //$NON-NLS-1$ + + public static final String QUALIFIED_JAKARTA_FILTER = "jakarta.servlet.Filter"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_FILTER_CONFIG = "jakarta.servlet.FilterConfig"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_FILTER_CHAIN = "jakarta.servlet.FilterChain"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_HTTP_FILTER = "jakarta.servlet.http.HttpFilter"; //$NON-NLS-1$ public static final String QUALIFIED_SERVLET_CONTEXT_LISTENER = "javax.servlet.ServletContextListener"; //$NON-NLS-1$ public static final String QUALIFIED_SERVLET_CONTEXT_EVENT = "javax.servlet.ServletContextEvent"; //$NON-NLS-1$ @@ -53,6 +75,23 @@ public static final String QUALIFIED_HTTP_SESSION_ID_LISTENER = "javax.servlet.http.HttpSessionIdListener";//$NON-NLS-1$ public static final String QUALIFIED_SERVLET_REQUEST_ASYNC_EVENT_LISTENER = "javax.servlet.AsyncListener";//$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_SERVLET_CONTEXT_LISTENER = "jakarta.servlet.ServletContextListener"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_SERVLET_CONTEXT_EVENT = "jakarta.servlet.ServletContextEvent"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_SERVLET_CONTEXT_ATTRIBUTE_LISTENER = "jakarta.servlet.ServletContextAttributeListener"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_SERVLET_CONTEXT_ATTRIBUTE_EVENT = "jakarta.servlet.ServletContextAttributeEvent"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_HTTP_SESSION_LISTENER = "jakarta.servlet.http.HttpSessionListener"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_HTTP_SESSION_EVENT = "jakarta.servlet.http.HttpSessionEvent"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_HTTP_SESSION_ATTRIBUTE_LISTENER = "jakarta.servlet.http.HttpSessionAttributeListener"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_HTTP_SESSION_BINDING_EVENT = "jakarta.servlet.http.HttpSessionBindingEvent"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_HTTP_SESSION_ACTIVATION_LISTENER = "jakarta.servlet.http.HttpSessionActivationListener"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_HTTP_SESSION_BINDING_LISTENER = "jakarta.servlet.http.HttpSessionBindingListener"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_SERVLET_REQUEST_LISTENER = "jakarta.servlet.ServletRequestListener"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_SERVLET_REQUEST_EVENT = "jakarta.servlet.ServletRequestEvent"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_SERVLET_REQUEST_ATTRIBUTE_LISTENER = "jakarta.servlet.ServletRequestAttributeListener"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_SERVLET_REQUEST_ATTRIBUTE_EVENT = "jakarta.servlet.ServletRequestAttributeEvent"; //$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_HTTP_SESSION_ID_LISTENER = "jakarta.servlet.http.HttpSessionIdListener";//$NON-NLS-1$ + public static final String QUALIFIED_JAKARTA_SERVLET_REQUEST_ASYNC_EVENT_LISTENER = "jakarta.servlet.AsyncListener";//$NON-NLS-1$ + public static final String METHOD_INIT = "init"; //$NON-NLS-1$ public static final String METHOD_DESTROY = "destroy"; //$NON-NLS-1$ public static final String METHOD_GET_SERVLET_CONFIG = "getServletConfig"; //$NON-NLS-1$ @@ -84,4 +123,20 @@ public static final String FILTER_INIT_SIGNATURE = "(Ljavax/servlet/FilterConfig;)V"; //$NON-NLS-1$ public static final String DO_FILTER_SIGNATURE = "(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V"; //$NON-NLS-1$ + public static final String JAKARTA_SERVLET_INIT_SIGNATURE = "(Ljakarta/servlet/ServletConfig;)V"; //$NON-NLS-1$ + public static final String JAKARTA_DESTROY_SIGNATURE = "()V"; //$NON-NLS-1$ + public static final String JAKARTA_GET_SERVLET_CONFIG_SIGNATURE = "()Ljakarta/servlet/ServletConfig;"; //$NON-NLS-1$ + public static final String JAKARTA_GET_SERVLET_INFO_SIGNATURE = "()Ljava/lang/String;"; //$NON-NLS-1$ + public static final String JAKARTA_SERVICE_SIGNATURE = "(Ljakarta/servlet/ServletRequest;Ljakarta/servlet/ServletResponse;)V"; //$NON-NLS-1$ + public static final String JAKARTA_HTTP_SERVICE_SIGNATURE = "(Ljakarta/servlet/http/HttpServletRequest;Ljakarta/servlet/http/HttpServletResponse;)V"; //$NON-NLS-1$ + public static final String JAKARTA_DO_GET_SIGNATURE = "(Ljakarta/servlet/http/HttpServletRequest;Ljakarta/servlet/http/HttpServletResponse;)V"; //$NON-NLS-1$ + public static final String JAKARTA_DO_POST_SIGNATURE = "(Ljakarta/servlet/http/HttpServletRequest;Ljakarta/servlet/http/HttpServletResponse;)V"; //$NON-NLS-1$ + public static final String JAKARTA_DO_PUT_SIGNATURE = "(Ljakarta/servlet/http/HttpServletRequest;Ljakarta/servlet/http/HttpServletResponse;)V"; //$NON-NLS-1$ + public static final String JAKARTA_DO_DELETE_SIGNATURE = "(Ljakarta/servlet/http/HttpServletRequest;Ljakarta/servlet/http/HttpServletResponse;)V"; //$NON-NLS-1$ + public static final String JAKARTA_DO_HEAD_SIGNATURE = "(Ljakarta/servlet/http/HttpServletRequest;Ljakarta/servlet/http/HttpServletResponse;)V"; //$NON-NLS-1$ + public static final String JAKARTA_DO_OPTIONS_SIGNATURE = "(Ljakarta/servlet/http/HttpServletRequest;Ljakarta/servlet/http/HttpServletResponse;)V"; //$NON-NLS-1$ + public static final String JAKARTA_DO_TRACE_SIGNATURE = "(Ljakarta/servlet/http/HttpServletRequest;Ljakarta/servlet/http/HttpServletResponse;)V"; //$NON-NLS-1$ + public static final String JAKARTA_FILTER_INIT_SIGNATURE = "(Ljakarta/servlet/FilterConfig;)V"; //$NON-NLS-1$ + public static final String JAKARTA_DO_FILTER_SIGNATURE = "(Ljakarta/servlet/ServletRequest;Ljakarta/servlet/ServletResponse;Ljakarta/servlet/FilterChain;)V"; //$NON-NLS-1$ + }
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDataModelProvider.java index 6a840d7..455c0f8 100644 --- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDataModelProvider.java +++ b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDataModelProvider.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2007 IBM Corporation and others. + * Copyright (c) 2003, 2021 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 @@ -76,8 +76,8 @@ if (ModuleCoreNature.isFlexibleProject(project)) { IVirtualComponent c = ComponentCore.createComponent(project, true); - IVirtualFolder ejbroot = c.getRootFolder(); - IPath configFolderPath = J2EEModuleVirtualComponent.getDefaultDeploymentDescriptorFolder(ejbroot); + IVirtualFolder deployableRoot = c.getRootFolder(); + IPath configFolderPath = J2EEModuleVirtualComponent.getDefaultDeploymentDescriptorFolder(deployableRoot); if (configFolderPath != null && project.getFolder(configFolderPath).exists()) { return configFolderPath.toString(); @@ -109,6 +109,9 @@ else if(J2EEVersionConstants.VERSION_4_0_TEXT.equals(facetVersion)) { return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.EE8_DYNAMIC_WEB_GENERATE_DD)); } + else if(J2EEVersionConstants.VERSION_5_0_TEXT.equals(facetVersion)) { + return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.EE9_DYNAMIC_WEB_GENERATE_DD)); + } return Boolean.TRUE; }else if (propertyName.equals(INSTALL_WEB_LIBRARY)){ return J2EEComponentClasspathContainerUtils.getDefaultUseWebAppLibraries();
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java index c2c7711..ca10807 100644 --- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java +++ b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java
@@ -109,7 +109,13 @@ webroot.createLink(configFolderPath, 0, null); J2EEModuleVirtualComponent.setDefaultDeploymentDescriptorFolder(webroot, configFolderPath, null); } - if( fv == WebFacetUtils.WEB_40 ) + if( fv == WebFacetUtils.WEB_50 ) + { + if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){ + createWeb50DeploymentDescriptor(project, fv, webinfFolder, monitor); + } + } + else if( fv == WebFacetUtils.WEB_40 ) { if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){ createWeb40DeploymentDescriptor(project, fv, webinfFolder, monitor); @@ -236,6 +242,23 @@ return pjpath.append(model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER)); } + private void createWeb50DeploymentDescriptor(final IProject project, final IProjectFacetVersion fv, IFolder webinfFolder, IProgressMonitor monitor) throws CoreException { + // Create the deployment descriptor (web.xml) if one doesn't exist + IFile webxmlFile = webinfFolder.getFile("web.xml"); //$NON-NLS-1$ + if (!webxmlFile.exists()) { + try { + // Create a minimal web.xml file, so the model can be initialized + final String webXmlContents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<web-app id=\"WebApp_ID\" version=\"5.0\" xmlns=\"http://xmlns.jcp.org/xml/ns/javaee\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd\">\n</web-app>"; //$NON-NLS-1$ + webxmlFile.create(new ByteArrayInputStream(webXmlContents.getBytes("UTF-8")), true, monitor); //$NON-NLS-1$ + + populateDefaultContent(project, fv); + } + catch (UnsupportedEncodingException e) { + WebPlugin.logError(e); + } + } + } + private void createWeb40DeploymentDescriptor(final IProject project, final IProjectFacetVersion fv, IFolder webinfFolder, IProgressMonitor monitor) throws CoreException { // Create the deployment descriptor (web.xml) if one doesn't exist
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetUtils.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetUtils.java index b8015f5..2548cc7 100644 --- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetUtils.java +++ b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetUtils.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2006 IBM Corporation and others. + * Copyright (c) 2003, 2021 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 @@ -26,6 +26,7 @@ public static final IProjectFacetVersion WEB_30 = WEB_FACET.getVersion("3.0"); //$NON-NLS-1$ public static final IProjectFacetVersion WEB_31 = WEB_FACET.getVersion("3.1"); //$NON-NLS-1$ public static final IProjectFacetVersion WEB_40 = WEB_FACET.getVersion("4.0"); //$NON-NLS-1$ + public static final IProjectFacetVersion WEB_50 = WEB_FACET.getVersion("5.0"); //$NON-NLS-1$ public static final IProjectFacetVersion WEBFRAGMENT_30 = WEBFRAGMENT_FACET.getVersion("3.0"); //$NON-NLS-1$ public static final IProjectFacetVersion WEBFRAGMENT_31 = WEBFRAGMENT_FACET.getVersion("3.1"); //$NON-NLS-1$ public static final IProjectFacetVersion WEBFRAGMENT_40 = WEBFRAGMENT_FACET.getVersion("4.0"); //$NON-NLS-1$
diff --git a/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF index 21375d3..2d31c4d 100644 --- a/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name.0 Bundle-SymbolicName: org.eclipse.jst.j2ee; singleton:=true -Bundle-Version: 1.2.500.qualifier +Bundle-Version: 1.2.600.qualifier Bundle-Activator: org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin Bundle-Vendor: %Bundle-Vendor.0 Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/NewJavaClassDataModelProvider.java b/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/NewJavaClassDataModelProvider.java index 7a8bd3f..abad1fb 100644 --- a/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/NewJavaClassDataModelProvider.java +++ b/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/NewJavaClassDataModelProvider.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2012 IBM Corporation and others. + * Copyright (c) 2003, 2021 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 @@ -34,12 +34,14 @@ import org.eclipse.core.filesystem.EFS; import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; +import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IPackageFragment; @@ -47,6 +49,7 @@ import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaConventions; import org.eclipse.jdt.core.JavaCore; +import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jem.workbench.utility.JemProjectUtilities; import org.eclipse.jst.j2ee.internal.common.J2EECommonMessages; import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin; @@ -54,7 +57,6 @@ import org.eclipse.osgi.util.NLS; import org.eclipse.wst.common.componentcore.internal.operation.ArtifactEditOperationDataModelProvider; import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation; -import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin; /** * This data model provider is a subclass of AbstractDataModelProvider and follows the @@ -94,29 +96,29 @@ // Ensure that the source folder path is not empty if (folderFullPath == null || folderFullPath.length() == 0) { String msg = J2EECommonMessages.ERR_JAVA_CLASS_FOLDER_NAME_EMPTY; - return WTPCommonPlugin.createErrorStatus(msg); + return J2EEPlugin.createStatus(IStatus.ERROR, msg); } // Ensure that the source folder path is absolute else if (!new Path(folderFullPath).isAbsolute()) { String msg = J2EECommonMessages.ERR_JAVA_CLASS_FOLDER_NOT_ABSOLUTE; - return WTPCommonPlugin.createErrorStatus(msg); + return J2EEPlugin.createStatus(IStatus.ERROR, msg); } IProject project = getTargetProject(); // Ensure project is not closed if (project == null) { String msg = J2EECommonMessages.ERR_JAVA_CLASS_FOLDER_NOT_EXIST; - return WTPCommonPlugin.createErrorStatus(msg); + return J2EEPlugin.createStatus(IStatus.ERROR, msg); } // Ensure project is accessible. if (!project.isAccessible()) { String msg = J2EECommonMessages.ERR_JAVA_CLASS_FOLDER_NOT_EXIST; - return WTPCommonPlugin.createErrorStatus(msg); + return J2EEPlugin.createStatus(IStatus.ERROR, msg); } // Ensure the project is a java project. try { if (!project.hasNature(JavaCore.NATURE_ID)) { String msg = J2EECommonMessages.ERR_JAVA_CLASS_NOT_JAVA_PROJECT; - return WTPCommonPlugin.createErrorStatus(msg); + return J2EEPlugin.createStatus(IStatus.ERROR, msg); } } catch (CoreException e) { J2EEPlugin.logError(e); @@ -125,10 +127,10 @@ IFolder sourcefolder = getJavaSourceFolder(); if (sourcefolder == null || (!sourcefolder.getFullPath().equals(new Path(folderFullPath)))) { String msg = J2EECommonMessages.getResourceString(J2EECommonMessages.ERR_JAVA_CLASS_FOLDER_NOT_SOURCE, new String[]{folderFullPath}); - return WTPCommonPlugin.createErrorStatus(msg); + return J2EEPlugin.createStatus(IStatus.ERROR, msg); } // Valid source is selected - return WTPCommonPlugin.OK_STATUS; + return J2EEPlugin.OK_STATUS; } /** @@ -136,21 +138,25 @@ * folder. This implementation returns the first source folder in the project for the component. * This method may return null. * - * @return IFolder instance of default java source folder + * @return IContainer instance of default java source folder */ - protected IFolder getDefaultJavaSourceFolder() { + protected IContainer getDefaultJavaSourceFolder() { IProject project = getTargetProject(); if (project == null) return null; - IPackageFragmentRoot[] sources = J2EEProjectUtilities.getSourceContainers(project); - // Try and return the first source folder - if (sources.length > 0) { - try { - return (IFolder) sources[0].getCorrespondingResource(); - } catch (Exception e) { - return null; + IClasspathEntry[] entries; + try { + entries = JavaCore.create(project).getRawClasspath(); + // Try and return the first source folder + for (int i = 0; i < entries.length; i++) { + if(entries[i].getEntryKind() == IClasspathEntry.CPE_SOURCE) { + return project.getFolder(entries[i].getPath()); + } } } + catch (JavaModelException e) { + J2EEPlugin.logError(e); + } return null; } @@ -177,7 +183,7 @@ */ @Override public Set getPropertyNames() { - Set propertyNames = super.getPropertyNames(); + Set<String> propertyNames = super.getPropertyNames(); propertyNames.add(SOURCE_FOLDER); propertyNames.add(JAVA_PACKAGE); propertyNames.add(CLASS_NAME); @@ -212,7 +218,7 @@ public Object getDefaultProperty(String propertyName) { // Get the default source folder for the project if (propertyName.equals(SOURCE_FOLDER)) { - IFolder sourceFolder = getDefaultJavaSourceFolder(); + IContainer sourceFolder = getDefaultJavaSourceFolder(); if (sourceFolder != null && sourceFolder.exists()) return sourceFolder.getFullPath().toOSString(); } @@ -299,7 +305,7 @@ return validateModifier(propertyName, getBooleanProperty(propertyName)); if (result == null) { - result = WTPCommonPlugin.OK_STATUS; + result = J2EEPlugin.OK_STATUS; } return result; } @@ -321,14 +327,14 @@ IStatus javaStatus = JavaConventions.validatePackageName(packName); if (javaStatus.getSeverity() == IStatus.ERROR) { String msg = J2EECommonMessages.ERR_JAVA_PACAKGE_NAME_INVALID + javaStatus.getMessage(); - return WTPCommonPlugin.createErrorStatus(msg); + return J2EEPlugin.createStatus(IStatus.ERROR, msg); } else if (javaStatus.getSeverity() == IStatus.WARNING) { String msg = J2EECommonMessages.ERR_JAVA_PACKAGE_NAME_WARNING + javaStatus.getMessage(); - return WTPCommonPlugin.createWarningStatus(msg); + return J2EEPlugin.createStatus(IStatus.WARNING, msg); } } // java package name is valid - return WTPCommonPlugin.OK_STATUS; + return J2EEPlugin.OK_STATUS; } /** @@ -345,23 +351,23 @@ // Ensure the class name is not empty if (className == null || className.trim().length() == 0) { String msg = J2EECommonMessages.ERR_JAVA_CLASS_NAME_EMPTY; - return WTPCommonPlugin.createErrorStatus(msg); + return J2EEPlugin.createStatus(IStatus.ERROR, msg); } // Do not allow qualified name if (className.lastIndexOf('.') != -1) { String msg = J2EECommonMessages.ERR_JAVA_CLASS_NAME_QUALIFIED; - return WTPCommonPlugin.createErrorStatus(msg); + return J2EEPlugin.createStatus(IStatus.ERROR, msg); } // Check Java class name by standard java conventions IStatus javaStatus = JavaConventions.validateJavaTypeName(className); if (javaStatus.getSeverity() == IStatus.ERROR) { String msg = J2EECommonMessages.ERR_JAVA_CLASS_NAME_INVALID + javaStatus.getMessage(); - return WTPCommonPlugin.createErrorStatus(msg); + return J2EEPlugin.createStatus(IStatus.ERROR, msg); } else if (javaStatus.getSeverity() == IStatus.WARNING) { String msg = J2EECommonMessages.ERR_JAVA_CLASS_NAME_WARNING + javaStatus.getMessage(); - return WTPCommonPlugin.createWarningStatus(msg); + return J2EEPlugin.createStatus(IStatus.WARNING, msg); } - return WTPCommonPlugin.OK_STATUS; + return J2EEPlugin.OK_STATUS; } /** @@ -378,11 +384,11 @@ // Ensure the superclass name is not empty if (superclassName == null || superclassName.trim().length() == 0) { String msg = J2EECommonMessages.ERR_JAVA_CLASS_NAME_EMPTY; - return WTPCommonPlugin.createErrorStatus(msg); + return J2EEPlugin.createStatus(IStatus.ERROR, msg); } // In default case of Object, return OK right away if (superclassName.equals("java.lang.Object")) //$NON-NLS-1$ - return WTPCommonPlugin.OK_STATUS; + return J2EEPlugin.OK_STATUS; // Ensure the unqualified java class name of the superclass is valid String className = superclassName; int index = superclassName.lastIndexOf("."); //$NON-NLS-1$ @@ -402,7 +408,7 @@ } if (supertype == null) { String msg = J2EECommonMessages.ERR_JAVA_CLASS_SUPERCLASS_NOT_EXIST; - return WTPCommonPlugin.createErrorStatus(msg); + return J2EEPlugin.createStatus(IStatus.ERROR, msg); } // Ensure the superclass is not final int flags = -1; @@ -410,7 +416,7 @@ flags = supertype.getFlags(); if (Modifier.isFinal(flags)) { String msg = J2EECommonMessages.ERR_JAVA_CLASS_SUPERCLASS_FINAL; - return WTPCommonPlugin.createErrorStatus(msg); + return J2EEPlugin.createStatus(IStatus.ERROR, msg); } } catch (Exception e) { J2EEPlugin.logError(e); @@ -436,16 +442,16 @@ // Ensure final is not also checked if (propertyName.equals(MODIFIER_ABSTRACT) && getBooleanProperty(MODIFIER_FINAL)) { String msg = J2EECommonMessages.ERR_BOTH_FINAL_AND_ABSTRACT; - return WTPCommonPlugin.createErrorStatus(msg); + return J2EEPlugin.createStatus(IStatus.ERROR, msg); } // Ensure abstract is not also checked if (propertyName.equals(MODIFIER_FINAL) && getBooleanProperty(MODIFIER_ABSTRACT)) { String msg = J2EECommonMessages.ERR_BOTH_FINAL_AND_ABSTRACT; - return WTPCommonPlugin.createErrorStatus(msg); + return J2EEPlugin.createStatus(IStatus.ERROR, msg); } } // Abstract and final settings are valid - return WTPCommonPlugin.OK_STATUS; + return J2EEPlugin.OK_STATUS; } /** @@ -481,7 +487,7 @@ String message = NLS.bind( J2EECommonMessages.ERR_TYPE_ALREADY_EXIST, new Object[] { fullyQualifiedName }); - return WTPCommonPlugin.createErrorStatus(message); + return J2EEPlugin.createStatus(IStatus.ERROR, message); } URI location = resource.getLocationURI(); @@ -492,7 +498,7 @@ String message = NLS.bind( J2EECommonMessages.ERR_TYPE_DIFFERENT_CASE_EXIST, new Object[] { fullyQualifiedName }); - return WTPCommonPlugin.createErrorStatus(message); + return J2EEPlugin.createStatus(IStatus.ERROR, message); } } catch (CoreException e) { J2EEPlugin.logError(e); @@ -500,7 +506,7 @@ } } - return WTPCommonPlugin.OK_STATUS; + return J2EEPlugin.OK_STATUS; } /**
diff --git a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/JavaEEPreferencesInitializer.java b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/JavaEEPreferencesInitializer.java index 40dd979..4fd0263 100644 --- a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/JavaEEPreferencesInitializer.java +++ b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/JavaEEPreferencesInitializer.java
@@ -96,6 +96,10 @@ */ static final String EE8_DYNAMIC_WEB_GENERATE_DD = "ee8_dynamic_web_generate_dd"; //$NON-NLS-1$ /** + * @since 3.24 + */ + static final String EE9_DYNAMIC_WEB_GENERATE_DD = "ee9_dynamic_web_generate_dd"; //$NON-NLS-1$ + /** * @since 2.0 */ static final String EJB_GENERATE_DD = "ejb_generate_dd"; //$NON-NLS-1$
diff --git a/plugins/org.eclipse.jst.j2ee/pom.xml b/plugins/org.eclipse.jst.j2ee/pom.xml index b345985..12e28c1 100644 --- a/plugins/org.eclipse.jst.j2ee/pom.xml +++ b/plugins/org.eclipse.jst.j2ee/pom.xml
@@ -21,6 +21,6 @@ <groupId>org.eclipse.webtools.javaee</groupId> <artifactId>org.eclipse.jst.j2ee</artifactId> - <version>1.2.500-SNAPSHOT</version> + <version>1.2.600-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project>
diff --git a/plugins/org.eclipse.jst.jee.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.jee.ui/META-INF/MANIFEST.MF index ace2e2d..e07d345 100644 --- a/plugins/org.eclipse.jst.jee.ui/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.jst.jee.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name.0 Bundle-SymbolicName: org.eclipse.jst.jee.ui;singleton:=true -Bundle-Version: 1.0.901.qualifier +Bundle-Version: 1.0.1000.qualifier Bundle-Activator: org.eclipse.jst.jee.ui.plugin.JEEUIPlugin Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,4.0.0)", org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)", @@ -23,7 +23,7 @@ org.eclipse.jdt.core;bundle-version="[3.2.0,4.0.0)", org.eclipse.wst.common.emfworkbench.integration;bundle-version="[1.2.0,2.0.0)", org.eclipse.jst.j2ee;bundle-version="[1.1.0,1.3.0)", - org.eclipse.jst.j2ee.web;bundle-version="[1.1.0,1.2.0)", + org.eclipse.jst.j2ee.web;bundle-version="[1.2.0,2.0.0)", org.eclipse.jst.j2ee.ejb;bundle-version="[1.1.103,1.2.0)", org.eclipse.jst.j2ee.core;bundle-version="[1.1.102,2.0.0)", org.eclipse.wst.common.emf;bundle-version="[1.1.103,2.0.0)",
diff --git a/plugins/org.eclipse.jst.jee.ui/pom.xml b/plugins/org.eclipse.jst.jee.ui/pom.xml index 24e1e90..aadac60 100644 --- a/plugins/org.eclipse.jst.jee.ui/pom.xml +++ b/plugins/org.eclipse.jst.jee.ui/pom.xml
@@ -21,6 +21,6 @@ <groupId>org.eclipse.webtools.javaee</groupId> <artifactId>org.eclipse.jst.jee.ui</artifactId> - <version>1.0.901-SNAPSHOT</version> + <version>1.0.1000-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project>
diff --git a/plugins/org.eclipse.jst.jee.ui/src/org/eclipse/jst/jee/ui/internal/deployables/WebDeployableArtifactUtil.java b/plugins/org.eclipse.jst.jee.ui/src/org/eclipse/jst/jee/ui/internal/deployables/WebDeployableArtifactUtil.java index 59aec76..95a7f17 100644 --- a/plugins/org.eclipse.jst.jee.ui/src/org/eclipse/jst/jee/ui/internal/deployables/WebDeployableArtifactUtil.java +++ b/plugins/org.eclipse.jst.jee.ui/src/org/eclipse/jst/jee/ui/internal/deployables/WebDeployableArtifactUtil.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2014 IBM Corporation and others. + * Copyright (c) 2003, 2021 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 @@ -201,7 +201,9 @@ if (correctJSPPath != null && correctJSPPath.toString().length() > 0) return new WebResource(getModule(resource.getProject(), component), correctJSPPath); } - }catch (Exception e) {} + }catch (Exception e) { + JEEUIPlugin.logError(e); + } return new WebResource(getModule(resource.getProject(), component), resourcePath); }
diff --git a/plugins/org.eclipse.jst.jee.web/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.jee.web/META-INF/MANIFEST.MF index 7723ee5..a8b9964 100644 --- a/plugins/org.eclipse.jst.jee.web/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.jst.jee.web/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name.0 Bundle-SymbolicName: org.eclipse.jst.jee.web;singleton:=true -Bundle-Version: 1.0.800.qualifier +Bundle-Version: 1.0.900.qualifier Bundle-Activator: org.eclipse.jst.jee.web.Activator Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)", org.eclipse.wst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)", @@ -19,7 +19,7 @@ org.eclipse.emf.common;bundle-version="[2.2.0,3.0.0)", org.eclipse.emf.ecore;bundle-version="[2.2.0,3.0.0)", org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,3.0.0)", - org.eclipse.jst.j2ee.web;bundle-version="[1.1.0,1.2.0)", + org.eclipse.jst.j2ee.web;bundle-version="[1.2.0,2.0.0)", org.eclipse.jst.j2ee.core;bundle-version="[1.3.0,2.0.0)", org.eclipse.wst.common.emf, org.eclipse.wst.common.emfworkbench.integration
diff --git a/plugins/org.eclipse.jst.jee.web/pom.xml b/plugins/org.eclipse.jst.jee.web/pom.xml index 7450f8a..6909717 100644 --- a/plugins/org.eclipse.jst.jee.web/pom.xml +++ b/plugins/org.eclipse.jst.jee.web/pom.xml
@@ -21,6 +21,6 @@ <groupId>org.eclipse.webtools.javaee</groupId> <artifactId>org.eclipse.jst.jee.web</artifactId> - <version>1.0.800-SNAPSHOT</version> + <version>1.0.900-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project>
diff --git a/plugins/org.eclipse.jst.servlet.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.servlet.ui/META-INF/MANIFEST.MF index 3c88b65..10780cb 100644 --- a/plugins/org.eclipse.jst.servlet.ui/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.jst.servlet.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.jst.servlet.ui; singleton:=true -Bundle-Version: 1.1.1100.qualifier +Bundle-Version: 1.1.1200.qualifier Bundle-Activator: org.eclipse.jst.servlet.ui.internal.plugin.ServletUIPlugin Bundle-Vendor: %pluginVendor Bundle-Localization: plugin @@ -23,7 +23,7 @@ org.eclipse.wst.common.frameworks;bundle-version="[1.2.0,2.0.0)", org.eclipse.jst.j2ee;bundle-version="[1.1.0,1.3.0)", org.eclipse.jst.j2ee.core;bundle-version="[1.3.0,2.0.0)", - org.eclipse.jst.j2ee.web;bundle-version="[1.1.0,1.2.0)", + org.eclipse.jst.j2ee.web;bundle-version="[1.2.0,2.0.0)", org.eclipse.wst.web;bundle-version="[1.1.0,2.0.0)", org.eclipse.jdt.core;bundle-version="[3.2.0,4.0.0)", org.eclipse.jdt.ui;bundle-version="[3.2.0,4.0.0)",
diff --git a/plugins/org.eclipse.jst.servlet.ui/pom.xml b/plugins/org.eclipse.jst.servlet.ui/pom.xml index 33c1e4e..2663eaa 100644 --- a/plugins/org.eclipse.jst.servlet.ui/pom.xml +++ b/plugins/org.eclipse.jst.servlet.ui/pom.xml
@@ -21,6 +21,6 @@ <groupId>org.eclipse.webtools.javaee</groupId> <artifactId>org.eclipse.jst.servlet.ui</artifactId> - <version>1.1.1100-SNAPSHOT</version> + <version>1.1.1200-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project>
diff --git a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/NewServletClassWizardPage.java b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/NewServletClassWizardPage.java index aa565f9..5176c94 100644 --- a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/NewServletClassWizardPage.java +++ b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/NewServletClassWizardPage.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2008 IBM Corporation and others. + * Copyright (c) 2003, 2021 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