Skip to main content
summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMarco Stornelli2019-04-22 03:27:01 -0400
committerMarco Stornelli2019-05-08 14:27:22 -0400
commit62617729fa0ff394f8493338c93eca98f04f438f (patch)
tree30d67a03bc9811a15157302a568c28952ec417be /core
parent5b869afec3affa8714258aad09a1ec5d8f14312a (diff)
downloadorg.eclipse.cdt-62617729fa0ff394f8493338c93eca98f04f438f.tar.gz
org.eclipse.cdt-62617729fa0ff394f8493338c93eca98f04f438f.tar.xz
org.eclipse.cdt-62617729fa0ff394f8493338c93eca98f04f438f.zip
Bug 239878 - Added new line before identifier to the UI
The option was already used but there wasn't any widget in the UI to let user change it. Change-Id: Ib8795468cc83b89bb3ef9676a5e0ed3f288d55da Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/FormatterMessages.java1
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/FormatterMessages.properties1
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/NewLinesTabPage.java4
3 files changed, 6 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/FormatterMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/FormatterMessages.java
index b32d493565..920f5cad94 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/FormatterMessages.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/FormatterMessages.java
@@ -393,6 +393,7 @@ final class FormatterMessages extends NLS {
public static String NewLinesTabPage_newlines_group_option_before_colon_in_constructor_initializer_list;
public static String NewLinesTabPage_newlines_group_option_after_colon_in_constructor_initializer_list;
public static String NewLinesTabPage_newlines_emtpy_statement_on_new_line;
+ public static String NewLinesTabPage_newlines_before_identifier_in_function_declaration;
// 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;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/FormatterMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/FormatterMessages.properties
index 89adf6b4fd..e51ff78e8e 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/FormatterMessages.properties
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/FormatterMessages.properties
@@ -463,6 +463,7 @@ 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_group_option_after_colon_in_constructor_initializer_list=after colon in constructor initializer list
NewLinesTabPage_newlines_emtpy_statement_on_new_line=before empty statement
+NewLinesTabPage_newlines_before_identifier_in_function_declaration=before identifier in function declaration
#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
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/NewLinesTabPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/NewLinesTabPage.java
index 0628080e6f..31ea645cd9 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/NewLinesTabPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/NewLinesTabPage.java
@@ -55,6 +55,10 @@ public class NewLinesTabPage extends FormatterTabPage {
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_before_identifier_in_function_declaration,
+ DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_IDENTIFIER_IN_FUNCTION_DECLARATION,
+ DO_NOT_INSERT_INSERT);
// 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);

Back to the top