[580016] Deployment Descriptor node in Project Explorer missing with
Dynamic Web Module 5.0
Change-Id: Ic0b455ef719baf1a0f0f309f9b5565ce90927bbc
diff --git a/.gitignore b/.gitignore
index 9e1ed33..a6dd576 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,8 @@
 # Package Files #
 target/
 *.war
+.DS_Store
+.DS_Store?
+ehthumbs.db
+Thumbs.db
+.Spotlight-V100
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 7e87c67..6127aad 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.300.qualifier
+Bundle-Version: 1.4.400.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/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEConstants.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEConstants.java
index 10c760a..1d002ae 100644
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEConstants.java
+++ b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/internal/J2EEConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2021 IBM Corporation and others.
+ * Copyright (c) 2001, 2022 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
@@ -213,6 +213,7 @@
     String J2EE_NS_URL                      = "http://java.sun.com/xml/ns/j2ee"; //$NON-NLS-1$
     String JAVAEE_NS_URL                    = "http://java.sun.com/xml/ns/javaee"; //$NON-NLS-1$ //EJB3
     String JAVAEE7_NS_URL                   = "http://xmlns.jcp.org/xml/ns/javaee"; //$NON-NLS-1$
+    String JAKARTAEE9_NS_URL = "https://jakarta.ee/xml/ns/jakartaee"; //$NON-NLS-1$
     String J2EE_1_4_XSD_SHORT_NAME          = "j2ee_1_4.xsd"; //$NON-NLS-1$
     String JAVAEE_5_XSD_SHORT_NAME          = "javaee_5.xsd"; //$NON-NLS-1$  //EJB3
     String XSI_NS_URL                       = "http://www.w3.org/2001/XMLSchema-instance"; //$NON-NLS-1$ 
diff --git a/plugins/org.eclipse.jst.j2ee.core/pom.xml b/plugins/org.eclipse.jst.j2ee.core/pom.xml
index 33d2c5c..e870989 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.300-SNAPSHOT</version>
+  <version>1.4.400-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 abdc260..f40b77f 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.1100.qualifier
+Bundle-Version: 1.0.1200.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)",
diff --git a/plugins/org.eclipse.jst.jee.ui/icons/webapp_50.gif b/plugins/org.eclipse.jst.jee.ui/icons/webapp_50.gif
new file mode 100644
index 0000000..f9f2e9b
--- /dev/null
+++ b/plugins/org.eclipse.jst.jee.ui/icons/webapp_50.gif
Binary files differ
diff --git a/plugins/org.eclipse.jst.jee.ui/plugin.xml b/plugins/org.eclipse.jst.jee.ui/plugin.xml
index 454a1b9..079c68a 100644
--- a/plugins/org.eclipse.jst.jee.ui/plugin.xml
+++ b/plugins/org.eclipse.jst.jee.ui/plugin.xml
@@ -817,6 +817,11 @@
                        property="org.eclipse.wst.common.project.facet.core.projectFacet"
                        value="jst.web:4.0">
                  </test>
+                 <test
+                       forcePluginActivation="true"
+                       property="org.eclipse.wst.common.project.facet.core.projectFacet"
+                       value="jst.web:5.0">
+                 </test>
               </or>
            </adapt>
    <instanceof
diff --git a/plugins/org.eclipse.jst.jee.ui/pom.xml b/plugins/org.eclipse.jst.jee.ui/pom.xml
index aff68f8..b2ec644 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.1100-SNAPSHOT</version>
+  <version>1.0.1200-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 </project>
diff --git a/plugins/org.eclipse.jst.jee.ui/src/org/eclipse/jst/jee/ui/internal/navigator/web/WebAppProvider.java b/plugins/org.eclipse.jst.jee.ui/src/org/eclipse/jst/jee/ui/internal/navigator/web/WebAppProvider.java
index 00cfc06..0433aee 100644
--- a/plugins/org.eclipse.jst.jee.ui/src/org/eclipse/jst/jee/ui/internal/navigator/web/WebAppProvider.java
+++ b/plugins/org.eclipse.jst.jee.ui/src/org/eclipse/jst/jee/ui/internal/navigator/web/WebAppProvider.java
@@ -1,5 +1,5 @@
 /***********************************************************************
- * Copyright (c) 2008, 2017 by SAP AG, Walldorf. 
+ * Copyright (c) 2008, 2022 by SAP AG, Walldorf, 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
@@ -49,7 +49,7 @@
 	private GroupWelcomePagesItemProvider welcome;
 	private GroupContextParamsItemProvider contextParams;
 	
-	private List<Object> children2 = new ArrayList<Object>();
+	private List<AbstractGroupProvider> children2 = new ArrayList<AbstractGroupProvider>();
 	
 	private String text2;
 	
@@ -57,6 +57,7 @@
 	private Image web30Image;
 	private Image web31Image;
 	private Image web40Image;
+	private Image web50Image;
 	
 	private IProject prjct = null;
 	private IFile ddFile = null;
@@ -109,6 +110,8 @@
 			return getWeb31Image();
 		} else if (J2EEVersionConstants.VERSION_4_0_TEXT.equals(version)) {
 			return getWeb40Image();
+		} else if (J2EEVersionConstants.VERSION_5_0_TEXT.equals(version)) {
+			return getWeb50Image();
 		}
 		return getWeb25Image();
 	}
@@ -129,8 +132,8 @@
 	@Override
 	public void reinit(JavaEEObject modelObject) {
 		super.reinit(modelObject);
-		for (Object child : children2) {
-			((AbstractGroupProvider)child).reinit(modelObject);
+		for (AbstractGroupProvider child : children2) {
+			child.reinit(modelObject);
 		}
 	}
 
@@ -168,4 +171,11 @@
 		}
 		return web40Image;
 	}
+
+	private Image getWeb50Image() {
+		if (web50Image == null) {
+			web50Image = JEEUIPlugin.getDefault().getImageDescriptor(JEEUIPluginIcons.IMG_WEBEE9MODEL).createImage();
+		}
+		return web50Image;
+	}
 }
diff --git a/plugins/org.eclipse.jst.jee.ui/src/org/eclipse/jst/jee/ui/plugin/JEEUIPluginIcons.java b/plugins/org.eclipse.jst.jee.ui/src/org/eclipse/jst/jee/ui/plugin/JEEUIPluginIcons.java
index 45d56dc..3493f49 100644
--- a/plugins/org.eclipse.jst.jee.ui/src/org/eclipse/jst/jee/ui/plugin/JEEUIPluginIcons.java
+++ b/plugins/org.eclipse.jst.jee.ui/src/org/eclipse/jst/jee/ui/plugin/JEEUIPluginIcons.java
@@ -1,5 +1,5 @@
 /***********************************************************************
- * Copyright (c) 2008, 2013 by SAP AG, Walldorf. 
+ * Copyright (c) 2008, 2022 by SAP AG, Walldorf, 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,6 +20,7 @@
 	public static String IMG_WEBEE6MODEL = "webapp_30"; //$NON-NLS-1$
 	public static String IMG_WEBEE7MODEL = "webapp_31"; //$NON-NLS-1$
 	public static String IMG_WEBEE8MODEL = "webapp_40"; //$NON-NLS-1$
+	public static String IMG_WEBEE9MODEL = "webapp_50"; //$NON-NLS-1$
 	public static String IMG_CONNECTOR = "connection"; //$NON-NLS-1$
 	public static String IMG_EE7CONNECTOR = "connector_17"; //$NON-NLS-1$
 	public static String IMG_CONFIG_PROP = "config_prop_obj"; //$NON-NLS-1$
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 a8b9964..0efdfea 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.900.qualifier
+Bundle-Version: 1.0.1000.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)",
diff --git a/plugins/org.eclipse.jst.jee.web/pom.xml b/plugins/org.eclipse.jst.jee.web/pom.xml
index 6909717..dd81d00 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.900-SNAPSHOT</version>
+  <version>1.0.1000-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 </project>
diff --git a/plugins/org.eclipse.jst.jee.web/web/org/eclipse/jst/jee/model/internal/Web25ModelProvider.java b/plugins/org.eclipse.jst.jee.web/web/org/eclipse/jst/jee/model/internal/Web25ModelProvider.java
index e7209e4..19943fc 100644
--- a/plugins/org.eclipse.jst.jee.web/web/org/eclipse/jst/jee/model/internal/Web25ModelProvider.java
+++ b/plugins/org.eclipse.jst.jee.web/web/org/eclipse/jst/jee/model/internal/Web25ModelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2022 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,12 +76,24 @@
 			// note that later EMF generations remove the _LITERAL from the enum
 			war.setVersion(WebAppVersionType._31);
 		}
-		else
-		{
+		else if (version != null && version.equals(J2EEVersionConstants.VERSION_4_0_TEXT)) {
 			dd.getXMLNSPrefixMap().put("", J2EEConstants.JAVAEE7_NS_URL);  //$NON-NLS-1$
 			dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE7_NS_URL, J2EEConstants.WEB_APP_SCHEMA_LOC_4_0);
 			// note that later EMF generations remove the _LITERAL from the enum
 			war.setVersion(WebAppVersionType._40);
+		}
+		else if (version != null && version.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) {
+			dd.getXMLNSPrefixMap().put("", J2EEConstants.JAKARTAEE9_NS_URL);  //$NON-NLS-1$
+			dd.getXSISchemaLocation().put(J2EEConstants.JAKARTAEE9_NS_URL, J2EEConstants.WEB_APP_SCHEMA_LOC_5_0);
+			// note that later EMF generations remove the _LITERAL from the enum
+			war.setVersion(WebAppVersionType._50);
+		}
+		else
+		{
+			dd.getXMLNSPrefixMap().put("", J2EEConstants.JAKARTAEE9_NS_URL);  //$NON-NLS-1$
+			dd.getXSISchemaLocation().put(J2EEConstants.JAKARTAEE9_NS_URL, J2EEConstants.WEB_APP_SCHEMA_LOC_5_0);
+			// note that later EMF generations remove the _LITERAL from the enum
+			war.setVersion(WebAppVersionType._50);
 		}		
 		dd.setWebApp(war);		
 		res.getContents().add((EObject) dd);