diff options
author | Mateusz Matela | 2018-12-29 22:51:27 +0000 |
---|---|---|
committer | Mateusz Matela | 2018-12-29 22:51:27 +0000 |
commit | 4cf7716d7704e6dde6cf2a66fd8b143cad9df805 (patch) | |
tree | 3ba75c629a02c36aadfa16110e0f35a4a560c719 /org.eclipse.jdt.core | |
parent | dc1631273be47f1eb8e1fcaa7fc7452906e802fd (diff) | |
download | eclipse.jdt.core-4cf7716d7704e6dde6cf2a66fd8b143cad9df805.tar.gz eclipse.jdt.core-4cf7716d7704e6dde6cf2a66fd8b143cad9df805.tar.xz eclipse.jdt.core-4cf7716d7704e6dde6cf2a66fd8b143cad9df805.zip |
Bug 543088 - [formatter] update hardcoded compiler/parser levels
Diffstat (limited to 'org.eclipse.jdt.core')
-rw-r--r-- | org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java index c222422a6b..0336bb2867 100644 --- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java +++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java @@ -126,13 +126,13 @@ public class DefaultCodeFormatter extends CodeFormatter { this.workingOptions = new DefaultCodeFormatterOptions(options); this.oldCommentFormatOption = getOldCommentFormatOption(options); String compilerSource = options.get(CompilerOptions.OPTION_Source); - this.sourceLevel = compilerSource != null ? compilerSource : CompilerOptions.VERSION_1_8; + this.sourceLevel = compilerSource != null ? compilerSource : CompilerOptions.VERSION_11; } else { Map<String, String> settings = DefaultCodeFormatterConstants.getJavaConventionsSettings(); this.originalOptions = new DefaultCodeFormatterOptions(settings); this.workingOptions = new DefaultCodeFormatterOptions(settings); this.oldCommentFormatOption = DefaultCodeFormatterConstants.TRUE; - this.sourceLevel = CompilerOptions.VERSION_1_8; + this.sourceLevel = CompilerOptions.VERSION_11; } if (defaultCodeFormatterOptions != null) { this.originalOptions.set(defaultCodeFormatterOptions.getMap()); @@ -332,8 +332,7 @@ public class DefaultCodeFormatter extends CodeFormatter { } private ASTParser createParser(int kind) { - @SuppressWarnings("deprecation") - ASTParser parser = ASTParser.newParser(AST.JLS9); + ASTParser parser = ASTParser.newParser(AST.JLS11); if (kind == K_MODULE_INFO) { parser.setSource(createDummyModuleInfoCompilationUnit()); |