mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Bug 414681 - Added new line empty statement to UI
Formatter has an option for it but the user can't change it without an option in the UI. Change-Id: Ibe3f36bd55b24ef06c13300792e425592285c8ea Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
This commit is contained in:
parent
d1bd979a00
commit
e753c628ed
3 changed files with 8 additions and 8 deletions
|
@ -391,12 +391,11 @@ final class FormatterMessages extends NLS {
|
|||
public static String NewLinesTabPage_preview_header;
|
||||
public static String NewLinesTabPage_newlines_group_title;
|
||||
public static String NewLinesTabPage_newlines_group_option_before_colon_in_constructor_initializer_list;
|
||||
public static String NewLinesTabPage_newlines_emtpy_statement_on_new_line;
|
||||
// public static String NewLinesTabPage_newlines_group_option_empty_class_body;
|
||||
// public static String NewLinesTabPage_newlines_group_option_empty_method_body;
|
||||
// public static String NewLinesTabPage_newlines_group_option_empty_block;
|
||||
// public static String NewLinesTabPage_newlines_group_option_empty_end_of_file;
|
||||
// public static String NewLinesTabPage_empty_statement_group_title;
|
||||
// public static String NewLinesTabPage_emtpy_statement_group_option_empty_statement_on_new_line;
|
||||
// public static String NewLinesTabPage_arrayInitializer_group_title;
|
||||
// public static String NewLinesTabPage_array_group_option_after_opening_brace_of_array_initializer;
|
||||
// public static String NewLinesTabPage_array_group_option_before_closing_brace_of_array_initializer;
|
||||
|
|
|
@ -461,12 +461,11 @@ NewLinesTabPage_preview_header=New lines
|
|||
NewLinesTabPage_newlines_group_title=Insert new line
|
||||
|
||||
NewLinesTabPage_newlines_group_option_before_colon_in_constructor_initializer_list=before colon in constructor initializer list
|
||||
NewLinesTabPage_newlines_emtpy_statement_on_new_line=before empty statement
|
||||
#NewLinesTabPage_newlines_group_option_empty_class_body=in empty &class body
|
||||
#NewLinesTabPage_newlines_group_option_empty_method_body=in empt&y method body
|
||||
#NewLinesTabPage_newlines_group_option_empty_block=in empty &block
|
||||
#NewLinesTabPage_newlines_group_option_empty_end_of_file=at end of &file
|
||||
#NewLinesTabPage_empty_statement_group_title=Empty statements
|
||||
#NewLinesTabPage_emtpy_statement_group_option_empty_statement_on_new_line=Put empty &statement on new line
|
||||
|
||||
#NewLinesTabPage_arrayInitializer_group_title=Initializer list
|
||||
#NewLinesTabPage_array_group_option_after_opening_brace_of_array_initializer=Insert new line after openin&g brace of initializer list
|
||||
|
|
|
@ -30,10 +30,10 @@ public class NewLinesTabPage extends FormatterTabPage {
|
|||
"private:" + //$NON-NLS-1$
|
||||
"double x;" + //$NON-NLS-1$
|
||||
"double y;" + //$NON-NLS-1$
|
||||
"};"; //$NON-NLS-1$
|
||||
|
||||
protected CheckboxPreference fThenStatementPref;
|
||||
protected CheckboxPreference fSimpleIfPref;
|
||||
"};\n\n\n" + //$NON-NLS-1$
|
||||
"void bar() {\n" + //$NON-NLS-1$
|
||||
"for (int i = 0; i < 10; i++);\n" + //$NON-NLS-1$
|
||||
"}"; //$NON-NLS-1$
|
||||
|
||||
private TranslationUnitPreview fPreview;
|
||||
|
||||
|
@ -49,6 +49,8 @@ public class NewLinesTabPage extends FormatterTabPage {
|
|||
FormatterMessages.NewLinesTabPage_newlines_group_option_before_colon_in_constructor_initializer_list,
|
||||
DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_COLON_IN_CONSTRUCTOR_INITIALIZER_LIST,
|
||||
DO_NOT_INSERT_INSERT);
|
||||
createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_emtpy_statement_on_new_line,
|
||||
DefaultCodeFormatterConstants.FORMATTER_PUT_EMPTY_STATEMENT_ON_NEW_LINE, FALSE_TRUE);
|
||||
// createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_class_body, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_TYPE_DECLARATION, DO_NOT_INSERT_INSERT);
|
||||
// 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);
|
||||
// createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_method_body, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_METHOD_BODY, DO_NOT_INSERT_INSERT);
|
||||
|
|
Loading…
Add table
Reference in a new issue