private void initOptions(DefaultCodeFormatterOptions defaultCodeFormatterOptions, Map<String, String> options) { if (options != null) { this.originalOptions = new DefaultCodeFormatterOptions(options); 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; } 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; } if (defaultCodeFormatterOptions != null) { this.originalOptions.set(defaultCodeFormatterOptions.getMap()); this.workingOptions.set(defaultCodeFormatterOptions.getMap()); } }
private void initOptions(DefaultCodeFormatterOptions defaultCodeFormatterOptions, Map<String, String> options) { if (options != null) { this.originalOptions = new DefaultCodeFormatterOptions(options); 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; } 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; } if (defaultCodeFormatterOptions != null) { this.originalOptions.set(defaultCodeFormatterOptions.getMap()); this.workingOptions.set(defaultCodeFormatterOptions.getMap()); } }
private void initOptions(DefaultCodeFormatterOptions defaultCodeFormatterOptions, Map<String, String> options) { if (options != null) { this.originalOptions = new DefaultCodeFormatterOptions(options); 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; } 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; } if (defaultCodeFormatterOptions != null) { this.originalOptions.set(defaultCodeFormatterOptions.getMap()); this.workingOptions.set(defaultCodeFormatterOptions.getMap()); } }