View | Details | Raw Unified | Return to bug 150741 | Differences between
and this patch

Collapse All | Expand All

(-)ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java (+1 lines)
Lines 420-425 Link Here
420
	public static String NewLinesTabPage_newlines_group_option_empty_method_body;
420
	public static String NewLinesTabPage_newlines_group_option_empty_method_body;
421
	public static String NewLinesTabPage_newlines_group_option_empty_block;
421
	public static String NewLinesTabPage_newlines_group_option_empty_block;
422
	public static String NewLinesTabPage_newlines_group_option_empty_end_of_file;
422
	public static String NewLinesTabPage_newlines_group_option_empty_end_of_file;
423
	public static String NewLinesTabPage_newlines_group_option_empty_label;
423
	public static String NewLinesTabPage_empty_statement_group_title;
424
	public static String NewLinesTabPage_empty_statement_group_title;
424
	public static String NewLinesTabPage_emtpy_statement_group_option_empty_statement_on_new_line;
425
	public static String NewLinesTabPage_emtpy_statement_group_option_empty_statement_on_new_line;
425
	public static String NewLinesTabPage_arrayInitializer_group_title;
426
	public static String NewLinesTabPage_arrayInitializer_group_title;
(-)ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties (+1 lines)
Lines 475-480 Link Here
475
NewLinesTabPage_newlines_group_option_empty_method_body=in empt&y method body
475
NewLinesTabPage_newlines_group_option_empty_method_body=in empt&y method body
476
NewLinesTabPage_newlines_group_option_empty_block=in empty bloc&k
476
NewLinesTabPage_newlines_group_option_empty_block=in empty bloc&k
477
NewLinesTabPage_newlines_group_option_empty_end_of_file=at end of &file
477
NewLinesTabPage_newlines_group_option_empty_end_of_file=at end of &file
478
NewLinesTabPage_newlines_group_option_empty_label=after labels
478
NewLinesTabPage_empty_statement_group_title=Empty statements
479
NewLinesTabPage_empty_statement_group_title=Empty statements
479
NewLinesTabPage_emtpy_statement_group_option_empty_statement_on_new_line=Put empty &statement on new line
480
NewLinesTabPage_emtpy_statement_group_option_empty_statement_on_new_line=Put empty &statement on new line
480
481
(-)ui/org/eclipse/jdt/internal/ui/preferences/formatter/NewLinesTabPage.java (-4 / +6 lines)
Lines 50-55 Link Here
50
	"  public void\nbar\n(@SuppressWarnings(\"unused\")\n int i)\n {\n@SuppressWarnings(\"unused\") int k;\n}\n" + //$NON-NLS-1$
50
	"  public void\nbar\n(@SuppressWarnings(\"unused\")\n int i)\n {\n@SuppressWarnings(\"unused\") int k;\n}\n" + //$NON-NLS-1$
51
	"  void foo() {" + //$NON-NLS-1$
51
	"  void foo() {" + //$NON-NLS-1$
52
	"    ;;" + //$NON-NLS-1$
52
	"    ;;" + //$NON-NLS-1$
53
	"    LABEL:" + //$NON-NLS-1$
53
	"    do {} while (false);" + //$NON-NLS-1$
54
	"    do {} while (false);" + //$NON-NLS-1$
54
	"    for (;;) {}" + //$NON-NLS-1$
55
	"    for (;;) {}" + //$NON-NLS-1$
55
	"  }" + //$NON-NLS-1$
56
	"  }" + //$NON-NLS-1$
Lines 77-82 Link Here
77
		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_anonymous_class_body, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ANONYMOUS_TYPE_DECLARATION, DO_NOT_INSERT_INSERT);
78
		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_anonymous_class_body, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ANONYMOUS_TYPE_DECLARATION, DO_NOT_INSERT_INSERT);
78
		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_method_body, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_METHOD_BODY, DO_NOT_INSERT_INSERT);
79
		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_method_body, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_METHOD_BODY, DO_NOT_INSERT_INSERT);
79
		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_block, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_BLOCK, DO_NOT_INSERT_INSERT);
80
		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_block, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_BLOCK, DO_NOT_INSERT_INSERT);
81
		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_label, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_LABEL, DO_NOT_INSERT_INSERT);
80
		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_enum_declaration, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ENUM_DECLARATION, DO_NOT_INSERT_INSERT);
82
		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_enum_declaration, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ENUM_DECLARATION, DO_NOT_INSERT_INSERT);
81
		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_enum_constant, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ENUM_CONSTANT, DO_NOT_INSERT_INSERT);
83
		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_enum_constant, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ENUM_CONSTANT, DO_NOT_INSERT_INSERT);
82
		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_annotation_decl_body, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ANNOTATION_DECLARATION, DO_NOT_INSERT_INSERT);
84
		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_annotation_decl_body, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ANNOTATION_DECLARATION, DO_NOT_INSERT_INSERT);
Lines 97-113 Link Here
97
	}
99
	}
98
100
99
	protected void initializePage() {
101
	protected void initializePage() {
100
	    fPreview.setPreviewText(PREVIEW);
102
	    this.fPreview.setPreviewText(this.PREVIEW);
101
	}
103
	}
102
104
103
    protected JavaPreview doCreateJavaPreview(Composite parent) {
105
    protected JavaPreview doCreateJavaPreview(Composite parent) {
104
        fPreview= new CompilationUnitPreview(fWorkingValues, parent);
106
        this.fPreview= new CompilationUnitPreview(this.fWorkingValues, parent);
105
        return fPreview;
107
        return this.fPreview;
106
    }
108
    }
107
109
108
    protected void doUpdatePreview() {
110
    protected void doUpdatePreview() {
109
    	super.doUpdatePreview();
111
    	super.doUpdatePreview();
110
        fPreview.update();
112
        this.fPreview.update();
111
    }
113
    }
112
114
113
	private CheckboxPreference createPref(Composite composite, int numColumns, String message, String key, String[] values) {
115
	private CheckboxPreference createPref(Composite composite, int numColumns, String message, String key, String[] values) {

Return to bug 150741