/** * Returns the default Eclipse formatter settings * * @return the Eclipse default settings * @since 3.1 */ public static Map getEclipseDefaultSettings() { return DefaultCodeFormatterOptions.getEclipseDefaultSettings().getMap(); }
/** * Returns the formatter settings that most closely approximate * the default formatter settings of Eclipse version 2.1. * * @return the Eclipse 2.1 settings * @since 3.0 */ public static Map getEclipse21Settings() { return DefaultCodeFormatterOptions.getDefaultSettings().getMap(); }
/** * Returns the default Eclipse formatter settings * * @return the Eclipse default settings * @since 3.1 */ public static Map getEclipseDefaultSettings() { return DefaultCodeFormatterOptions.getEclipseDefaultSettings().getMap(); }
/** * Returns the settings according to the Java conventions. * * @return the settings according to the Java conventions * @since 3.0 */ public static Map getJavaConventionsSettings() { return DefaultCodeFormatterOptions.getJavaConventionsSettings().getMap(); } /**
/** * Returns the default Eclipse formatter settings * * @return the Eclipse default settings * @since 3.1 */ public static Map getEclipseDefaultSettings() { return DefaultCodeFormatterOptions.getEclipseDefaultSettings().getMap(); }
/** * Returns the settings according to the Java conventions. * * @return the settings according to the Java conventions * @since 3.0 */ public static Map getJavaConventionsSettings() { return DefaultCodeFormatterOptions.getJavaConventionsSettings().getMap(); } /**
/** * Returns the default Eclipse formatter settings * * @return the Eclipse default settings * @since 3.1 */ public static Map getEclipseDefaultSettings() { return DefaultCodeFormatterOptions.getEclipseDefaultSettings().getMap(); }
/** * Returns the settings according to the Java conventions. * * @return the settings according to the Java conventions * @since 3.0 */ public static Map getJavaConventionsSettings() { return DefaultCodeFormatterOptions.getJavaConventionsSettings().getMap(); } /**
/** * Returns the settings according to the Java conventions. * * @return the settings according to the Java conventions * @since 3.0 */ public static Map getJavaConventionsSettings() { return DefaultCodeFormatterOptions.getJavaConventionsSettings().getMap(); } /**
/** * Returns the default Eclipse formatter settings * * @return the Eclipse default settings * @since 3.1 */ public static Map getEclipseDefaultSettings() { return DefaultCodeFormatterOptions.getEclipseDefaultSettings().getMap(); }
/** * Returns the formatter settings that most closely approximate * the default formatter settings of Eclipse version 2.1. * * @return the Eclipse 2.1 settings * @since 3.0 */ public static Map getEclipse21Settings() { DefaultCodeFormatterOptions options = DefaultCodeFormatterOptions.getDefaultSettings(); options.page_width = 80; // changed with bug 356841 return options.getMap(); }
/** * Returns the settings according to the Java conventions. * * @return the settings according to the Java conventions * @since 3.0 */ public static Map getJavaConventionsSettings() { return DefaultCodeFormatterOptions.getJavaConventionsSettings().getMap(); } /**
/** * Returns the formatter settings that most closely approximate * the default formatter settings of Eclipse version 2.1. * * @return the Eclipse 2.1 settings * @since 3.0 */ public static Map getEclipse21Settings() { return DefaultCodeFormatterOptions.getDefaultSettings().getMap(); }
/** * Returns the formatter settings that most closely approximate * the default formatter settings of Eclipse version 2.1. * * @return the Eclipse 2.1 settings * @since 3.0 */ public static Map getEclipse21Settings() { return DefaultCodeFormatterOptions.getDefaultSettings().getMap(); }
/** * Returns the default Eclipse formatter settings * * @return the Eclipse default settings * @since 3.1 */ public static Map getEclipseDefaultSettings() { return DefaultCodeFormatterOptions.getEclipseDefaultSettings().getMap(); }
/** * Returns the settings according to the Java conventions. * * @return the settings according to the Java conventions * @since 3.0 */ public static Map getJavaConventionsSettings() { return DefaultCodeFormatterOptions.getJavaConventionsSettings().getMap(); } /**
/** * Returns the formatter settings that most closely approximate * the default formatter settings of Eclipse version 2.1. * * @return the Eclipse 2.1 settings * @since 3.0 */ public static Map getEclipse21Settings() { DefaultCodeFormatterOptions options = DefaultCodeFormatterOptions.getDefaultSettings(); options.page_width = 80; // changed with bug 356841 options.comment_count_line_length_from_starting_position = false; return options.getMap(); }
private DefaultCodeFormatter getCommentCodeFormatter() { if (this.commentCodeFormatter == null) { Map<String, String> options2 = this.options.getMap(); options2.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_LINE_LENGTH, String.valueOf(this.options.comment_line_length - this.commentIndent - COMMENT_LINE_SEPARATOR_LENGTH)); options2.put(DefaultCodeFormatterConstants.FORMATTER_LINE_SPLIT, String.valueOf(this.options.page_width - this.commentIndent - COMMENT_LINE_SEPARATOR_LENGTH)); options2.put(CompilerOptions.OPTION_Source, this.sourceLevel); this.commentCodeFormatter = new DefaultCodeFormatter(options2); } return this.commentCodeFormatter; }
/** * Returns the formatter settings that most closely approximate * the default formatter settings of Eclipse version 2.1. * * @return the Eclipse 2.1 settings * @since 3.0 */ public static Map getEclipse21Settings() { DefaultCodeFormatterOptions options = DefaultCodeFormatterOptions.getDefaultSettings(); options.page_width = 80; // changed with bug 356841 options.comment_count_line_length_from_starting_position = false; return options.getMap(); }
private static void setFormattingOptions(Map<String, String> options) { Map<String, String> defaultOptions = DefaultCodeFormatterOptions.getEclipseDefaultSettings().getMap(); defaultOptions.putAll(options); Hashtable<String, String> javaOptions = JavaCore.getOptions(); defaultOptions.entrySet().stream().filter(p -> p.getKey().startsWith(FORMATTER_OPTION_PREFIX)).forEach(p -> { javaOptions.put(p.getKey(), p.getValue()); }); JavaCore.setOptions(javaOptions); }