Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManoj Palat2019-09-19 04:30:33 -0400
committerSarika Sinha2019-09-19 05:48:37 -0400
commita3466b0f64e8842e5ed6a3a28165da341fb76cc0 (patch)
treeadc5e09ee603628bfbb88a247a105743b26d47fc /org.eclipse.jdt.compiler.apt
parentc842004634d661ef8d9d485e77e9c84af231e888 (diff)
downloadeclipse.jdt.core-a3466b0f64e8842e5ed6a3a28165da341fb76cc0.tar.gz
eclipse.jdt.core-a3466b0f64e8842e5ed6a3a28165da341fb76cc0.tar.xz
eclipse.jdt.core-a3466b0f64e8842e5ed6a3a28165da341fb76cc0.zip
Merge remote-tracking branch 'origin/BETA_JAVA13'I20190919-1800I20190919-0850
# Conflicts: # org.eclipse.jdt.compiler.apt/META-INF/MANIFEST.MF # org.eclipse.jdt.compiler.apt/pom.xml # org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF # org.eclipse.jdt.core.tests.compiler/pom.xml # org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF # org.eclipse.jdt.core.tests.model/pom.xml # org.eclipse.jdt.core/META-INF/MANIFEST.MF # org.eclipse.jdt.core/pom.xml Change-Id: I2562d3b2833b1b63e3b8cfc46eb533bffcae6bd9
Diffstat (limited to 'org.eclipse.jdt.compiler.apt')
-rw-r--r--org.eclipse.jdt.compiler.apt/build.properties4
-rw-r--r--org.eclipse.jdt.compiler.apt/lib/java13api.jar (renamed from org.eclipse.jdt.compiler.apt/lib/java10api.jar)bin109915 -> 111292 bytes
-rw-r--r--org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BaseProcessingEnvImpl.java33
3 files changed, 33 insertions, 4 deletions
diff --git a/org.eclipse.jdt.compiler.apt/build.properties b/org.eclipse.jdt.compiler.apt/build.properties
index 7e1102b5c5..6b49b018ed 100644
--- a/org.eclipse.jdt.compiler.apt/build.properties
+++ b/org.eclipse.jdt.compiler.apt/build.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2005, 2017 IBM Corporation and others.
+# Copyright (c) 2005, 2019 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -22,4 +22,4 @@ jars.compile.order = .
output.. = bin/
source.. = src/
-jars.extra.classpath = lib/java10api.jar
+jars.extra.classpath = lib/java13api.jar
diff --git a/org.eclipse.jdt.compiler.apt/lib/java10api.jar b/org.eclipse.jdt.compiler.apt/lib/java13api.jar
index 464b69134f..d8bbb8b501 100644
--- a/org.eclipse.jdt.compiler.apt/lib/java10api.jar
+++ b/org.eclipse.jdt.compiler.apt/lib/java13api.jar
Binary files differ
diff --git a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BaseProcessingEnvImpl.java b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BaseProcessingEnvImpl.java
index f288a44543..5a088fbf6e 100644
--- a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BaseProcessingEnvImpl.java
+++ b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BaseProcessingEnvImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 BEA Systems, Inc.
+ * Copyright (c) 2007, 2019 BEA Systems, Inc.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -129,11 +129,33 @@ public abstract class BaseProcessingEnvImpl implements ProcessingEnvironment {
return SourceVersion.RELEASE_6;
}
try {
- return SourceVersion.valueOf("RELEASE_7"); //$NON-NLS-1$
+ if (this._compiler.options.sourceLevel == ClassFileConstants.JDK1_7) {
+ return SourceVersion.valueOf("RELEASE_7"); //$NON-NLS-1$
+ }
+ if (this._compiler.options.sourceLevel == ClassFileConstants.JDK1_8) {
+ return SourceVersion.valueOf("RELEASE_8"); //$NON-NLS-1$
+ }
+ if (this._compiler.options.sourceLevel == ClassFileConstants.JDK9) {
+ return SourceVersion.valueOf("RELEASE_9"); //$NON-NLS-1$
+ }
+ if (this._compiler.options.sourceLevel == ClassFileConstants.JDK10) {
+ return SourceVersion.valueOf("RELEASE_10"); //$NON-NLS-1$
+ }
+ if (this._compiler.options.sourceLevel == ClassFileConstants.JDK11) {
+ return SourceVersion.valueOf("RELEASE_11"); //$NON-NLS-1$
+ }
+ if (this._compiler.options.sourceLevel == ClassFileConstants.JDK12) {
+ return SourceVersion.valueOf("RELEASE_12"); //$NON-NLS-1$
+ }
+ if (this._compiler.options.sourceLevel == ClassFileConstants.JDK13) {
+ return SourceVersion.valueOf("RELEASE_13"); //$NON-NLS-1$
+ }
} catch(IllegalArgumentException e) {
// handle call on a JDK 6
return SourceVersion.RELEASE_6;
}
+ // handle call on a JDK 6 by default
+ return SourceVersion.RELEASE_6;
}
/**
@@ -174,5 +196,12 @@ public abstract class BaseProcessingEnvImpl implements ProcessingEnvironment {
_addedClassFiles.toArray(result);
return result;
}
+ /*
+ * This overrides ProcessingEnvironment, but can't declare so since
+ * we are still compiling against JDK 8.
+ */
+ public boolean isPreviewEnabled() {
+ return this._compiler.options.enablePreviewFeatures;
+ }
}

Back to the top