Merge remote-tracking branch 'origin/BETA_JAVA17'

updated the plugin version of the changed plugins.

Change-Id: I6db3e735c83207868e58c5039b7561c0fd925b3a
Signed-off-by: Kalyan Prasad Tatavarthi <kalyan_prasad@in.ibm.com>
diff --git a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ASTView.java b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ASTView.java
index 9428e98..e51a9e6 100644
--- a/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ASTView.java
+++ b/org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ASTView.java
@@ -138,6 +138,7 @@
 public class ASTView extends ViewPart implements IShowInSource, IShowInTargetList {
 
 	static final int JLS_LATEST= AST.getJLSLatest();
+	private static final int JLS17= ASTHelper.JLS17;
 	private static final int JLS16= ASTHelper.JLS16;
 	private static final int JLS15= ASTHelper.JLS15;
 	private static final int JLS14= ASTHelper.JLS14;
@@ -509,6 +510,7 @@
 				case JLS14:
 				case JLS15:
 				case JLS16:
+				case JLS17:
 					fCurrentASTLevel= level;
 			}
 		} catch (NumberFormatException e) {
@@ -1131,6 +1133,7 @@
 				new ASTLevelToggle("AST Level 1&4 (14)", JLS14), //$NON-NLS-1$
 				new ASTLevelToggle("AST Level 1&5 (15)", JLS15), //$NON-NLS-1$
 				new ASTLevelToggle("AST Level 1&6 (16)", JLS16), //$NON-NLS-1$
+				new ASTLevelToggle("AST Level 1&7 (17)", JLS17), //$NON-NLS-1$
 		};
 
 		fAddToTrayAction= new Action() {
diff --git a/org.eclipse.jdt.core.manipulation/.settings/.api_filters b/org.eclipse.jdt.core.manipulation/.settings/.api_filters
index bae7ae8..c6caaf7 100644
--- a/org.eclipse.jdt.core.manipulation/.settings/.api_filters
+++ b/org.eclipse.jdt.core.manipulation/.settings/.api_filters
@@ -8,4 +8,41 @@
             </message_arguments>
         </filter>
     </resource>
+    <resource path="core extension/org/eclipse/jdt/internal/corext/dom/ASTFlattener.java" type="org.eclipse.jdt.internal.corext.dom.ASTFlattener">
+        <filter comment="Java preview feature API" id="640712815">
+            <message_arguments>
+                <message_argument value="ASTNode"/>
+                <message_argument value="ASTFlattener"/>
+                <message_argument value="accept(ASTVisitor)"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Java preview feature API" id="640712815">
+            <message_arguments>
+                <message_argument value="ASTNode"/>
+                <message_argument value="ASTFlattener"/>
+                <message_argument value="getAST()"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Java preview feature API" id="640712815">
+            <message_arguments>
+                <message_argument value="GuardedPattern"/>
+                <message_argument value="ASTFlattener"/>
+                <message_argument value="getExpression()"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Java preview feature API" id="640712815">
+            <message_arguments>
+                <message_argument value="GuardedPattern"/>
+                <message_argument value="ASTFlattener"/>
+                <message_argument value="getPattern()"/>
+            </message_arguments>
+        </filter>
+        <filter comment="Java preview feature API" id="640712815">
+            <message_arguments>
+                <message_argument value="TypePattern"/>
+                <message_argument value="ASTFlattener"/>
+                <message_argument value="getPatternVariable()"/>
+            </message_arguments>
+        </filter>
+    </resource>
 </component>
diff --git a/org.eclipse.jdt.core.manipulation/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.manipulation/META-INF/MANIFEST.MF
index 6040a56..3323eec 100644
--- a/org.eclipse.jdt.core.manipulation/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core.manipulation/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.core.manipulation; singleton:=true
-Bundle-Version: 1.15.0.qualifier
+Bundle-Version: 1.15.100.qualifier
 Bundle-Vendor: %providerName
 Bundle-Activator: org.eclipse.jdt.internal.core.manipulation.JavaManipulationPlugin
 Bundle-Localization: plugin
diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/core/manipulation/SharedASTProviderCore.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/core/manipulation/SharedASTProviderCore.java
index 7a3c05d..8930b0d 100644
--- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/core/manipulation/SharedASTProviderCore.java
+++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/core/manipulation/SharedASTProviderCore.java
@@ -32,7 +32,7 @@
  * <p>Clients can make the following assumptions about the AST:</p>
  * <ul>
  *    <li>the AST has a {@link ITypeRoot} as source: {@link CompilationUnit#getTypeRoot()} is not null.</li>
- *    <li>the {@link AST#apiLevel() AST API level} is {@link AST#JLS16 API level 16} or higher</li>
+ *    <li>the {@link AST#apiLevel() AST API level} is {@link AST#JLS17 API level 17} or higher</li>
  *    <li>the AST has bindings resolved ({@link AST#hasResolvedBindings()})</li>
  *    <li>{@link AST#hasStatementsRecovery() statement} and {@link AST#hasBindingsRecovery() bindings}
  *           recovery are enabled
diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/util/ASTHelper.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/util/ASTHelper.java
index cc206df..1983f31 100644
--- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/util/ASTHelper.java
+++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/ui/util/ASTHelper.java
@@ -32,6 +32,7 @@
 	public static final int JLS14 = AST.JLS14;
 	public static final int JLS15 = AST.JLS15;
 	public static final int JLS16 = AST.JLS16;
+	public static final int JLS17 = AST.JLS17;
 
 	private static boolean isNodeTypeSupportedInAST(AST ast, int nodeType) {
 		switch (nodeType) {
@@ -44,6 +45,8 @@
 			case ASTNode.RECORD_DECLARATION:
 			case ASTNode.INSTANCEOF_EXPRESSION:
 				return ast.apiLevel() >= JLS16;
+			case ASTNode.TYPE_PATTERN:
+				return ast.isPreviewEnabled();
 			default:
 				break;
 		}
@@ -54,7 +57,7 @@
 		switch (modifier) {
 			case Modifier.SEALED:
 			case Modifier.NON_SEALED:
-				return ast.isPreviewEnabled();
+				return ast.apiLevel() >= JLS17;
 			default:
 				break;
 		}
@@ -89,4 +92,8 @@
 		return isNodeTypeSupportedInAST(ast, ASTNode.INSTANCEOF_EXPRESSION);
 	}
 
+	public static boolean isPatternSupported(AST ast) {
+		return isNodeTypeSupportedInAST(ast, ASTNode.TYPE_PATTERN);
+	}
+
 }
diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/ASTFlattener.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/ASTFlattener.java
index 65a5af7..f9c25fe 100644
--- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/ASTFlattener.java
+++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/ASTFlattener.java
@@ -356,6 +356,14 @@
 		return false;
 	}
 
+	@Override
+	public boolean visit(CaseDefaultExpression node) {
+		if (ASTHelper.isPatternSupported(node.getAST())) {
+			this.fBuffer.append("default");//$NON-NLS-1$
+		}
+		return false;
+	}
+
 	/*
 	 * @see ASTVisitor#visit(CastExpression)
 	 */
@@ -727,6 +735,16 @@
 		return false;
 	}
 
+	@Override
+	public boolean visit(GuardedPattern node) {
+		if (ASTHelper.isPatternSupported(node.getAST())) {
+			node.getPattern().accept(this);
+			this.fBuffer.append(" && ");//$NON-NLS-1$
+			node.getExpression().accept(this);
+		}
+		return false;
+	}
+
 	/*
 	 * @see ASTVisitor#visit(IfStatement)
 	 */
@@ -1179,6 +1197,14 @@
 		return false;
 	}
 
+	@Override
+	public boolean visit(NullPattern node) {
+		if (ASTHelper.isPatternSupported(node.getAST())) {
+			this.fBuffer.append("null");//$NON-NLS-1$
+		}
+		return false;
+	}
+
 	/*
 	 * @see ASTVisitor#visit(NumberLiteral)
 	 */
@@ -1578,7 +1604,7 @@
 	@Override
 	public boolean visit(SwitchCase node) {
 		if (ASTHelper.isSwitchCaseExpressionsSupportedInAST(node.getAST())) {
-			if (node.isDefault()) {
+			if (node.isDefault() && !isCaseDefaultExpression(node)) {
 				this.fBuffer.append("default");//$NON-NLS-1$
 				this.fBuffer.append(node.isSwitchLabeledRule() ? " ->" : ":");//$NON-NLS-1$ //$NON-NLS-2$
 			} else {
@@ -1591,7 +1617,7 @@
 				}
 			}
 		} else {
-			if (node.isDefault()) {
+			if (node.isDefault() && !isCaseDefaultExpression(node)) {
 				this.fBuffer.append("default :\n");//$NON-NLS-1$
 			} else {
 				this.fBuffer.append("case ");//$NON-NLS-1$
@@ -1602,6 +1628,13 @@
 		return false;
 	}
 
+	private boolean isCaseDefaultExpression(SwitchCase node) {
+		if (node.expressions() != null && node.expressions().size() == 1 && node.expressions().get(0) instanceof CaseDefaultExpression) {
+			return true;
+		}
+		return false;
+	}
+
 	@Override
 	public boolean visit(YieldStatement node) {
 		if (ASTHelper.isYieldNodeSupportedInAST(node.getAST()) && node.isImplicit() && node.getExpression() == null) {
@@ -1901,6 +1934,14 @@
 		return false;
 	}
 
+	@Override
+	public boolean visit(TypePattern node) {
+		if (ASTHelper.isPatternSupported(node.getAST())) {
+			node.getPatternVariable().accept(this);
+		}
+		return false;
+	}
+
 	/*
 	 * @see ASTVisitor#visit(UnionType)
 	 */
diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/HierarchicalASTVisitor.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/HierarchicalASTVisitor.java
index b2bd938..30242aa 100644
--- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/HierarchicalASTVisitor.java
+++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/HierarchicalASTVisitor.java
@@ -380,6 +380,16 @@
 	}
 
 	@Override
+	public boolean visit(CaseDefaultExpression node) {
+		return visit((Expression)node);
+	}
+
+	@Override
+	public void endVisit(CaseDefaultExpression node) {
+		endVisit((Expression)node);
+	}
+
+	@Override
 	public boolean visit(CastExpression node) {
 		return visit((Expression)node);
 	}
@@ -602,6 +612,16 @@
 	//---- End Name Hierarchy ------------------------------------
 
 	@Override
+	public boolean visit(GuardedPattern node) {
+		return visit((Pattern)node);
+	}
+
+	@Override
+	public void endVisit(GuardedPattern node) {
+		endVisit((Pattern)node);
+	}
+
+	@Override
 	public boolean visit(NullLiteral node) {
 		return visit((Expression)node);
 	}
@@ -612,6 +632,16 @@
 	}
 
 	@Override
+	public boolean visit(NullPattern node) {
+		return visit((Pattern)node);
+	}
+
+	@Override
+	public void endVisit(NullPattern node) {
+		endVisit((Pattern)node);
+	}
+
+	@Override
 	public boolean visit(NumberLiteral node) {
 		return visit((Expression)node);
 	}
@@ -621,6 +651,14 @@
 		endVisit((Expression)node);
 	}
 
+	public boolean visit(Pattern node) {
+		return visit((Expression)node);
+	}
+
+	public void endVisit(Pattern node) {
+		endVisit((Expression)node);
+	}
+
 	@Override
 	public boolean visit(ParenthesizedExpression node) {
 		return visit((Expression)node);
@@ -712,6 +750,16 @@
 	}
 
 	@Override
+	public boolean visit(TypePattern node) {
+		return visit((Pattern)node);
+	}
+
+	@Override
+	public void endVisit(TypePattern node) {
+		endVisit((Pattern)node);
+	}
+
+	@Override
 	public boolean visit(VariableDeclarationExpression node) {
 		return visit((Expression)node);
 	}
diff --git a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/util/JavaModelUtil.java b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/util/JavaModelUtil.java
index a50255a..47a983e 100644
--- a/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/util/JavaModelUtil.java
+++ b/org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/util/JavaModelUtil.java
@@ -80,7 +80,7 @@
 	 */
 	public static final String VERSION_LATEST;
 	static {
-		VERSION_LATEST= JavaCore.VERSION_16; // make sure it is not inlined
+		VERSION_LATEST= JavaCore.VERSION_17; // make sure it is not inlined
 	}
 
 	public static final int VALIDATE_EDIT_CHANGED_CONTENT= 10003;
@@ -845,6 +845,10 @@
 		return !isVersionLessThan(compliance, JavaCore.VERSION_16);
 	}
 
+	public static boolean is17OrHigher(String compliance) {
+		return !isVersionLessThan(compliance, JavaCore.VERSION_17);
+	}
+
 	/**
 	 * Checks if the given project or workspace has source compliance 1.2 or greater.
 	 *
@@ -974,6 +978,17 @@
 		return is16OrHigher(getSourceCompliance(project));
 	}
 
+	/**
+	 * Checks if the given project or workspace has source compliance 17 or greater.
+	 *
+	 * @param project the project to test or <code>null</code> to test the workspace settings
+	 * @return <code>true</code> if the given project or workspace has source compliance 17 or
+	 *         greater.
+	 */
+	public static boolean is17OrHigher(IJavaProject project) {
+		return is17OrHigher(getSourceCompliance(project));
+	}
+
 	public static String getSourceCompliance(IJavaProject project) {
 		return project != null ? project.getOption(JavaCore.COMPILER_SOURCE, true) : JavaCore.getOption(JavaCore.COMPILER_SOURCE);
 	}
@@ -1024,6 +1039,8 @@
 		String version= vMInstall.getJavaVersion();
 		if (version == null) {
 			return defaultCompliance;
+		} else if (version.startsWith(JavaCore.VERSION_17)) {
+			return JavaCore.VERSION_17;
 		} else if (version.startsWith(JavaCore.VERSION_16)) {
 			return JavaCore.VERSION_16;
 		} else if (version.startsWith(JavaCore.VERSION_15)) {
@@ -1068,7 +1085,9 @@
 
 		// fallback:
 		String desc= executionEnvironment.getId();
-		if (desc.indexOf(JavaCore.VERSION_16) != -1) {
+		if (desc.indexOf(JavaCore.VERSION_17) != -1) {
+			return JavaCore.VERSION_17;
+		} else if (desc.indexOf(JavaCore.VERSION_16) != -1) {
 			return JavaCore.VERSION_16;
 		} else if (desc.indexOf(JavaCore.VERSION_15) != -1) {
 			return JavaCore.VERSION_15;
diff --git a/org.eclipse.jdt.core.manipulation/pom.xml b/org.eclipse.jdt.core.manipulation/pom.xml
index 84b9761..486e949 100644
--- a/org.eclipse.jdt.core.manipulation/pom.xml
+++ b/org.eclipse.jdt.core.manipulation/pom.xml
@@ -18,6 +18,6 @@
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.core.manipulation</artifactId>
-  <version>1.15.0-SNAPSHOT</version>
+  <version>1.15.100-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 </project>
diff --git a/org.eclipse.jdt.ui.tests/META-INF/MANIFEST.MF b/org.eclipse.jdt.ui.tests/META-INF/MANIFEST.MF
index a3f64e1..1bc8aac 100644
--- a/org.eclipse.jdt.ui.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.ui.tests/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.jdt.ui.tests; singleton:=true
-Bundle-Version: 3.14.0.qualifier
+Bundle-Version: 3.14.100.qualifier
 Bundle-Activator: org.eclipse.jdt.testplugin.JavaTestPlugin
 Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
diff --git a/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/ReferenceTracker.java b/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/ReferenceTracker.java
index 0952c1d..220aae1 100644
--- a/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/ReferenceTracker.java
+++ b/org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/reftracker/ReferenceTracker.java
@@ -110,7 +110,7 @@
 			}
 			return isAccessible;
 		} catch (RuntimeException ex) {
-			throw new RuntimeException("JVM settings `--add-modules ALL-SYSTEM --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens jdk.localedata/sun.util.resources.cldr.provider=ALL-UNNAMED --add-opens jdk.localedata/sun.util.resources.provider=ALL-UNNAMED --add-opens java.base/jdk.internal.module=ALL-UNNAMED --add-opens java.base/java.lang.module=ALL-UNNAMED --add-opens java.base/jdk.internal.reflect=ALL-UNNAMED --add-opens java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/jdk.internal.math=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens java.base/jdk.internal.icu.impl=ALL-UNNAMED --add-opens java.base/jdk.internal.icu.text=ALL-UNNAMED --illegal-access=permit` are probably missing.\nException : \n" + ex.getMessage(), ex);
+			throw new RuntimeException("JVM settings for --add-modules, --add-opens, and --illegal-access are probably missing.\nException : \n" + ex.getMessage(), ex);
 		}
 	}
 
diff --git a/org.eclipse.jdt.ui.tests/pom.xml b/org.eclipse.jdt.ui.tests/pom.xml
index 6d85501..ac45669 100644
--- a/org.eclipse.jdt.ui.tests/pom.xml
+++ b/org.eclipse.jdt.ui.tests/pom.xml
@@ -20,12 +20,12 @@
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.ui.tests</artifactId>
-  <version>3.14.0-SNAPSHOT</version>
+  <version>3.14.100-SNAPSHOT</version>
   <packaging>eclipse-test-plugin</packaging>
   <properties>
     <defaultSigning-excludeInnerJars>true</defaultSigning-excludeInnerJars>
     <!-- Necessary for leakTests to succeed without raising module/classloader issues on Java 9+ -->
-    <leakTestsArgLine>--add-modules ALL-SYSTEM --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens jdk.localedata/sun.util.resources.cldr.provider=ALL-UNNAMED --add-opens jdk.localedata/sun.util.resources.provider=ALL-UNNAMED --add-opens java.base/jdk.internal.module=ALL-UNNAMED --add-opens java.base/java.lang.module=ALL-UNNAMED --add-opens java.base/jdk.internal.reflect=ALL-UNNAMED --add-opens java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/jdk.internal.math=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens java.base/jdk.internal.icu.impl=ALL-UNNAMED --add-opens java.base/jdk.internal.icu.text=ALL-UNNAMED --illegal-access=permit</leakTestsArgLine>
+    <leakTestsArgLine>--add-modules ALL-SYSTEM --add-opens jdk.localedata/sun.util.resources.cldr.provider=ALL-UNNAMED --add-opens jdk.localedata/sun.util.resources.provider=ALL-UNNAMED --add-opens java.base/com.sun.crypto.provider=ALL-UNNAMED --add-opens java.base/com.sun.security.ntlm=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.annotation=ALL-UNNAMED --add-opens java.base/java.lang.constant=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.lang.module=ALL-UNNAMED --add-opens java.base/java.lang.ref=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.lang.runtime=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.net.spi=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.nio.channels=ALL-UNNAMED --add-opens java.base/java.nio.channels.spi=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/java.nio.charset.spi=ALL-UNNAMED --add-opens java.base/java.nio.file=ALL-UNNAMED --add-opens java.base/java.nio.file.attribute=ALL-UNNAMED --add-opens java.base/java.nio.file.spi=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.security.cert=ALL-UNNAMED --add-opens java.base/java.security.interfaces=ALL-UNNAMED --add-opens java.base/java.security.spec=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.base/java.text.spi=ALL-UNNAMED --add-opens java.base/java.time=ALL-UNNAMED --add-opens java.base/java.time.chrono=ALL-UNNAMED --add-opens java.base/java.time.format=ALL-UNNAMED --add-opens java.base/java.time.temporal=ALL-UNNAMED --add-opens java.base/java.time.zone=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens java.base/java.util.concurrent.locks=ALL-UNNAMED --add-opens java.base/java.util.function=ALL-UNNAMED --add-opens java.base/java.util.jar=ALL-UNNAMED --add-opens java.base/java.util.random=ALL-UNNAMED --add-opens java.base/java.util.regex=ALL-UNNAMED --add-opens java.base/java.util.spi=ALL-UNNAMED --add-opens java.base/java.util.stream=ALL-UNNAMED --add-opens java.base/java.util.zip=ALL-UNNAMED --add-opens java.base/javax.crypto=ALL-UNNAMED --add-opens java.base/javax.crypto.interfaces=ALL-UNNAMED --add-opens java.base/javax.crypto.spec=ALL-UNNAMED --add-opens java.base/javax.net=ALL-UNNAMED --add-opens java.base/javax.net.ssl=ALL-UNNAMED --add-opens java.base/javax.security.auth=ALL-UNNAMED --add-opens java.base/javax.security.auth.callback=ALL-UNNAMED --add-opens java.base/javax.security.auth.login=ALL-UNNAMED --add-opens java.base/javax.security.auth.spi=ALL-UNNAMED --add-opens java.base/javax.security.auth.x500=ALL-UNNAMED --add-opens java.base/javax.security.cert=ALL-UNNAMED --add-opens java.base/jdk.internal=ALL-UNNAMED --add-opens java.base/jdk.internal.access=ALL-UNNAMED --add-opens java.base/jdk.internal.access.foreign=ALL-UNNAMED --add-opens java.base/jdk.internal.event=ALL-UNNAMED --add-opens java.base/jdk.internal.icu.impl=ALL-UNNAMED --add-opens java.base/jdk.internal.icu.impl.data.icudt67b=ALL-UNNAMED --add-opens java.base/jdk.internal.icu.lang=ALL-UNNAMED --add-opens java.base/jdk.internal.icu.text=ALL-UNNAMED --add-opens java.base/jdk.internal.icu.util=ALL-UNNAMED --add-opens java.base/jdk.internal.invoke=ALL-UNNAMED --add-opens java.base/jdk.internal.javac=ALL-UNNAMED --add-opens java.base/jdk.internal.jimage=ALL-UNNAMED --add-opens java.base/jdk.internal.jimage.decompressor=ALL-UNNAMED --add-opens java.base/jdk.internal.jmod=ALL-UNNAMED --add-opens java.base/jdk.internal.jrtfs=ALL-UNNAMED --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens java.base/jdk.internal.logger=ALL-UNNAMED --add-opens java.base/jdk.internal.math=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens java.base/jdk.internal.module=ALL-UNNAMED --add-opens java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED --add-opens java.base/jdk.internal.org.objectweb.asm.commons=ALL-UNNAMED --add-opens java.base/jdk.internal.org.objectweb.asm.signature=ALL-UNNAMED --add-opens java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED --add-opens java.base/jdk.internal.org.objectweb.asm.tree.analysis=ALL-UNNAMED --add-opens java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED --add-opens java.base/jdk.internal.org.xml.sax=ALL-UNNAMED --add-opens java.base/jdk.internal.org.xml.sax.helpers=ALL-UNNAMED --add-opens java.base/jdk.internal.perf=ALL-UNNAMED --add-opens java.base/jdk.internal.platform=ALL-UNNAMED --add-opens java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/jdk.internal.reflect=ALL-UNNAMED --add-opens java.base/jdk.internal.util=ALL-UNNAMED --add-opens java.base/jdk.internal.util.jar=ALL-UNNAMED --add-opens java.base/jdk.internal.util.random=ALL-UNNAMED --add-opens java.base/jdk.internal.util.xml=ALL-UNNAMED --add-opens java.base/jdk.internal.util.xml.impl=ALL-UNNAMED --add-opens java.base/jdk.internal.vm=ALL-UNNAMED --add-opens java.base/jdk.internal.vm.annotation=ALL-UNNAMED --add-opens java.base/jdk.internal.vm.vector=ALL-UNNAMED --add-opens java.base/sun.invoke=ALL-UNNAMED --add-opens java.base/sun.invoke.empty=ALL-UNNAMED --add-opens java.base/sun.invoke.util=ALL-UNNAMED --add-opens java.base/sun.io=ALL-UNNAMED --add-opens java.base/sun.launcher=ALL-UNNAMED --add-opens java.base/sun.launcher.resources=ALL-UNNAMED --add-opens java.base/sun.net=ALL-UNNAMED --add-opens java.base/sun.net.dns=ALL-UNNAMED --add-opens java.base/sun.net.ext=ALL-UNNAMED --add-opens java.base/sun.net.ftp=ALL-UNNAMED --add-opens java.base/sun.net.ftp.impl=ALL-UNNAMED --add-opens java.base/sun.net.idn=ALL-UNNAMED --add-opens java.base/sun.net.sdp=ALL-UNNAMED --add-opens java.base/sun.net.smtp=ALL-UNNAMED --add-opens java.base/sun.net.spi=ALL-UNNAMED --add-opens java.base/sun.net.util=ALL-UNNAMED --add-opens java.base/sun.net.www=ALL-UNNAMED --add-opens java.base/sun.net.www.content.text=ALL-UNNAMED --add-opens java.base/sun.net.www.http=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.file=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.ftp=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.http.ntlm=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.jmod=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.jrt=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.mailto=ALL-UNNAMED --add-opens java.base/sun.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/sun.nio.cs=ALL-UNNAMED --add-opens java.base/sun.nio.fs=ALL-UNNAMED --add-opens java.base/sun.reflect.annotation=ALL-UNNAMED --add-opens java.base/sun.reflect.generics.factory=ALL-UNNAMED --add-opens java.base/sun.reflect.generics.parser=ALL-UNNAMED --add-opens java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED --add-opens java.base/sun.reflect.generics.repository=ALL-UNNAMED --add-opens java.base/sun.reflect.generics.scope=ALL-UNNAMED --add-opens java.base/sun.reflect.generics.tree=ALL-UNNAMED --add-opens java.base/sun.reflect.generics.visitor=ALL-UNNAMED --add-opens java.base/sun.reflect.misc=ALL-UNNAMED --add-opens java.base/sun.security.action=ALL-UNNAMED --add-opens java.base/sun.security.internal.interfaces=ALL-UNNAMED --add-opens java.base/sun.security.internal.spec=ALL-UNNAMED --add-opens java.base/sun.security.jca=ALL-UNNAMED --add-opens java.base/sun.security.pkcs=ALL-UNNAMED --add-opens java.base/sun.security.pkcs10=ALL-UNNAMED --add-opens java.base/sun.security.pkcs12=ALL-UNNAMED --add-opens java.base/sun.security.provider=ALL-UNNAMED --add-opens java.base/sun.security.provider.certpath=ALL-UNNAMED --add-opens java.base/sun.security.provider.certpath.ssl=ALL-UNNAMED --add-opens java.base/sun.security.rsa=ALL-UNNAMED --add-opens java.base/sun.security.ssl=ALL-UNNAMED --add-opens java.base/sun.security.timestamp=ALL-UNNAMED --add-opens java.base/sun.security.tools=ALL-UNNAMED --add-opens java.base/sun.security.tools.keytool=ALL-UNNAMED --add-opens java.base/sun.security.util=ALL-UNNAMED --add-opens java.base/sun.security.util.math=ALL-UNNAMED --add-opens java.base/sun.security.util.math.intpoly=ALL-UNNAMED --add-opens java.base/sun.security.validator=ALL-UNNAMED --add-opens java.base/sun.security.x509=ALL-UNNAMED --add-opens java.base/sun.text=ALL-UNNAMED --add-opens java.base/sun.text.resources=ALL-UNNAMED --add-opens java.base/sun.text.resources.cldr=ALL-UNNAMED --add-opens java.base/sun.text.spi=ALL-UNNAMED --add-opens java.base/sun.util=ALL-UNNAMED --add-opens java.base/sun.util.calendar=ALL-UNNAMED --add-opens java.base/sun.util.cldr=ALL-UNNAMED --add-opens java.base/sun.util.locale=ALL-UNNAMED --add-opens java.base/sun.util.locale.provider=ALL-UNNAMED --add-opens java.base/sun.util.logging=ALL-UNNAMED --add-opens java.base/sun.util.resources=ALL-UNNAMED --add-opens java.base/sun.util.resources.cldr=ALL-UNNAMED --add-opens java.base/sun.util.spi=ALL-UNNAMED --add-opens java.xml/com.sun.java_cup.internal.runtime=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.bcel.internal=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.bcel.internal.classfile=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.bcel.internal.generic=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.bcel.internal.util=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xalan.internal.extensions=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xalan.internal.lib=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xalan.internal.res=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xalan.internal.templates=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xalan.internal.utils=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xalan.internal.xsltc=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.util=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xalan.internal.xsltc.dom=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xalan.internal.xsltc.runtime=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xalan.internal.xsltc.runtime.output=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xalan.internal.xsltc.trax=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xalan.internal.xsltc.util=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.dom.events=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.dtd=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.dtd.models=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.dv=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.dv.dtd=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.dv.util=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.dv.xs=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.io=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.msg=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.validation=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.xpath=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.xpath.regex=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.xs=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.xs.identity=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.xs.models=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.xs.opti=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.impl.xs.util=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.jaxp=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.jaxp.datatype=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.jaxp.validation=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.parsers=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.utils=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.xinclude=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.xni=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.xni.grammars=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.xni.parser=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.xpointer=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.xs=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xerces.internal.xs.datatypes=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xml.internal.dtm=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xml.internal.dtm.ref=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xml.internal.dtm.ref.dom2dtm=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xml.internal.dtm.ref.sax2dtm=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xml.internal.res=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xml.internal.serialize=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xml.internal.serializer=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xml.internal.serializer.dom3=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xml.internal.serializer.utils=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xml.internal.utils=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xml.internal.utils.res=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xpath.internal=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xpath.internal.axes=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xpath.internal.compiler=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xpath.internal.functions=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xpath.internal.jaxp=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xpath.internal.objects=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xpath.internal.operations=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xpath.internal.patterns=ALL-UNNAMED --add-opens java.xml/com.sun.org.apache.xpath.internal.res=ALL-UNNAMED --add-opens java.xml/com.sun.xml.internal.stream=ALL-UNNAMED --add-opens java.xml/com.sun.xml.internal.stream.dtd=ALL-UNNAMED --add-opens java.xml/com.sun.xml.internal.stream.dtd.nonvalidating=ALL-UNNAMED --add-opens java.xml/com.sun.xml.internal.stream.events=ALL-UNNAMED --add-opens java.xml/com.sun.xml.internal.stream.util=ALL-UNNAMED --add-opens java.xml/com.sun.xml.internal.stream.writers=ALL-UNNAMED --add-opens java.xml/javax.xml=ALL-UNNAMED --add-opens java.xml/javax.xml.catalog=ALL-UNNAMED --add-opens java.xml/javax.xml.datatype=ALL-UNNAMED --add-opens java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens java.xml/javax.xml.parsers=ALL-UNNAMED --add-opens java.xml/javax.xml.stream=ALL-UNNAMED --add-opens java.xml/javax.xml.stream.events=ALL-UNNAMED --add-opens java.xml/javax.xml.stream.util=ALL-UNNAMED --add-opens java.xml/javax.xml.transform=ALL-UNNAMED --add-opens java.xml/javax.xml.transform.dom=ALL-UNNAMED --add-opens java.xml/javax.xml.transform.sax=ALL-UNNAMED --add-opens java.xml/javax.xml.transform.stax=ALL-UNNAMED --add-opens java.xml/javax.xml.transform.stream=ALL-UNNAMED --add-opens java.xml/javax.xml.validation=ALL-UNNAMED --add-opens java.xml/javax.xml.xpath=ALL-UNNAMED --add-opens java.xml/jdk.xml.internal=ALL-UNNAMED --add-opens java.xml/org.w3c.dom=ALL-UNNAMED --add-opens java.xml/org.w3c.dom.bootstrap=ALL-UNNAMED --add-opens java.xml/org.w3c.dom.events=ALL-UNNAMED --add-opens java.xml/org.w3c.dom.ls=ALL-UNNAMED --add-opens java.xml/org.w3c.dom.ranges=ALL-UNNAMED --add-opens java.xml/org.w3c.dom.traversal=ALL-UNNAMED --add-opens java.xml/org.w3c.dom.views=ALL-UNNAMED --add-opens java.xml/org.xml.sax=ALL-UNNAMED --add-opens java.xml/org.xml.sax.ext=ALL-UNNAMED --add-opens java.xml/org.xml.sax.helpers=ALL-UNNAMED --add-opens java.desktop/com.sun.beans=ALL-UNNAMED --add-opens java.desktop/java.beans=ALL-UNNAMED --add-opens java.logging/java.util.logging=ALL-UNNAMED --add-opens java.management/com.sun.jmx.defaults=ALL-UNNAMED --add-opens java.management/com.sun.jmx.interceptor=ALL-UNNAMED --add-opens java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-opens java.management/com.sun.jmx.remote.internal=ALL-UNNAMED --add-opens java.management/com.sun.jmx.remote.security=ALL-UNNAMED --add-opens java.management/com.sun.jmx.remote.util=ALL-UNNAMED --add-opens java.management/java.lang.management=ALL-UNNAMED --add-opens java.management/javax.management=ALL-UNNAMED --add-opens java.management/javax.management.loading=ALL-UNNAMED --add-opens java.management/javax.management.modelmbean=ALL-UNNAMED --add-opens java.management/javax.management.monitor=ALL-UNNAMED --add-opens java.management/javax.management.openmbean=ALL-UNNAMED --add-opens java.management/javax.management.relation=ALL-UNNAMED --add-opens java.management/javax.management.remote=ALL-UNNAMED --add-opens java.management/javax.management.timer=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens java.management/sun.management.counter=ALL-UNNAMED --add-opens java.management/sun.management.counter.perf=ALL-UNNAMED --add-opens java.management/sun.management.spi=ALL-UNNAMED --add-opens jdk.management/com.sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED --illegal-access=permit</leakTestsArgLine>
   </properties>
 
   <build>
diff --git a/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/JavaProjectHelper.java b/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/JavaProjectHelper.java
index a5966fd..f91edad 100644
--- a/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/JavaProjectHelper.java
+++ b/org.eclipse.jdt.ui.tests/test plugin/org/eclipse/jdt/testplugin/JavaProjectHelper.java
@@ -105,6 +105,7 @@
 	public static final IPath RT_STUBS14= new Path("testresources/rtstubs14.jar");
 	public static final IPath RT_STUBS15= new Path("testresources/rtstubs_15.jar");
 	public static final IPath RT_STUBS16= new Path("testresources/rtstubs_16.jar");
+	public static final IPath RT_STUBS17= new Path("testresources/rtstubs_17.jar");
 	public static final IPath JUNIT_SRC_381= new Path("testresources/junit381-noUI-src.zip");
 	public static final String JUNIT_SRC_ENCODING= "ISO-8859-1";
 
@@ -314,7 +315,7 @@
 	}
 
 	/**
-	 * Sets the compiler options to 15 for the given project.
+	 * Sets the compiler options to 16 for the given project.
 	 *
 	 * @param project the java project
 	 * @param enable_preview_feature sets enable-preview compliance project option based on the
@@ -331,6 +332,23 @@
 	}
 
 	/**
+	 * Sets the compiler options to 17 for the given project.
+	 *
+	 * @param project the java project
+	 * @param enable_preview_feature sets enable-preview compliance project option based on the
+	 *            value specified.
+	 */
+	public static void set17CompilerOptions(IJavaProject project, boolean enable_preview_feature) {
+		Map<String, String> options= project.getOptions(false);
+		set17_CompilerOptions(options);
+		if (enable_preview_feature) {
+			options.put(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+			options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
+		}
+		project.setOptions(options);
+	}
+
+	/**
 	 * Sets the compiler options to 1.8 for the given project.
 	 *
 	 * @param project the java project
@@ -456,6 +474,15 @@
 	}
 
 	/**
+	 * Sets the compiler options to 17.
+	 *
+	 * @param options the compiler options to configure
+	 */
+	public static void set17_CompilerOptions(Map<String, String> options) {
+		JavaCore.setComplianceOptions(JavaCore.VERSION_17, options);
+	}
+
+	/**
 	 * Sets the compiler options to 1.8
 	 *
 	 * @param options the compiler options to configure
diff --git a/org.eclipse.jdt.ui.tests/test.xml b/org.eclipse.jdt.ui.tests/test.xml
index 1040e12..9206c30 100644
--- a/org.eclipse.jdt.ui.tests/test.xml
+++ b/org.eclipse.jdt.ui.tests/test.xml
@@ -44,15 +44,320 @@
     <property name="jdt-folder" value="${eclipse-home}/jdt_folder"/>
 
     <delete dir="${jdt-folder}" quiet="true"/>
-    <condition property="java9vmargs" value="--add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens jdk.localedata/sun.util.resources.cldr.provider=ALL-UNNAMED --add-opens jdk.localedata/sun.util.resources.provider=ALL-UNNAMED --add-opens java.base/jdk.internal.module=ALL-UNNAMED --add-opens java.base/java.lang.module=ALL-UNNAMED --add-opens java.base/jdk.internal.reflect=ALL-UNNAMED --add-opens java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/jdk.internal.math=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens java.base/jdk.internal.icu.impl=ALL-UNNAMED --add-opens java.base/jdk.internal.icu.text=ALL-UNNAMED --illegal-access=permit" else="">
+  	
+  	<condition property="java9vmargs" value="--add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens jdk.localedata/sun.util.resources.cldr.provider=ALL-UNNAMED --add-opens jdk.localedata/sun.util.resources.provider=ALL-UNNAMED --add-opens java.base/jdk.internal.module=ALL-UNNAMED --add-opens java.base/java.lang.module=ALL-UNNAMED --add-opens java.base/jdk.internal.reflect=ALL-UNNAMED --add-opens java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/jdk.internal.math=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens java.base/jdk.internal.icu.impl=ALL-UNNAMED --add-opens java.base/jdk.internal.icu.text=ALL-UNNAMED --illegal-access=permit" else="">
     	<javaversion atleast="9"/>
     </condition>
+  	
+    <condition property="javavmargs" value="
+    	--add-modules ALL-SYSTEM
+    	--add-opens jdk.localedata/sun.util.resources.cldr.provider=ALL-UNNAMED
+    	--add-opens jdk.localedata/sun.util.resources.provider=ALL-UNNAMED
+    	--add-opens java.base/com.sun.crypto.provider=ALL-UNNAMED
+    	--add-opens java.base/com.sun.security.ntlm=ALL-UNNAMED
+    	--add-opens java.base/java.io=ALL-UNNAMED
+    	--add-opens java.base/java.lang=ALL-UNNAMED
+    	--add-opens java.base/java.lang.annotation=ALL-UNNAMED
+    	--add-opens java.base/java.lang.constant=ALL-UNNAMED
+    	--add-opens java.base/java.lang.invoke=ALL-UNNAMED
+    	--add-opens java.base/java.lang.module=ALL-UNNAMED
+    	--add-opens java.base/java.lang.ref=ALL-UNNAMED
+    	--add-opens java.base/java.lang.reflect=ALL-UNNAMED
+    	--add-opens java.base/java.lang.runtime=ALL-UNNAMED
+    	--add-opens java.base/java.math=ALL-UNNAMED
+    	--add-opens java.base/java.net=ALL-UNNAMED
+    	--add-opens java.base/java.net.spi=ALL-UNNAMED
+    	--add-opens java.base/java.nio=ALL-UNNAMED
+    	--add-opens java.base/java.nio.channels=ALL-UNNAMED
+    	--add-opens java.base/java.nio.channels.spi=ALL-UNNAMED
+    	--add-opens java.base/java.nio.charset=ALL-UNNAMED
+    	--add-opens java.base/java.nio.charset.spi=ALL-UNNAMED
+    	--add-opens java.base/java.nio.file=ALL-UNNAMED
+    	--add-opens java.base/java.nio.file.attribute=ALL-UNNAMED
+    	--add-opens java.base/java.nio.file.spi=ALL-UNNAMED
+    	--add-opens java.base/java.security=ALL-UNNAMED
+    	--add-opens java.base/java.security.cert=ALL-UNNAMED
+    	--add-opens java.base/java.security.interfaces=ALL-UNNAMED
+    	--add-opens java.base/java.security.spec=ALL-UNNAMED
+    	--add-opens java.base/java.text=ALL-UNNAMED
+    	--add-opens java.base/java.text.spi=ALL-UNNAMED
+    	--add-opens java.base/java.time=ALL-UNNAMED
+    	--add-opens java.base/java.time.chrono=ALL-UNNAMED
+    	--add-opens java.base/java.time.format=ALL-UNNAMED
+    	--add-opens java.base/java.time.temporal=ALL-UNNAMED
+    	--add-opens java.base/java.time.zone=ALL-UNNAMED
+    	--add-opens java.base/java.util=ALL-UNNAMED
+    	--add-opens java.base/java.util.concurrent=ALL-UNNAMED
+    	--add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED
+    	--add-opens java.base/java.util.concurrent.locks=ALL-UNNAMED
+    	--add-opens java.base/java.util.function=ALL-UNNAMED
+    	--add-opens java.base/java.util.jar=ALL-UNNAMED
+    	--add-opens java.base/java.util.random=ALL-UNNAMED
+    	--add-opens java.base/java.util.regex=ALL-UNNAMED
+    	--add-opens java.base/java.util.spi=ALL-UNNAMED
+    	--add-opens java.base/java.util.stream=ALL-UNNAMED
+    	--add-opens java.base/java.util.zip=ALL-UNNAMED
+    	--add-opens java.base/javax.crypto=ALL-UNNAMED
+    	--add-opens java.base/javax.crypto.interfaces=ALL-UNNAMED
+    	--add-opens java.base/javax.crypto.spec=ALL-UNNAMED
+    	--add-opens java.base/javax.net=ALL-UNNAMED
+    	--add-opens java.base/javax.net.ssl=ALL-UNNAMED
+    	--add-opens java.base/javax.security.auth=ALL-UNNAMED
+    	--add-opens java.base/javax.security.auth.callback=ALL-UNNAMED
+    	--add-opens java.base/javax.security.auth.login=ALL-UNNAMED
+    	--add-opens java.base/javax.security.auth.spi=ALL-UNNAMED
+    	--add-opens java.base/javax.security.auth.x500=ALL-UNNAMED
+    	--add-opens java.base/javax.security.cert=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.access=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.access.foreign=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.event=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.icu.impl=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.icu.impl.data.icudt67b=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.icu.lang=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.icu.text=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.icu.util=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.invoke=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.javac=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.jimage=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.jimage.decompressor=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.jmod=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.jrtfs=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.loader=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.logger=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.math=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.misc=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.module=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.org.objectweb.asm.commons=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.org.objectweb.asm.signature=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.org.objectweb.asm.tree.analysis=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.org.xml.sax=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.org.xml.sax.helpers=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.perf=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.platform=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.ref=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.util=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.util.jar=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.util.random=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.util.xml=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.util.xml.impl=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.vm=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.vm.annotation=ALL-UNNAMED
+    	--add-opens java.base/jdk.internal.vm.vector=ALL-UNNAMED
+    	--add-opens java.base/sun.invoke=ALL-UNNAMED
+    	--add-opens java.base/sun.invoke.empty=ALL-UNNAMED
+    	--add-opens java.base/sun.invoke.util=ALL-UNNAMED
+    	--add-opens java.base/sun.io=ALL-UNNAMED
+    	--add-opens java.base/sun.launcher=ALL-UNNAMED
+    	--add-opens java.base/sun.launcher.resources=ALL-UNNAMED
+    	--add-opens java.base/sun.net=ALL-UNNAMED
+    	--add-opens java.base/sun.net.dns=ALL-UNNAMED
+    	--add-opens java.base/sun.net.ext=ALL-UNNAMED
+    	--add-opens java.base/sun.net.ftp=ALL-UNNAMED
+    	--add-opens java.base/sun.net.ftp.impl=ALL-UNNAMED
+    	--add-opens java.base/sun.net.idn=ALL-UNNAMED
+    	--add-opens java.base/sun.net.sdp=ALL-UNNAMED
+    	--add-opens java.base/sun.net.smtp=ALL-UNNAMED
+    	--add-opens java.base/sun.net.spi=ALL-UNNAMED
+    	--add-opens java.base/sun.net.util=ALL-UNNAMED
+    	--add-opens java.base/sun.net.www=ALL-UNNAMED
+    	--add-opens java.base/sun.net.www.content.text=ALL-UNNAMED
+    	--add-opens java.base/sun.net.www.http=ALL-UNNAMED
+    	--add-opens java.base/sun.net.www.protocol.file=ALL-UNNAMED
+    	--add-opens java.base/sun.net.www.protocol.ftp=ALL-UNNAMED
+    	--add-opens java.base/sun.net.www.protocol.http=ALL-UNNAMED
+    	--add-opens java.base/sun.net.www.protocol.http.ntlm=ALL-UNNAMED
+    	--add-opens java.base/sun.net.www.protocol.https=ALL-UNNAMED
+    	--add-opens java.base/sun.net.www.protocol.jar=ALL-UNNAMED
+    	--add-opens java.base/sun.net.www.protocol.jmod=ALL-UNNAMED
+    	--add-opens java.base/sun.net.www.protocol.jrt=ALL-UNNAMED
+    	--add-opens java.base/sun.net.www.protocol.mailto=ALL-UNNAMED
+    	--add-opens java.base/sun.nio=ALL-UNNAMED
+    	--add-opens java.base/sun.nio.ch=ALL-UNNAMED
+    	--add-opens java.base/sun.nio.cs=ALL-UNNAMED
+    	--add-opens java.base/sun.nio.fs=ALL-UNNAMED
+    	--add-opens java.base/sun.reflect.annotation=ALL-UNNAMED
+    	--add-opens java.base/sun.reflect.generics.factory=ALL-UNNAMED
+    	--add-opens java.base/sun.reflect.generics.parser=ALL-UNNAMED
+    	--add-opens java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED
+    	--add-opens java.base/sun.reflect.generics.repository=ALL-UNNAMED
+    	--add-opens java.base/sun.reflect.generics.scope=ALL-UNNAMED
+    	--add-opens java.base/sun.reflect.generics.tree=ALL-UNNAMED
+    	--add-opens java.base/sun.reflect.generics.visitor=ALL-UNNAMED
+    	--add-opens java.base/sun.reflect.misc=ALL-UNNAMED
+    	--add-opens java.base/sun.security.action=ALL-UNNAMED
+    	--add-opens java.base/sun.security.internal.interfaces=ALL-UNNAMED
+    	--add-opens java.base/sun.security.internal.spec=ALL-UNNAMED
+    	--add-opens java.base/sun.security.jca=ALL-UNNAMED
+    	--add-opens java.base/sun.security.pkcs=ALL-UNNAMED
+    	--add-opens java.base/sun.security.pkcs10=ALL-UNNAMED
+    	--add-opens java.base/sun.security.pkcs12=ALL-UNNAMED
+    	--add-opens java.base/sun.security.provider=ALL-UNNAMED
+    	--add-opens java.base/sun.security.provider.certpath=ALL-UNNAMED
+    	--add-opens java.base/sun.security.provider.certpath.ssl=ALL-UNNAMED
+    	--add-opens java.base/sun.security.rsa=ALL-UNNAMED
+    	--add-opens java.base/sun.security.ssl=ALL-UNNAMED
+    	--add-opens java.base/sun.security.timestamp=ALL-UNNAMED
+    	--add-opens java.base/sun.security.tools=ALL-UNNAMED
+    	--add-opens java.base/sun.security.tools.keytool=ALL-UNNAMED
+    	--add-opens java.base/sun.security.util=ALL-UNNAMED
+    	--add-opens java.base/sun.security.util.math=ALL-UNNAMED
+    	--add-opens java.base/sun.security.util.math.intpoly=ALL-UNNAMED
+    	--add-opens java.base/sun.security.validator=ALL-UNNAMED
+    	--add-opens java.base/sun.security.x509=ALL-UNNAMED
+    	--add-opens java.base/sun.text=ALL-UNNAMED
+    	--add-opens java.base/sun.text.resources=ALL-UNNAMED
+    	--add-opens java.base/sun.text.resources.cldr=ALL-UNNAMED
+    	--add-opens java.base/sun.text.spi=ALL-UNNAMED
+    	--add-opens java.base/sun.util=ALL-UNNAMED
+    	--add-opens java.base/sun.util.calendar=ALL-UNNAMED
+    	--add-opens java.base/sun.util.cldr=ALL-UNNAMED
+    	--add-opens java.base/sun.util.locale=ALL-UNNAMED
+    	--add-opens java.base/sun.util.locale.provider=ALL-UNNAMED
+    	--add-opens java.base/sun.util.logging=ALL-UNNAMED
+    	--add-opens java.base/sun.util.resources=ALL-UNNAMED
+    	--add-opens java.base/sun.util.resources.cldr=ALL-UNNAMED
+    	--add-opens java.base/sun.util.spi=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.java_cup.internal.runtime=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.bcel.internal=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.bcel.internal.classfile=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.bcel.internal.generic=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.bcel.internal.util=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xalan.internal.extensions=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xalan.internal.lib=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xalan.internal.res=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xalan.internal.templates=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xalan.internal.utils=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xalan.internal.xsltc=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.util=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xalan.internal.xsltc.dom=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xalan.internal.xsltc.runtime=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xalan.internal.xsltc.runtime.output=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xalan.internal.xsltc.trax=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xalan.internal.xsltc.util=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.dom.events=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.dtd=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.dtd.models=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.dv=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.dv.dtd=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.dv.util=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.dv.xs=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.io=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.msg=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.validation=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.xpath=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.xpath.regex=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.xs=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.xs.identity=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.xs.models=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.xs.opti=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.impl.xs.util=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.jaxp=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.jaxp.datatype=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.jaxp.validation=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.parsers=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.utils=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.xinclude=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.xni=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.xni.grammars=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.xni.parser=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.xpointer=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.xs=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xerces.internal.xs.datatypes=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xml.internal.dtm=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xml.internal.dtm.ref=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xml.internal.dtm.ref.dom2dtm=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xml.internal.dtm.ref.sax2dtm=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xml.internal.res=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xml.internal.serialize=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xml.internal.serializer=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xml.internal.serializer.dom3=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xml.internal.serializer.utils=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xml.internal.utils=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xml.internal.utils.res=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xpath.internal=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xpath.internal.axes=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xpath.internal.compiler=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xpath.internal.functions=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xpath.internal.jaxp=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xpath.internal.objects=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xpath.internal.operations=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xpath.internal.patterns=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.org.apache.xpath.internal.res=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.xml.internal.stream=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.xml.internal.stream.dtd=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.xml.internal.stream.dtd.nonvalidating=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.xml.internal.stream.events=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.xml.internal.stream.util=ALL-UNNAMED
+    	--add-opens java.xml/com.sun.xml.internal.stream.writers=ALL-UNNAMED
+    	--add-opens java.xml/javax.xml=ALL-UNNAMED
+    	--add-opens java.xml/javax.xml.catalog=ALL-UNNAMED
+    	--add-opens java.xml/javax.xml.datatype=ALL-UNNAMED
+    	--add-opens java.xml/javax.xml.namespace=ALL-UNNAMED
+    	--add-opens java.xml/javax.xml.parsers=ALL-UNNAMED
+    	--add-opens java.xml/javax.xml.stream=ALL-UNNAMED
+    	--add-opens java.xml/javax.xml.stream.events=ALL-UNNAMED
+    	--add-opens java.xml/javax.xml.stream.util=ALL-UNNAMED
+    	--add-opens java.xml/javax.xml.transform=ALL-UNNAMED
+    	--add-opens java.xml/javax.xml.transform.dom=ALL-UNNAMED
+    	--add-opens java.xml/javax.xml.transform.sax=ALL-UNNAMED
+    	--add-opens java.xml/javax.xml.transform.stax=ALL-UNNAMED
+    	--add-opens java.xml/javax.xml.transform.stream=ALL-UNNAMED
+    	--add-opens java.xml/javax.xml.validation=ALL-UNNAMED
+    	--add-opens java.xml/javax.xml.xpath=ALL-UNNAMED
+    	--add-opens java.xml/jdk.xml.internal=ALL-UNNAMED
+    	--add-opens java.xml/org.w3c.dom=ALL-UNNAMED
+    	--add-opens java.xml/org.w3c.dom.bootstrap=ALL-UNNAMED
+    	--add-opens java.xml/org.w3c.dom.events=ALL-UNNAMED
+    	--add-opens java.xml/org.w3c.dom.ls=ALL-UNNAMED
+    	--add-opens java.xml/org.w3c.dom.ranges=ALL-UNNAMED
+    	--add-opens java.xml/org.w3c.dom.traversal=ALL-UNNAMED
+    	--add-opens java.xml/org.w3c.dom.views=ALL-UNNAMED
+    	--add-opens java.xml/org.xml.sax=ALL-UNNAMED
+    	--add-opens java.xml/org.xml.sax.ext=ALL-UNNAMED
+    	--add-opens java.xml/org.xml.sax.helpers=ALL-UNNAMED
+    	--add-opens java.desktop/com.sun.beans=ALL-UNNAMED
+    	--add-opens java.desktop/java.beans=ALL-UNNAMED
+    	--add-opens java.logging/java.util.logging=ALL-UNNAMED
+    	--add-opens java.management/com.sun.jmx.defaults=ALL-UNNAMED
+    	--add-opens java.management/com.sun.jmx.interceptor=ALL-UNNAMED
+    	--add-opens java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED
+    	--add-opens java.management/com.sun.jmx.remote.internal=ALL-UNNAMED
+    	--add-opens java.management/com.sun.jmx.remote.security=ALL-UNNAMED
+    	--add-opens java.management/com.sun.jmx.remote.util=ALL-UNNAMED
+    	--add-opens java.management/java.lang.management=ALL-UNNAMED
+    	--add-opens java.management/javax.management=ALL-UNNAMED
+    	--add-opens java.management/javax.management.loading=ALL-UNNAMED
+    	--add-opens java.management/javax.management.modelmbean=ALL-UNNAMED
+    	--add-opens java.management/javax.management.monitor=ALL-UNNAMED
+    	--add-opens java.management/javax.management.openmbean=ALL-UNNAMED
+    	--add-opens java.management/javax.management.relation=ALL-UNNAMED
+    	--add-opens java.management/javax.management.remote=ALL-UNNAMED
+    	--add-opens java.management/javax.management.timer=ALL-UNNAMED
+    	--add-opens java.management/sun.management=ALL-UNNAMED
+    	--add-opens java.management/sun.management.counter=ALL-UNNAMED
+    	--add-opens java.management/sun.management.counter.perf=ALL-UNNAMED
+    	--add-opens java.management/sun.management.spi=ALL-UNNAMED
+    	--add-opens jdk.management/com.sun.management=ALL-UNNAMED
+    	--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED
+    	" else="${java9vmargs}">
+    	<javaversion atleast="17"/>
+    </condition>
     
 	<ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
       <property name="data-dir" value="${jdt-folder}"/>
       <property name="plugin-name" value="${plugin-name}"/>
       <property name="classname" value="org.eclipse.jdt.ui.tests.LeakTestSuite"/>
-      <property name="vmargs" value="${java9vmargs}" />
+      <property name="vmargs" value="${javavmargs}" />
     </ant>
   </target>
   
diff --git a/org.eclipse.jdt.ui.tests/testresources/rtstubs_17.jar b/org.eclipse.jdt.ui.tests/testresources/rtstubs_17.jar
new file mode 100644
index 0000000..fb6cb93
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests/testresources/rtstubs_17.jar
Binary files differ
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/HierarchicalASTVisitorTest.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/HierarchicalASTVisitorTest.java
index 00d3132..cc63bec 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/HierarchicalASTVisitorTest.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/HierarchicalASTVisitorTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -39,6 +39,7 @@
 import org.eclipse.jdt.core.dom.ModuleDirective;
 import org.eclipse.jdt.core.dom.ModulePackageAccess;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.Pattern;
 import org.eclipse.jdt.core.dom.Statement;
 import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.VariableDeclaration;
@@ -255,6 +256,23 @@
 			super.visit(node);
 		}
 
+		@Override
+		public boolean visit(Pattern node) {
+			registerCall(Pattern.class);
+			return false;
+		}
+		@SuppressWarnings("unused") // called reflectively
+		public void superVisit(Pattern node) {
+			super.visit(node);
+		}
+		@Override
+		public void endVisit(Pattern node) {
+			registerCall(Pattern.class);
+		}
+		@SuppressWarnings("unused") // called reflectively
+		public void superEndVisit(Pattern node) {
+			super.visit(node);
+		}
 
 		@Override
 		public boolean visit(Statement node) {
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/rules/Java17ProjectTestSetup.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/rules/Java17ProjectTestSetup.java
new file mode 100644
index 0000000..05574b2
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/rules/Java17ProjectTestSetup.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2020 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * derived from corresponding file in org.eclipse.jdt.ui.tests.core
+ * instead extending TestSetup for junit4 ExternalResource is extended
+ * to allow use as junit "@Rule"
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.ui.tests.core.rules;
+
+import org.eclipse.jdt.testplugin.JavaProjectHelper;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+
+import org.eclipse.jdt.internal.core.ClasspathEntry;
+
+public class Java17ProjectTestSetup extends ProjectTestSetup {
+
+	public static final String PROJECT_NAME17= "TestSetupProject17";
+
+	private boolean enable_preview_feature;
+
+	@Override
+	public IJavaProject getProject() {
+		IProject project= ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME17);
+		return JavaCore.create(project);
+	}
+
+	@Override
+	public IClasspathEntry[] getDefaultClasspath() throws CoreException {
+		IPath[] rtJarPath= JavaProjectHelper.findRtJar(JavaProjectHelper.RT_STUBS17);
+		IClasspathAttribute[] extraAttributes= { JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, Boolean.TRUE.toString()) };
+		return new IClasspathEntry[] { JavaCore.newLibraryEntry(rtJarPath[0], rtJarPath[1], rtJarPath[2], ClasspathEntry.NO_ACCESS_RULES, extraAttributes, true) };
+	}
+
+	public Java17ProjectTestSetup( boolean enable_preview_feature) {
+		this.enable_preview_feature= enable_preview_feature;
+	}
+
+	@Override
+	protected boolean projectExists() {
+		return getProject().exists();
+	}
+
+	@Override
+	protected IJavaProject createAndInitializeProject() throws CoreException {
+		IJavaProject javaProject= JavaProjectHelper.createJavaProject(PROJECT_NAME17, "bin");
+		javaProject.setRawClasspath(getDefaultClasspath(), null);
+		JavaProjectHelper.set17CompilerOptions(javaProject, enable_preview_feature);
+		return javaProject;
+	}
+
+}
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/QuickFixTest17.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/QuickFixTest17.java
new file mode 100644
index 0000000..2302398
--- /dev/null
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/QuickFixTest17.java
@@ -0,0 +1,598 @@
+/*******************************************************************************
+ * Copyright (c) 2019, 2020 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.ui.tests.quickfix;
+
+import java.util.ArrayList;
+import java.util.Map;
+
+import org.junit.After;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.eclipse.jdt.testplugin.JavaProjectHelper;
+
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+
+import org.eclipse.jdt.ui.tests.core.rules.Java17ProjectTestSetup;
+import org.eclipse.jdt.ui.tests.core.rules.ProjectTestSetup;
+import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
+import org.eclipse.jdt.ui.text.java.correction.CUCorrectionProposal;
+
+public class QuickFixTest17 extends QuickFixTest {
+
+	@Rule
+	public ProjectTestSetup projectsetup= new Java17ProjectTestSetup(false);
+
+	private IJavaProject fJProject1;
+
+	private IPackageFragmentRoot fSourceFolder;
+
+	@After
+	public void tearDown() throws Exception {
+		if (fJProject1 != null) {
+			JavaProjectHelper.delete(fJProject1);
+		}
+	}
+
+	@Test
+	public void testAddSealedMissingClassModifierProposal() throws Exception {
+		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
+		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
+		JavaProjectHelper.set17CompilerOptions(fJProject1, false);
+
+		Map<String, String> options= fJProject1.getOptions(false);
+		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
+		fJProject1.setOptions(options);
+
+		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
+		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
+
+		String test= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed class Shape permits Square {}\n" +
+				"\n" +
+				"class Square extends Shape {}\n";
+		ICompilationUnit cu= pack1.createCompilationUnit("Shape.java", test, false, null);
+
+		CompilationUnit astRoot= getASTRoot(cu);
+		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu, astRoot, 1);
+		assertNumberOfProposals(proposals, 3);
+		assertCorrectLabels(proposals);
+
+		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
+		String preview1= getPreviewContent(proposal);
+
+		String expected1= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed class Shape permits Square {}\n" +
+				"\n" +
+				"final class Square extends Shape {}\n";
+
+		proposal= (CUCorrectionProposal) proposals.get(1);
+		String preview2= getPreviewContent(proposal);
+
+		String expected2= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed class Shape permits Square {}\n" +
+				"\n" +
+				"non-sealed class Square extends Shape {}\n";
+
+		proposal= (CUCorrectionProposal) proposals.get(2);
+		String preview3= getPreviewContent(proposal);
+
+		String expected3= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed class Shape permits Square {}\n" +
+				"\n" +
+				"sealed class Square extends Shape {}\n";
+
+		assertEqualStringsIgnoreOrder(new String[] { preview1, preview2, preview3 }, new String[] { expected1, expected2, expected3 });
+
+	}
+
+	@Test
+	public void testAddSealedMissingInterfaceModifierProposal() throws Exception {
+		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
+		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
+		JavaProjectHelper.set17CompilerOptions(fJProject1, false);
+
+		Map<String, String> options= fJProject1.getOptions(false);
+		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
+		fJProject1.setOptions(options);
+
+		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
+		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
+
+		String test= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed interface Shape permits Square {}\n" +
+				"\n" +
+				"interface Square extends Shape {}\n";
+		ICompilationUnit cu= pack1.createCompilationUnit("Shape.java", test, false, null);
+
+		CompilationUnit astRoot= getASTRoot(cu);
+		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu, astRoot, 1);
+		assertNumberOfProposals(proposals, 2);
+		assertCorrectLabels(proposals);
+
+		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
+		String preview1= getPreviewContent(proposal);
+
+		String expected1= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed interface Shape permits Square {}\n" +
+				"\n" +
+				"sealed interface Square extends Shape {}\n";
+
+		proposal= (CUCorrectionProposal) proposals.get(1);
+		String preview2= getPreviewContent(proposal);
+
+		String expected2= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed interface Shape permits Square {}\n" +
+				"\n" +
+				"non-sealed interface Square extends Shape {}\n";
+
+		assertEqualStringsIgnoreOrder(new String[] { preview1, preview2 }, new String[] { expected1, expected2 });
+
+	}
+
+	@Test
+	public void testAddSealedAsDirectSuperTypeProposal1() throws Exception {
+		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
+		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
+		JavaProjectHelper.set17CompilerOptions(fJProject1, true);
+
+		Map<String, String> options= fJProject1.getOptions(false);
+		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
+		fJProject1.setOptions(options);
+
+		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
+		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
+
+		String test= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed class Shape permits Square {\n" +
+				"}\n";
+		pack1.createCompilationUnit("Shape.java", test, false, null);
+
+		test= "" +
+				"package test;\n" +
+				"\n" +
+				"public non-sealed class Square extends Shape {\n" +
+				"}\n";
+		pack1.createCompilationUnit("Square.java", test, false, null);
+
+		test= "" +
+				"package test;\n" +
+				"\n" +
+				"public non-sealed class Circle extends Shape {\n" +
+				"}\n";
+		ICompilationUnit cu2= pack1.createCompilationUnit("Circle.java", test, false, null);
+
+		CompilationUnit astRoot= getASTRoot(cu2);
+		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu2, astRoot, 1);
+		assertNumberOfProposals(proposals, 1);
+		assertCorrectLabels(proposals);
+
+		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
+		String preview= getPreviewContent(proposal);
+
+		String expected= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed class Shape permits Square, Circle {\n" +
+				"}\n";
+
+		assertEqualString(preview, expected);
+	}
+
+	@Test
+	public void testAddSealedAsDirectSuperTypeProposal2() throws Exception {
+		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
+		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
+		JavaProjectHelper.set17CompilerOptions(fJProject1, true);
+
+		Map<String, String> options= fJProject1.getOptions(false);
+		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
+		fJProject1.setOptions(options);
+
+		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
+		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
+
+		String test= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed interface Shape permits Square {\n" +
+				"}\n";
+		pack1.createCompilationUnit("Shape.java", test, false, null);
+
+		test= "" +
+				"package test;\n" +
+				"\n" +
+				"public non-sealed class Square implements Shape {\n" +
+				"}\n";
+		pack1.createCompilationUnit("Square.java", test, false, null);
+
+		test= "" +
+				"package test;\n" +
+				"\n" +
+				"public non-sealed class Circle implements Shape {\n" +
+				"}\n";
+		ICompilationUnit cu2= pack1.createCompilationUnit("Circle.java", test, false, null);
+
+		CompilationUnit astRoot= getASTRoot(cu2);
+		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu2, astRoot, 1);
+		assertNumberOfProposals(proposals, 1);
+		assertCorrectLabels(proposals);
+
+		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
+		String preview= getPreviewContent(proposal);
+
+		String expected= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed interface Shape permits Square, Circle {\n" +
+				"}\n";
+
+		assertEqualString(preview, expected);
+	}
+
+	@Test
+	public void testAddSealedAsDirectSuperTypeProposal3() throws Exception {
+		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
+		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
+		JavaProjectHelper.set17CompilerOptions(fJProject1, true);
+
+		Map<String, String> options= fJProject1.getOptions(false);
+		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
+		fJProject1.setOptions(options);
+
+		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
+		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
+
+		String test= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed interface Shape permits Square {\n" +
+				"}\n";
+		pack1.createCompilationUnit("Shape.java", test, false, null);
+
+		test= "" +
+				"package test;\n" +
+				"\n" +
+				"public non-sealed class Square implements Shape {\n" +
+				"}\n";
+		pack1.createCompilationUnit("Square.java", test, false, null);
+
+		test= "" +
+				"package test;\n" +
+				"\n" +
+				"public non-sealed interface Circle extends Shape {\n" +
+				"}\n";
+		ICompilationUnit cu2= pack1.createCompilationUnit("Circle.java", test, false, null);
+
+		CompilationUnit astRoot= getASTRoot(cu2);
+		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu2, astRoot, 1);
+		assertNumberOfProposals(proposals, 1);
+		assertCorrectLabels(proposals);
+
+		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
+		String preview= getPreviewContent(proposal);
+
+		String expected= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed interface Shape permits Square, Circle {\n" +
+				"}\n";
+
+		assertEqualString(preview, expected);
+	}
+
+	@Test
+	public void testAddSealedAsDirectSuperTypeProposal4() throws Exception {
+		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
+		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
+		JavaProjectHelper.set17CompilerOptions(fJProject1, true);
+
+		Map<String, String> options= fJProject1.getOptions(false);
+		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
+		fJProject1.setOptions(options);
+
+		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
+
+		IPackageFragment def= fSourceFolder.createPackageFragment("", false, null);
+		def.createCompilationUnit("module-info.java", MODULE_INFO_FILE_CONTENT, false, null);
+
+		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
+
+		String test= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed interface Shape permits Square {\n" +
+				"}\n";
+		pack1.createCompilationUnit("Shape.java", test, false, null);
+
+		test= "" +
+				"package test;\n" +
+				"\n" +
+				"public non-sealed class Square implements Shape {\n" +
+				"}\n";
+		pack1.createCompilationUnit("Square.java", test, false, null);
+
+
+		IPackageFragment pack2= fSourceFolder.createPackageFragment("test2", false, null);
+
+		test= "" +
+				"package test2;\n" +
+				"\n" +
+				"import test.Shape;\n" +
+				"\n" +
+				"public non-sealed interface Circle extends Shape {\n" +
+				"}\n";
+		ICompilationUnit cu2= pack2.createCompilationUnit("Circle.java", test, false, null);
+
+		CompilationUnit astRoot= getASTRoot(cu2);
+		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu2, astRoot, 1);
+		assertNumberOfProposals(proposals, 1);
+		assertCorrectLabels(proposals);
+
+		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
+		String preview= getPreviewContent(proposal);
+
+		String expected= "" +
+				"package test;\n" +
+				"\n" +
+				"import test2.Circle;\n" +
+				"\n" +
+				"public sealed interface Shape permits Square, Circle {\n" +
+				"}\n";
+
+		assertEqualString(preview, expected);
+	}
+
+	@Test
+	public void testAddSealedAsDirectSuperInterface1() throws Exception {
+		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
+		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
+		JavaProjectHelper.set17CompilerOptions(fJProject1, true);
+
+		Map<String, String> options= fJProject1.getOptions(false);
+		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
+		fJProject1.setOptions(options);
+
+		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
+		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
+
+		String test= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed interface IShape permits Circle {\\n" +
+				"\n" +
+				"}\n" +
+				"\n" +
+				"class Circle {\n" +
+				"    \n" +
+				"}\n";
+		ICompilationUnit cu= pack1.createCompilationUnit("IShape.java", test, false, null);
+
+		CompilationUnit astRoot= getASTRoot(cu);
+		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu, astRoot, 2);
+		assertNumberOfProposals(proposals, 1);
+		assertCorrectLabels(proposals);
+
+		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
+		String preview1= getPreviewContent(proposal);
+
+		String expected1= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed interface IShape permits Circle {\\n" +
+				"\n" +
+				"}\n" +
+				"\n" +
+				"class Circle implements IShape {\n" +
+				"    \n" +
+				"}\n";
+
+		assertEqualStringsIgnoreOrder(new String[] { preview1 }, new String[] { expected1 });
+	}
+
+	@Test
+	public void testAddSealedAsDirectSuperInterface2() throws Exception {
+		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
+		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
+		JavaProjectHelper.set17CompilerOptions(fJProject1, true);
+
+		Map<String, String> options= fJProject1.getOptions(false);
+		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
+		fJProject1.setOptions(options);
+
+		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
+		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
+
+		String test= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed interface IShape permits IRectangle {\\n" +
+				"\n" +
+				"}\n" +
+				"\n" +
+				"interface IRectangle {\n" +
+				"    \n" +
+				"}\n";
+		ICompilationUnit cu= pack1.createCompilationUnit("IShape.java", test, false, null);
+
+		CompilationUnit astRoot= getASTRoot(cu);
+		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu, astRoot, 2);
+		assertNumberOfProposals(proposals, 1);
+		assertCorrectLabels(proposals);
+
+		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
+		String preview1= getPreviewContent(proposal);
+
+		String expected1= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed interface IShape permits IRectangle {\\n" +
+				"\n" +
+				"}\n" +
+				"\n" +
+				"interface IRectangle extends IShape {\n" +
+				"    \n" +
+				"}\n";
+
+		assertEqualStringsIgnoreOrder(new String[] { preview1 }, new String[] { expected1 });
+	}
+
+	@Test
+	public void testAddSealedAsDirectSuperInterface3() throws Exception {
+		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
+		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
+		JavaProjectHelper.set17CompilerOptions(fJProject1, true);
+
+		Map<String, String> options= fJProject1.getOptions(false);
+		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
+		fJProject1.setOptions(options);
+
+		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
+		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
+
+		String test= "" +
+				"package test;\n" +
+				"\n" +
+				"import java.lang.annotation.IncompleteAnnotationException;\n" +
+				"\n" +
+				"public sealed interface IShape permits IncompleteAnnotationException {\\n" +
+				"\n" +
+				"}\n";
+		ICompilationUnit cu= pack1.createCompilationUnit("IShape.java", test, false, null);
+
+		CompilationUnit astRoot= getASTRoot(cu);
+		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu, astRoot, 3);
+		assertNumberOfProposals(proposals, 0);
+	}
+
+	@Test
+	public void testAddSealedAsDirectSuperInterface4() throws Exception {
+		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
+		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
+		JavaProjectHelper.set17CompilerOptions(fJProject1, true);
+
+		Map<String, String> options= fJProject1.getOptions(false);
+		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
+		fJProject1.setOptions(options);
+
+		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
+
+		IPackageFragment defaultPkg= fSourceFolder.createPackageFragment("", false, null);
+		defaultPkg.createCompilationUnit("module-info.java", MODULE_INFO_FILE_CONTENT, false, null);
+
+		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
+		String test= "" +
+				"package test1;\n" +
+				"\n" +
+				"import test2.IRectangle;\n" +
+				"\n" +
+				"public sealed interface IShape permits IRectangle {\n" +
+				"}\n";
+		ICompilationUnit cu1= pack1.createCompilationUnit("IShape.java", test, false, null);
+
+		IPackageFragment pack2= fSourceFolder.createPackageFragment("test2", false, null);
+		test= "" +
+				"package test2;\n" +
+				"\n" +
+				"public interface IRectangle {\n" +
+				"}\n";
+		pack2.createCompilationUnit("IRectangle.java", test, false, null);
+
+		CompilationUnit astRoot= getASTRoot(cu1);
+		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu1, astRoot, 1);
+		assertNumberOfProposals(proposals, 1);
+		assertCorrectLabels(proposals);
+
+		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
+		String preview= getPreviewContent(proposal);
+
+		String expected= "" +
+				"package test2;\n" +
+				"\n" +
+				"import test1.IShape;\n" +
+				"\n" +
+				"public interface IRectangle extends IShape {\n" +
+				"}\n";
+		assertEqualString(preview, expected);
+	}
+
+	@Test
+	public void testAddSealedAsDirectSuperClass1() throws Exception {
+		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
+		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
+		JavaProjectHelper.set17CompilerOptions(fJProject1, true);
+
+		Map<String, String> options= fJProject1.getOptions(false);
+		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
+		fJProject1.setOptions(options);
+
+		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
+		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
+
+		String test= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed class Shape permits Circle {\\n" +
+				"\n" +
+				"}\n" +
+				"\n" +
+				"class Circle extends AssertionError {\n" +
+				"    \n" +
+				"}\n";
+		ICompilationUnit cu= pack1.createCompilationUnit("Shape.java", test, false, null);
+
+		CompilationUnit astRoot= getASTRoot(cu);
+		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu, astRoot, 3);
+		assertNumberOfProposals(proposals, 1);
+		assertCorrectLabels(proposals);
+
+		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
+		String preview1= getPreviewContent(proposal);
+
+		String expected1= "" +
+				"package test;\n" +
+				"\n" +
+				"public sealed class Shape permits Circle {\\n" +
+				"\n" +
+				"}\n" +
+				"\n" +
+				"class Circle extends Shape {\n" +
+				"    \n" +
+				"}\n";
+
+		assertEqualStringsIgnoreOrder(new String[] { preview1 }, new String[] { expected1 });
+	}
+
+}
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/QuickFixTestPreview.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/QuickFixTestPreview.java
index 10e00d8..02b64ca 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/QuickFixTestPreview.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/QuickFixTestPreview.java
@@ -13,35 +13,24 @@
  *******************************************************************************/
 package org.eclipse.jdt.ui.tests.quickfix;
 
-import java.util.ArrayList;
-import java.util.Map;
-
 import org.junit.After;
 import org.junit.Rule;
-import org.junit.Test;
 
 import org.eclipse.jdt.testplugin.JavaProjectHelper;
 
-import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.dom.CompilationUnit;
 
 import org.eclipse.jdt.ui.tests.core.rules.Java16ProjectTestSetup;
 import org.eclipse.jdt.ui.tests.core.rules.ProjectTestSetup;
-import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
-import org.eclipse.jdt.ui.text.java.correction.CUCorrectionProposal;
 
 public class QuickFixTestPreview extends QuickFixTest {
 
-    @Rule
-    public ProjectTestSetup projectsetup = new Java16ProjectTestSetup(true);
+	@Rule
+	public ProjectTestSetup projectsetup= new Java16ProjectTestSetup(true);
 
-    private IJavaProject fJProject1;
+	private IJavaProject fJProject1;
 
-    private IPackageFragmentRoot fSourceFolder;
+//    private IPackageFragmentRoot fSourceFolder;
 
 	@After
 	public void tearDown() throws Exception {
@@ -50,549 +39,4 @@
 		}
 	}
 
-	@Test
-	public void testAddSealedMissingClassModifierProposal() throws Exception {
-		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
-		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
-		JavaProjectHelper.set16CompilerOptions(fJProject1, true);
-
-		Map<String, String> options= fJProject1.getOptions(false);
-		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-		fJProject1.setOptions(options);
-
-		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
-		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
-
-		String test= "" +
-					"package test;\n" +
-					"\n" +
-					"public sealed class Shape permits Square {}\n" +
-					"\n" +
-					"class Square extends Shape {}\n";
-		ICompilationUnit cu= pack1.createCompilationUnit("Shape.java",test, false, null);
-
-		CompilationUnit astRoot= getASTRoot(cu);
-		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu, astRoot, 1);
-		assertNumberOfProposals(proposals, 3);
-		assertCorrectLabels(proposals);
-
-		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
-		String preview1= getPreviewContent(proposal);
-
-		String expected1= "" +
-						"package test;\n" +
-						"\n" +
-						"public sealed class Shape permits Square {}\n" +
-						"\n" +
-						"final class Square extends Shape {}\n";
-
-		proposal= (CUCorrectionProposal) proposals.get(1);
-		String preview2= getPreviewContent(proposal);
-
-		String expected2= "" +
-						"package test;\n" +
-						"\n" +
-						"public sealed class Shape permits Square {}\n" +
-						"\n" +
-						"non-sealed class Square extends Shape {}\n";
-
-		proposal= (CUCorrectionProposal) proposals.get(2);
-		String preview3= getPreviewContent(proposal);
-
-		String expected3= "" +
-						"package test;\n" +
-						"\n" +
-						"public sealed class Shape permits Square {}\n" +
-						"\n" +
-						"sealed class Square extends Shape {}\n";
-
-		assertEqualStringsIgnoreOrder(new String[] { preview1, preview2, preview3 }, new String[] { expected1, expected2, expected3 });
-
-	}
-
-	@Test
-	public void testAddSealedMissingInterfaceModifierProposal() throws Exception {
-		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
-		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
-		JavaProjectHelper.set16CompilerOptions(fJProject1, true);
-
-		Map<String, String> options= fJProject1.getOptions(false);
-		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-		fJProject1.setOptions(options);
-
-		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
-		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
-
-		String test = "" +
-					"package test;\n" +
-					"\n" +
-					"public sealed interface Shape permits Square {}\n" +
-					"\n" +
-					"interface Square extends Shape {}\n";
-		ICompilationUnit cu= pack1.createCompilationUnit("Shape.java", test, false, null);
-
-		CompilationUnit astRoot= getASTRoot(cu);
-		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu, astRoot, 1);
-		assertNumberOfProposals(proposals, 2);
-		assertCorrectLabels(proposals);
-
-		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
-		String preview1= getPreviewContent(proposal);
-
-		String expected1= "" +
-						"package test;\n" +
-						"\n" +
-						"public sealed interface Shape permits Square {}\n" +
-						"\n" +
-						"sealed interface Square extends Shape {}\n";
-
-		proposal= (CUCorrectionProposal) proposals.get(1);
-		String preview2= getPreviewContent(proposal);
-
-		String expected2= "" +
-						"package test;\n" +
-						"\n" +
-						"public sealed interface Shape permits Square {}\n" +
-						"\n" +
-						"non-sealed interface Square extends Shape {}\n";
-
-		assertEqualStringsIgnoreOrder(new String[] { preview1, preview2 }, new String[] { expected1, expected2 });
-
-	}
-
-	@Test
-	public void testAddSealedAsDirectSuperTypeProposal1() throws Exception {
-		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
-		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
-		JavaProjectHelper.set16CompilerOptions(fJProject1, true);
-
-		Map<String, String> options= fJProject1.getOptions(false);
-		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-		fJProject1.setOptions(options);
-
-		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
-		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
-
-		String test= "" +
-				"package test;\n" +
-				"\n" +
-				"public sealed class Shape permits Square {\n" +
-				"}\n";
-		pack1.createCompilationUnit("Shape.java", test, false, null);
-
-		test= "" +
-				"package test;\n" +
-				"\n" +
-				"public non-sealed class Square extends Shape {\n" +
-				"}\n";
-		pack1.createCompilationUnit("Square.java", test, false, null);
-
-		test= "" +
-				"package test;\n" +
-				"\n" +
-				"public non-sealed class Circle extends Shape {\n" +
-				"}\n";
-		ICompilationUnit cu2= pack1.createCompilationUnit("Circle.java", test, false, null);
-
-		CompilationUnit astRoot= getASTRoot(cu2);
-		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu2, astRoot, 1);
-		assertNumberOfProposals(proposals, 1);
-		assertCorrectLabels(proposals);
-
-		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
-		String preview= getPreviewContent(proposal);
-
-		String expected= "" +
-				"package test;\n" +
-				"\n" +
-				"public sealed class Shape permits Square, Circle {\n" +
-				"}\n";
-
-		assertEqualString(preview, expected);
-	}
-
-	@Test
-	public void testAddSealedAsDirectSuperTypeProposal2() throws Exception {
-		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
-		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
-		JavaProjectHelper.set16CompilerOptions(fJProject1, true);
-
-		Map<String, String> options= fJProject1.getOptions(false);
-		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-		fJProject1.setOptions(options);
-
-		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
-		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
-
-		String test= "" +
-				"package test;\n" +
-				"\n" +
-				"public sealed interface Shape permits Square {\n" +
-				"}\n";
-		pack1.createCompilationUnit("Shape.java", test, false, null);
-
-		test= "" +
-				"package test;\n" +
-				"\n" +
-				"public non-sealed class Square implements Shape {\n" +
-				"}\n";
-		pack1.createCompilationUnit("Square.java", test, false, null);
-
-		test= "" +
-				"package test;\n" +
-				"\n" +
-				"public non-sealed class Circle implements Shape {\n" +
-				"}\n";
-		ICompilationUnit cu2= pack1.createCompilationUnit("Circle.java", test, false, null);
-
-		CompilationUnit astRoot= getASTRoot(cu2);
-		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu2, astRoot, 1);
-		assertNumberOfProposals(proposals, 1);
-		assertCorrectLabels(proposals);
-
-		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
-		String preview= getPreviewContent(proposal);
-
-		String expected= "" +
-				"package test;\n" +
-				"\n" +
-				"public sealed interface Shape permits Square, Circle {\n" +
-				"}\n";
-
-		assertEqualString(preview, expected);
-	}
-
-	@Test
-	public void testAddSealedAsDirectSuperTypeProposal3() throws Exception {
-		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
-		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
-		JavaProjectHelper.set16CompilerOptions(fJProject1, true);
-
-		Map<String, String> options= fJProject1.getOptions(false);
-		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-		fJProject1.setOptions(options);
-
-		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
-		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
-
-		String test= "" +
-				"package test;\n" +
-				"\n" +
-				"public sealed interface Shape permits Square {\n" +
-				"}\n";
-		pack1.createCompilationUnit("Shape.java", test, false, null);
-
-		test= "" +
-				"package test;\n" +
-				"\n" +
-				"public non-sealed class Square implements Shape {\n" +
-				"}\n";
-		pack1.createCompilationUnit("Square.java", test, false, null);
-
-		test= "" +
-				"package test;\n" +
-				"\n" +
-				"public non-sealed interface Circle extends Shape {\n" +
-				"}\n";
-		ICompilationUnit cu2= pack1.createCompilationUnit("Circle.java", test, false, null);
-
-		CompilationUnit astRoot= getASTRoot(cu2);
-		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu2, astRoot, 1);
-		assertNumberOfProposals(proposals, 1);
-		assertCorrectLabels(proposals);
-
-		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
-		String preview= getPreviewContent(proposal);
-
-		String expected= "" +
-				"package test;\n" +
-				"\n" +
-				"public sealed interface Shape permits Square, Circle {\n" +
-				"}\n";
-
-		assertEqualString(preview, expected);
-	}
-
-	@Test
-	public void testAddSealedAsDirectSuperTypeProposal4() throws Exception {
-		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
-		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
-		JavaProjectHelper.set16CompilerOptions(fJProject1, true);
-
-		Map<String, String> options= fJProject1.getOptions(false);
-		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-		fJProject1.setOptions(options);
-
-		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
-
-		IPackageFragment def= fSourceFolder.createPackageFragment("", false, null);
-		def.createCompilationUnit("module-info.java", MODULE_INFO_FILE_CONTENT, false, null);
-
-		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
-
-		String test= "" +
-				"package test;\n" +
-				"\n" +
-				"public sealed interface Shape permits Square {\n" +
-				"}\n";
-		pack1.createCompilationUnit("Shape.java", test, false, null);
-
-		test= "" +
-				"package test;\n" +
-				"\n" +
-				"public non-sealed class Square implements Shape {\n" +
-				"}\n";
-		pack1.createCompilationUnit("Square.java", test, false, null);
-
-
-		IPackageFragment pack2= fSourceFolder.createPackageFragment("test2", false, null);
-
-		test= "" +
-				"package test2;\n" +
-				"\n" +
-				"import test.Shape;\n" +
-				"\n" +
-				"public non-sealed interface Circle extends Shape {\n" +
-				"}\n";
-		ICompilationUnit cu2= pack2.createCompilationUnit("Circle.java", test, false, null);
-
-		CompilationUnit astRoot= getASTRoot(cu2);
-		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu2, astRoot, 1);
-		assertNumberOfProposals(proposals, 1);
-		assertCorrectLabels(proposals);
-
-		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
-		String preview= getPreviewContent(proposal);
-
-		String expected= "" +
-				"package test;\n" +
-				"\n" +
-				"import test2.Circle;\n" +
-				"\n" +
-				"public sealed interface Shape permits Square, Circle {\n" +
-				"}\n";
-
-		assertEqualString(preview, expected);
-	}
-
-	@Test
-	public void testAddSealedAsDirectSuperInterface1() throws Exception {
-		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
-		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
-		JavaProjectHelper.set16CompilerOptions(fJProject1, true);
-
-		Map<String, String> options= fJProject1.getOptions(false);
-		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-		fJProject1.setOptions(options);
-
-		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
-		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
-
-		String test= "" +
-				"package test;\n" +
-				"\n" +
-				"public sealed interface IShape permits Circle {\\n" +
-				"\n" +
-				"}\n" +
-				"\n" +
-				"class Circle {\n" +
-				"    \n" +
-				"}\n";
-		ICompilationUnit cu= pack1.createCompilationUnit("IShape.java", test, false, null);
-
-		CompilationUnit astRoot= getASTRoot(cu);
-		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu, astRoot, 2);
-		assertNumberOfProposals(proposals, 1);
-		assertCorrectLabels(proposals);
-
-		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
-		String preview1= getPreviewContent(proposal);
-
-		String expected1= "" +
-				"package test;\n" +
-				"\n" +
-				"public sealed interface IShape permits Circle {\\n" +
-				"\n" +
-				"}\n" +
-				"\n" +
-				"class Circle implements IShape {\n" +
-				"    \n" +
-				"}\n";
-
-		assertEqualStringsIgnoreOrder(new String[] { preview1 }, new String[] { expected1 });
-	}
-
-	@Test
-	public void testAddSealedAsDirectSuperInterface2() throws Exception {
-		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
-		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
-		JavaProjectHelper.set16CompilerOptions(fJProject1, true);
-
-		Map<String, String> options= fJProject1.getOptions(false);
-		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-		fJProject1.setOptions(options);
-
-		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
-		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
-
-		String test= "" +
-				"package test;\n" +
-				"\n" +
-				"public sealed interface IShape permits IRectangle {\\n" +
-				"\n" +
-				"}\n" +
-				"\n" +
-				"interface IRectangle {\n" +
-				"    \n" +
-				"}\n";
-		ICompilationUnit cu= pack1.createCompilationUnit("IShape.java", test, false, null);
-
-		CompilationUnit astRoot= getASTRoot(cu);
-		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu, astRoot, 2);
-		assertNumberOfProposals(proposals, 1);
-		assertCorrectLabels(proposals);
-
-		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
-		String preview1= getPreviewContent(proposal);
-
-		String expected1= "" +
-				"package test;\n" +
-				"\n" +
-				"public sealed interface IShape permits IRectangle {\\n" +
-				"\n" +
-				"}\n" +
-				"\n" +
-				"interface IRectangle extends IShape {\n" +
-				"    \n" +
-				"}\n";
-
-		assertEqualStringsIgnoreOrder(new String[] { preview1 }, new String[] { expected1 });
-	}
-
-	@Test
-	public void testAddSealedAsDirectSuperInterface3() throws Exception {
-		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
-		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
-		JavaProjectHelper.set16CompilerOptions(fJProject1, true);
-
-		Map<String, String> options= fJProject1.getOptions(false);
-		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-		fJProject1.setOptions(options);
-
-		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
-		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
-
-		String test= "" +
-				"package test;\n" +
-				"\n" +
-				"import java.lang.annotation.IncompleteAnnotationException;\n" +
-				"\n" +
-				"public sealed interface IShape permits IncompleteAnnotationException {\\n" +
-				"\n" +
-				"}\n";
-		ICompilationUnit cu= pack1.createCompilationUnit("IShape.java", test, false, null);
-
-		CompilationUnit astRoot= getASTRoot(cu);
-		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu, astRoot, 3);
-		assertNumberOfProposals(proposals, 0);
-	}
-
-	@Test
-	public void testAddSealedAsDirectSuperInterface4() throws Exception {
-		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
-		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
-		JavaProjectHelper.set16CompilerOptions(fJProject1, true);
-
-		Map<String, String> options= fJProject1.getOptions(false);
-		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-		fJProject1.setOptions(options);
-
-		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
-
-		IPackageFragment defaultPkg= fSourceFolder.createPackageFragment("", false, null);
-		defaultPkg.createCompilationUnit("module-info.java", MODULE_INFO_FILE_CONTENT, false, null);
-
-		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
-		String test= "" +
-				"package test1;\n" +
-				"\n" +
-				"import test2.IRectangle;\n" +
-				"\n" +
-				"public sealed interface IShape permits IRectangle {\n" +
-				"}\n";
-		ICompilationUnit cu1= pack1.createCompilationUnit("IShape.java", test, false, null);
-
-		IPackageFragment pack2= fSourceFolder.createPackageFragment("test2", false, null);
-		test= "" +
-				"package test2;\n" +
-				"\n" +
-				"public interface IRectangle {\n" +
-				"}\n";
-		pack2.createCompilationUnit("IRectangle.java", test, false, null);
-
-		CompilationUnit astRoot= getASTRoot(cu1);
-		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu1, astRoot, 1);
-		assertNumberOfProposals(proposals, 1);
-		assertCorrectLabels(proposals);
-
-		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
-		String preview= getPreviewContent(proposal);
-
-		String expected= "" +
-				"package test2;\n" +
-				"\n" +
-				"import test1.IShape;\n" +
-				"\n" +
-				"public interface IRectangle extends IShape {\n" +
-				"}\n";
-		assertEqualString(preview, expected);
-	}
-
-	@Test
-	public void testAddSealedAsDirectSuperClass1() throws Exception {
-		fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
-		fJProject1.setRawClasspath(projectsetup.getDefaultClasspath(), null);
-		JavaProjectHelper.set16CompilerOptions(fJProject1, true);
-
-		Map<String, String> options= fJProject1.getOptions(false);
-		options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-		fJProject1.setOptions(options);
-
-		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
-		IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null);
-
-		String test= "" +
-				"package test;\n" +
-				"\n" +
-				"public sealed class Shape permits Circle {\\n" +
-				"\n" +
-				"}\n" +
-				"\n" +
-				"class Circle extends AssertionError {\n" +
-				"    \n" +
-				"}\n";
-		ICompilationUnit cu= pack1.createCompilationUnit("Shape.java", test, false, null);
-
-		CompilationUnit astRoot= getASTRoot(cu);
-		ArrayList<IJavaCompletionProposal> proposals= collectCorrections(cu, astRoot, 3);
-		assertNumberOfProposals(proposals, 1);
-		assertCorrectLabels(proposals);
-
-		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
-		String preview1= getPreviewContent(proposal);
-
-		String expected1= "" +
-				"package test;\n" +
-				"\n" +
-				"public sealed class Shape permits Circle {\\n" +
-				"\n" +
-				"}\n" +
-				"\n" +
-				"class Circle extends Shape {\n" +
-				"    \n" +
-				"}\n";
-
-		assertEqualStringsIgnoreOrder(new String[] { preview1 }, new String[] { expected1 });
-	}
-
 }
diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/QuickFixTestSuite.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/QuickFixTestSuite.java
index d27cd62..2a05802 100644
--- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/QuickFixTestSuite.java
+++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/QuickFixTestSuite.java
@@ -23,7 +23,7 @@
 	QuickFixTest1d8.class,
 	QuickFixTest14.class,
 	QuickFixTest15.class,
-	QuickFixTestPreview.class,
+	QuickFixTest17.class,
 	SerialVersionQuickFixTest.class,
 	UtilitiesTest.class,
 	UnresolvedTypesQuickFixTest.class,
diff --git a/org.eclipse.jdt.ui/.settings/.api_filters b/org.eclipse.jdt.ui/.settings/.api_filters
index 6a6c033..440a662 100644
--- a/org.eclipse.jdt.ui/.settings/.api_filters
+++ b/org.eclipse.jdt.ui/.settings/.api_filters
@@ -112,15 +112,6 @@
             </message_arguments>
         </filter>
     </resource>
-    <resource path="ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingReconciler.java" type="org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingReconciler$PositionCollector">
-        <filter comment="This is a Java 15 preview feature" id="640712815">
-            <message_arguments>
-                <message_argument value="TypeDeclaration"/>
-                <message_argument value="PositionCollector"/>
-                <message_argument value="getRestrictedIdentifierStartPosition()"/>
-            </message_arguments>
-        </filter>
-    </resource>
     <resource path="ui/org/eclipse/jdt/internal/ui/text/JavaOutlineInformationControl.java" type="org.eclipse.jdt.internal.ui.text.JavaOutlineInformationControl$OutlineTreeViewer">
         <filter id="571473929">
             <message_arguments>
diff --git a/org.eclipse.jdt.ui/META-INF/MANIFEST.MF b/org.eclipse.jdt.ui/META-INF/MANIFEST.MF
index dec433a..a8d476a 100644
--- a/org.eclipse.jdt.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.ui/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.ui; singleton:=true
-Bundle-Version: 3.24.0.qualifier
+Bundle-Version: 3.24.100.qualifier
 Bundle-Activator: org.eclipse.jdt.internal.ui.JavaPlugin
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %providerName
diff --git a/org.eclipse.jdt.ui/pom.xml b/org.eclipse.jdt.ui/pom.xml
index 9966073..8774311 100644
--- a/org.eclipse.jdt.ui/pom.xml
+++ b/org.eclipse.jdt.ui/pom.xml
@@ -18,7 +18,7 @@
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.ui</artifactId>
-  <version>3.24.0-SNAPSHOT</version>
+  <version>3.24.100-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
   <properties>
     <code.ignoredWarnings>-warn:-deprecation,unavoidableGenericProblems</code.ignoredWarnings>
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ComplianceConfigurationBlock.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ComplianceConfigurationBlock.java
index adb6363..57b433e 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ComplianceConfigurationBlock.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ComplianceConfigurationBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -144,6 +144,7 @@
 	private static final String VERSION_14 = JavaCore.VERSION_14;
 	private static final String VERSION_15 = JavaCore.VERSION_15;
 	private static final String VERSION_16 = JavaCore.VERSION_16;
+	private static final String VERSION_17 = JavaCore.VERSION_17;
 	private static final String VERSION_LATEST = JavaCore.latestSupportedJavaVersion();
 	private static final String VERSION_JSR14= "jsr14"; //$NON-NLS-1$
 
@@ -301,7 +302,7 @@
 	private Composite createComplianceTabContent(Composite folder) {
 
 		final String[] complianceVersions= new String[] { VERSION_1_3, VERSION_1_4,
-				VERSION_1_5, VERSION_1_6, VERSION_1_7, VERSION_1_8, VERSION_9, VERSION_10, VERSION_11, VERSION_12, VERSION_13, VERSION_14, VERSION_15, VERSION_16 };
+				VERSION_1_5, VERSION_1_6, VERSION_1_7, VERSION_1_8, VERSION_9, VERSION_10, VERSION_11, VERSION_12, VERSION_13, VERSION_14, VERSION_15, VERSION_16, VERSION_17 };
 		final String[] complianceLabels= new String[] {
 			PreferencesMessages.ComplianceConfigurationBlock_version13,
 			PreferencesMessages.ComplianceConfigurationBlock_version14,
@@ -317,10 +318,11 @@
 			PreferencesMessages.ComplianceConfigurationBlock_version_14,
 			PreferencesMessages.ComplianceConfigurationBlock_version_15,
 			PreferencesMessages.ComplianceConfigurationBlock_version_16,
+			PreferencesMessages.ComplianceConfigurationBlock_version_17,
 		};
 
 		String[] targetVersions= new String[] { VERSION_CLDC_1_1, VERSION_1_1, VERSION_1_2, VERSION_1_3, VERSION_1_4,
-				VERSION_1_5, VERSION_1_6, VERSION_1_7, VERSION_1_8, VERSION_9, VERSION_10, VERSION_11, VERSION_12, VERSION_13, VERSION_14, VERSION_15, VERSION_16 };
+				VERSION_1_5, VERSION_1_6, VERSION_1_7, VERSION_1_8, VERSION_9, VERSION_10, VERSION_11, VERSION_12, VERSION_13, VERSION_14, VERSION_15, VERSION_16, VERSION_17 };
 		String[] targetLabels= new String[] {
 				PreferencesMessages.ComplianceConfigurationBlock_versionCLDC11,
 				PreferencesMessages.ComplianceConfigurationBlock_version11,
@@ -339,6 +341,7 @@
 				PreferencesMessages.ComplianceConfigurationBlock_version_14,
 				PreferencesMessages.ComplianceConfigurationBlock_version_15,
 				PreferencesMessages.ComplianceConfigurationBlock_version_16,
+				PreferencesMessages.ComplianceConfigurationBlock_version_17,
 		};
 		if (ComplianceConfigurationBlock.VERSION_JSR14.equals(getValue(PREF_CODEGEN_TARGET_PLATFORM))) {
 			targetVersions= append(targetVersions, ComplianceConfigurationBlock.VERSION_JSR14);
@@ -346,7 +349,7 @@
 		}
 
 		String[] sourceVersions= new String[] { VERSION_1_3, VERSION_1_4,
-				VERSION_1_5, VERSION_1_6, VERSION_1_7, VERSION_1_8, VERSION_9, VERSION_10, VERSION_11, VERSION_12, VERSION_13, VERSION_14, VERSION_15, VERSION_16 };
+				VERSION_1_5, VERSION_1_6, VERSION_1_7, VERSION_1_8, VERSION_9, VERSION_10, VERSION_11, VERSION_12, VERSION_13, VERSION_14, VERSION_15, VERSION_16, VERSION_17 };
 		String[] sourceLabels= new String[] {
 				PreferencesMessages.ComplianceConfigurationBlock_version13,
 				PreferencesMessages.ComplianceConfigurationBlock_version14,
@@ -362,6 +365,7 @@
 				PreferencesMessages.ComplianceConfigurationBlock_version_14,
 				PreferencesMessages.ComplianceConfigurationBlock_version_15,
 				PreferencesMessages.ComplianceConfigurationBlock_version_16,
+				PreferencesMessages.ComplianceConfigurationBlock_version_17,
 		};
 
 		final ScrolledPageContent sc1 = new ScrolledPageContent(folder);
@@ -811,9 +815,9 @@
 				}
 			}
 
-			//TODO: Comment once Java SE 16 has been shipped:
+			//TODO: Comment once Java SE 17 has been shipped:
 //			String selectedCompliance= getValue(PREF_COMPLIANCE);
-//			if (VERSION_16.equals(selectedCompliance)) {
+//			if (VERSION_17.equals(selectedCompliance)) {
 //				fJRE50InfoText.setText(
 //						"This is an implementation of an early-draft specification developed under the Java Community Process (JCP) and is made available for testing and evaluation purposes only. The code is not compatible with any specification of the JCP."); //$NON-NLS-1$
 //				isVisible= true;
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java
index 42d5d19..38e779c 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -840,6 +840,7 @@
 	public static String ComplianceConfigurationBlock_version_14;
 	public static String ComplianceConfigurationBlock_version_15;
 	public static String ComplianceConfigurationBlock_version_16;
+	public static String ComplianceConfigurationBlock_version_17;
 	public static String ComplianceConfigurationBlock_versionCLDC11;
 	public static String ComplianceConfigurationBlock_src_greater_compliance;
 	public static String ComplianceConfigurationBlock_classfile_greater_compliance;
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties
index 437d69fd..a33d02f 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2020 IBM Corporation and others.
+# Copyright (c) 2000, 2021 IBM Corporation and others.
 #
 # This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License 2.0
@@ -594,6 +594,7 @@
 ComplianceConfigurationBlock_version_14=14
 ComplianceConfigurationBlock_version_15=15
 ComplianceConfigurationBlock_version_16=16
+ComplianceConfigurationBlock_version_17=17
 ComplianceConfigurationBlock_versionCLDC11=CLDC 1.1
 
 ComplianceConfigurationBlock_needsbuild_title=Compiler Settings Changed
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/SharedASTProvider.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/SharedASTProvider.java
index 61df9b6..6b39ceb 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/SharedASTProvider.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/SharedASTProvider.java
@@ -33,7 +33,7 @@
  * <p>Clients can make the following assumptions about the AST:</p>
  * <ul>
  *    <li>the AST has a {@link ITypeRoot} as source: {@link CompilationUnit#getTypeRoot()} is not null.</li>
- *    <li>the {@link AST#apiLevel() AST API level} is {@link AST#JLS16 API level 16} or higher</li>
+ *    <li>the {@link AST#apiLevel() AST API level} is {@link AST#JLS17 API level 17} or higher</li>
  *    <li>the AST has bindings resolved ({@link AST#hasResolvedBindings()})</li>
  *    <li>{@link AST#hasStatementsRecovery() statement} and {@link AST#hasBindingsRecovery() bindings}
  *           recovery are enabled
diff --git a/pom.xml b/pom.xml
index 56075ae..50cb2eb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,6 +35,10 @@
   <profiles>
     <profile>
       <id>build-individual-bundles</id>
+      <properties>
+      	<eclipse-p2-repo.url>http://download.eclipse.org/eclipse/updates/Y-builds</eclipse-p2-repo.url>
+      	<skipAPIAnalysis>true</skipAPIAnalysis>
+      </properties>
       <repositories>
         <repository>
           <releases>