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) { |