diff options
author | Roel Spilker <r.spilker@gmail.com> | 2018-08-27 21:18:19 +0200 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2018-08-27 21:18:19 +0200 |
commit | 3f4f9e65520c91df59abbb03cdd91574d75ea197 (patch) | |
tree | b0a28ac208dcb8af9add494c4caffe4f11bb287b /src | |
parent | 769185e123dfd4a073161eafb58ce50bb79d6201 (diff) | |
parent | 3ffac6642456e2c7d32952c62df8a565e2d4728b (diff) | |
download | lombok-3f4f9e65520c91df59abbb03cdd91574d75ea197.tar.gz lombok-3f4f9e65520c91df59abbb03cdd91574d75ea197.tar.bz2 lombok-3f4f9e65520c91df59abbb03cdd91574d75ea197.zip |
Merge branch 'charphi-master'
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lombok/javac/apt/LombokProcessor.java | 5 | ||||
-rw-r--r-- | src/core/lombok/javac/handlers/JavacHandlerUtil.java | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/core/lombok/javac/apt/LombokProcessor.java b/src/core/lombok/javac/apt/LombokProcessor.java index 26e16d32..247d0560 100644 --- a/src/core/lombok/javac/apt/LombokProcessor.java +++ b/src/core/lombok/javac/apt/LombokProcessor.java @@ -174,7 +174,10 @@ public class LombokProcessor extends AbstractProcessor { filerFileManagerField.setAccessible(true); filerFileManagerField.set(javacFiler, newFilerManager); - replaceFileManagerJdk9(context, newFilerManager); + if (lombok.javac.Javac.getJavaCompilerVersion() > 8 + && !lombok.javac.handlers.JavacHandlerUtil.inNetbeansCompileOnSave(context)) { + replaceFileManagerJdk9(context, newFilerManager); + } } } catch (Exception e) { throw Lombok.sneakyThrow(e); diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java index f335cf94..570d1a7e 100644 --- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java +++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java @@ -134,11 +134,16 @@ public class JavacHandlerUtil { return inNetbeansEditor(node.getContext()); } - private static boolean inNetbeansEditor(Context context) { + public static boolean inNetbeansEditor(Context context) { Options options = Options.instance(context); return (options.keySet().contains("ide") && !options.keySet().contains("backgroundCompilation")); } - + + public static boolean inNetbeansCompileOnSave(Context context) { + Options options = Options.instance(context); + return (options.keySet().contains("ide") && options.keySet().contains("backgroundCompilation")); + } + public static JCTree getGeneratedBy(JCTree node) { return JCTree_generatedNode.get(node); } |