mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Bug 411911 - Fix some GNU formatter defaults
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca> Change-Id: Idf974c14be894dffecb3e48938732fbd9f227cea Reviewed-on: https://git.eclipse.org/r/14144 Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com> IP-Clean: Marc-Andre Laperle <marc-andre.laperle@ericsson.com> Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
This commit is contained in:
parent
98bc8813e7
commit
5aed22487a
2 changed files with 17 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2012 IBM Corporation and others.
|
||||
* Copyright (c) 2000, 2013 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -9,6 +9,7 @@
|
|||
* IBM Corporation - initial API and implementation
|
||||
* Sergey Prigogin (Google)
|
||||
* Anton Leherbauer (Wind River Systems)
|
||||
* Simon Marchi (Ericsson) - GNU formatter fixes
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.formatter;
|
||||
|
||||
|
@ -1813,8 +1814,10 @@ public class DefaultCodeFormatterOptions {
|
|||
this.indent_breaks_compare_to_cases = true;
|
||||
this.indent_empty_lines = false;
|
||||
this.indent_switchstatements_compare_to_cases = true;
|
||||
this.indent_switchstatements_compare_to_switch = false;
|
||||
this.indentation_size = 8;
|
||||
this.indent_switchstatements_compare_to_switch = true;
|
||||
this.indentation_size = 2;
|
||||
this.alignment_for_parameters_in_method_declaration = Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN;
|
||||
this.alignment_for_arguments_in_method_invocation = Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN;
|
||||
|
||||
this.insert_new_line_after_opening_brace_in_initializer_list = false;
|
||||
this.insert_new_line_after_template_declaration = true;
|
||||
|
@ -1830,6 +1833,8 @@ public class DefaultCodeFormatterOptions {
|
|||
// this.insert_new_line_in_empty_type_declaration = false;
|
||||
|
||||
this.insert_space_before_colon_in_base_clause = true;
|
||||
this.insert_space_before_opening_paren_in_method_declaration = true;
|
||||
this.insert_space_before_opening_paren_in_method_invocation = true;
|
||||
|
||||
this.compact_else_if = true;
|
||||
this.keep_guardian_clause_on_one_line = false;
|
||||
|
@ -1838,9 +1843,9 @@ public class DefaultCodeFormatterOptions {
|
|||
this.keep_simple_if_on_one_line = false;
|
||||
this.keep_then_statement_on_same_line = false;
|
||||
this.put_empty_statement_on_new_line = true;
|
||||
this.tab_size = 2;
|
||||
this.tab_size = 8;
|
||||
this.page_width = 80;
|
||||
this.tab_char = SPACE;
|
||||
this.tab_char = MIXED;
|
||||
this.use_tabs_only_for_leading_indentations = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -723,7 +723,7 @@ public class CodeFormatterTest extends BaseUITestCase {
|
|||
//};
|
||||
|
||||
//int
|
||||
//foo()
|
||||
//foo ()
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
|
@ -733,7 +733,7 @@ public class CodeFormatterTest extends BaseUITestCase {
|
|||
// }
|
||||
//}
|
||||
//float*
|
||||
//bar();
|
||||
//bar ();
|
||||
//template<typename _CharT, typename _Traits>
|
||||
// class basic_ios : public ios_base
|
||||
// {
|
||||
|
@ -1656,7 +1656,7 @@ public class CodeFormatterTest extends BaseUITestCase {
|
|||
//#define FOREVER for(;;)
|
||||
//
|
||||
//void
|
||||
//foo()
|
||||
//foo ()
|
||||
//{
|
||||
// int i = 0;
|
||||
// if (true)
|
||||
|
@ -2764,13 +2764,13 @@ public class CodeFormatterTest extends BaseUITestCase {
|
|||
//}
|
||||
|
||||
//void
|
||||
//foo()
|
||||
//foo ()
|
||||
//{
|
||||
// int i;
|
||||
// for (i = 0; i < 10; i++)
|
||||
// {
|
||||
// }
|
||||
// foo();
|
||||
// foo ();
|
||||
//}
|
||||
public void testForLoopGNU_Bug351399() throws Exception {
|
||||
fOptions.putAll(DefaultCodeFormatterOptions.getGNUSettings().getMap());
|
||||
|
|
Loading…
Add table
Reference in a new issue