From 11316797a674056656d9f4b345cf6856f74b758d Mon Sep 17 00:00:00 2001 From: Manoj N Palat Date: Mon, 24 Jul 2023 15:07:03 +0530 Subject: [PATCH] [21] JEP 443: Unnamed Patterns and Variables (Preview)- intial (#1242) bookkeeping https://github.com/eclipse-jdt/eclipse.jdt.core/issues/893 --- .../eclipse/jdt/internal/compiler/impl/JavaFeature.java | 4 ++++ .../org/eclipse/jdt/internal/compiler/messages.properties | 7 ++++++- .../org/eclipse/jdt/internal/compiler/util/Messages.java | 7 ++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/impl/JavaFeature.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/impl/JavaFeature.java index 23d7395ca6c..401ae8632e4 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/impl/JavaFeature.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/impl/JavaFeature.java @@ -69,6 +69,10 @@ public enum JavaFeature { Messages.bind(Messages.record_patterns), new char[][] {}, true), + UNNAMMED_PATTERNS_AND_VARS(ClassFileConstants.JDK21, + Messages.bind(Messages.unnammed_patterns_and_vars), + new char[][] {}, + true), ; final long compliance; diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/messages.properties b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/messages.properties index acf8b0f3a0b..258795df502 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/messages.properties +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/messages.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000, 2021 IBM Corporation and others. +# Copyright (c) 2000, 2023 IBM Corporation and others. # # This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 @@ -8,6 +8,10 @@ # # SPDX-License-Identifier: EPL-2.0 # +# 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. +# # Contributors: # IBM Corporation - initial API and implementation ############################################################################### @@ -74,3 +78,4 @@ records = Records sealed_types = Sealed Types pattern_matching_switch = Pattern Matching in Switch record_patterns = Record Pattern +unnammed_patterns_and_vars = Unnammed Patterns and Variables \ No newline at end of file diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/util/Messages.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/util/Messages.java index 653fea521bc..9b5c7b060b6 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/util/Messages.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/util/Messages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2021 IBM Corporation and others. + * Copyright (c) 2000, 2023 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -8,6 +8,10 @@ * * SPDX-License-Identifier: EPL-2.0 * + * 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. + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -124,6 +128,7 @@ private Messages() { public static String sealed_types; public static String pattern_matching_switch; public static String record_patterns; + public static String unnammed_patterns_and_vars; static { initializeMessages(BUNDLE_NAME, Messages.class);