Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 7283 Details for
Bug 49351
New code formatter: left curly brace placement
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch for org.eclipse.jdt.core.tests.model.
org.eclipse.jdt.core.tests.model.diff (text/plain), 10.20 KB, created by
Igor Fedorenko
on 2003-12-27 02:06:18 EST
(
hide
)
Description:
Patch for org.eclipse.jdt.core.tests.model.
Filename:
MIME Type:
Creator:
Igor Fedorenko
Created:
2003-12-27 02:06:18 EST
Size:
10.20 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java >=================================================================== >retrieving revision 1.52 >diff -u -r1.52 FormatterRegressionTests.java >--- src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java 8 Dec 2003 15:55:07 -0000 1.52 >+++ src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java 27 Dec 2003 06:55:30 -0000 >@@ -4476,4 +4476,47 @@ > DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); > runTest(codeFormatter, "test393", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$ > } >+ >+ /** >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=49351 >+ */ >+ public void test394() { >+ Map options = DefaultCodeFormatterConstants.getJavaConventionsSettings(); >+ DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >+ preferences.use_tab = true; >+ preferences.page_width = 40; >+ preferences.block_brace_position = DefaultCodeFormatterConstants.NEXT_LINE_ON_WRAP; >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); >+ runTest(codeFormatter, "test394", "If.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$ >+ runTest(codeFormatter, "test394", "For.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$ >+ runTest(codeFormatter, "test394", "While.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ >+ /** >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=49351 >+ */ >+ public void test395() { >+ Map options = DefaultCodeFormatterConstants.getJavaConventionsSettings(); >+ DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >+ preferences.use_tab = true; >+ preferences.page_width = 40; >+ preferences.type_declaration_brace_position = DefaultCodeFormatterConstants.NEXT_LINE_ON_WRAP; >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); >+ runTest(codeFormatter, "test395", "C.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$ >+ runTest(codeFormatter, "test395", "I.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$ >+ runTest(codeFormatter, "test395", "Inner.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ >+ /** >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=49351 >+ */ >+ public void test396() { >+ Map options = DefaultCodeFormatterConstants.getJavaConventionsSettings(); >+ DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >+ preferences.use_tab = true; >+ preferences.page_width = 40; >+ preferences.method_declaration_brace_position = DefaultCodeFormatterConstants.NEXT_LINE_ON_WRAP; >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); >+ runTest(codeFormatter, "test396", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$ >+ } > } >Index: workspace/Converter/test0191/Test.java >=================================================================== >RCS file: workspace/Converter/test0191/Test.java >diff -N workspace/Converter/test0191/Test.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Converter/test0191/Test.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,8 @@ >+package test0191; >+import java.util.*; >+public class Test { >+ public void foo() { >+ boolean b; >+ b= 1 < 10 && /*]*/2 < 20/*[*/; >+ } >+} >Index: workspace/Formatter/test394/For_in.java >=================================================================== >RCS file: workspace/Formatter/test394/For_in.java >diff -N workspace/Formatter/test394/For_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test394/For_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,10 @@ >+class Example { >+ public void f() { >+ for (;;) { >+ i = 1; >+ } >+ for (; 1 == 2 && 2 == i++; i++) { >+ i = 1; >+ } >+ } >+} >Index: workspace/Formatter/test394/For_out.java >=================================================================== >RCS file: workspace/Formatter/test394/For_out.java >diff -N workspace/Formatter/test394/For_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test394/For_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,11 @@ >+class Example { >+ public void f() { >+ for (; ; ) { >+ i = 1; >+ } >+ for (; 1 == 2 && 2 == i++; i++) >+ { >+ i = 1; >+ } >+ } >+} >Index: workspace/Formatter/test394/If_in.java >=================================================================== >RCS file: workspace/Formatter/test394/If_in.java >diff -N workspace/Formatter/test394/If_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test394/If_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,18 @@ >+class Example { >+ public void f() { >+ if (1 == 2 && 2 == 3) { >+ i = 1; >+ } >+ if (1 == 2 && 2 == 3 && 2 == 3) { >+ i = 1; >+ } >+ if (1 == 2 && 2 == 3 && 2 == 3 && 2 == 3) >+ { >+ i = 1; >+ } >+ if (1 == 2 && 2 == 3 && 2 == 3 >+ && 2 == 3) { >+ i = 1; >+ } >+ } >+} >Index: workspace/Formatter/test394/If_out.java >=================================================================== >RCS file: workspace/Formatter/test394/If_out.java >diff -N workspace/Formatter/test394/If_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test394/If_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,21 @@ >+class Example { >+ public void f() { >+ if (1 == 2 && 2 == 3) { >+ i = 1; >+ } >+ if (1 == 2 && 2 == 3 && 2 == 3) >+ { >+ i = 1; >+ } >+ if (1 == 2 && 2 == 3 && 2 == 3 >+ && 2 == 3) >+ { >+ i = 1; >+ } >+ if (1 == 2 && 2 == 3 && 2 == 3 >+ && 2 == 3) >+ { >+ i = 1; >+ } >+ } >+} >Index: workspace/Formatter/test394/While_in.java >=================================================================== >RCS file: workspace/Formatter/test394/While_in.java >diff -N workspace/Formatter/test394/While_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test394/While_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,10 @@ >+class Example { >+ public void f() { >+ while (true) { >+ i = 1; >+ } >+ while (1 == 2 && 2 == i++ + 11) { >+ i = 1; >+ } >+ } >+} >Index: workspace/Formatter/test394/While_out.java >=================================================================== >RCS file: workspace/Formatter/test394/While_out.java >diff -N workspace/Formatter/test394/While_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test394/While_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,11 @@ >+class Example { >+ public void f() { >+ while (true) { >+ i = 1; >+ } >+ while (1 == 2 && 2 == i++ + 11) >+ { >+ i = 1; >+ } >+ } >+} >Index: workspace/Formatter/test395/C_in.java >=================================================================== >RCS file: workspace/Formatter/test395/C_in.java >diff -N workspace/Formatter/test395/C_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test395/C_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,2 @@ >+class Example extends Aaaaaaaaaaaaaaaaaaaa { >+} >Index: workspace/Formatter/test395/C_out.java >=================================================================== >RCS file: workspace/Formatter/test395/C_out.java >diff -N workspace/Formatter/test395/C_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test395/C_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,4 @@ >+class Example extends >+ Aaaaaaaaaaaaaaaaaaaa >+{ >+} >Index: workspace/Formatter/test395/I_in.java >=================================================================== >RCS file: workspace/Formatter/test395/I_in.java >diff -N workspace/Formatter/test395/I_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test395/I_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,2 @@ >+interface Example extends Aaaaaaaaaaaaa { >+} >Index: workspace/Formatter/test395/I_out.java >=================================================================== >RCS file: workspace/Formatter/test395/I_out.java >diff -N workspace/Formatter/test395/I_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test395/I_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,3 @@ >+interface Example extends Aaaaaaaaaaaaa >+{ >+} >Index: workspace/Formatter/test395/Inner_in.java >=================================================================== >RCS file: workspace/Formatter/test395/Inner_in.java >diff -N workspace/Formatter/test395/Inner_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test395/Inner_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,8 @@ >+class Example { >+ class Inner { >+ } >+ class Innerrrrrrrrrrrrrrrrrrrrrrrrr { >+ } >+ class Innerrrrrrrrrrrrrrrrrrrrrrrrrrrr { >+ } >+} >Index: workspace/Formatter/test395/Inner_out.java >=================================================================== >RCS file: workspace/Formatter/test395/Inner_out.java >diff -N workspace/Formatter/test395/Inner_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test395/Inner_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,12 @@ >+class Example { >+ class Inner { >+ } >+ >+ class Innerrrrrrrrrrrrrrrrrrrrrrrrr >+ { >+ } >+ >+ class Innerrrrrrrrrrrrrrrrrrrrrrrrrrrr >+ { >+ } >+} >Index: workspace/Formatter/test396/A_in.java >=================================================================== >RCS file: workspace/Formatter/test396/A_in.java >diff -N workspace/Formatter/test396/A_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test396/A_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,6 @@ >+class Example { >+ public void test() throws Aaaaaa, Bbbbbbb { >+ } >+ void test2(int a, int b, int c, int d) { >+ } >+} >Index: workspace/Formatter/test396/A_out.java >=================================================================== >RCS file: workspace/Formatter/test396/A_out.java >diff -N workspace/Formatter/test396/A_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test396/A_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,11 @@ >+class Example { >+ public void test() throws Aaaaaa, >+ Bbbbbbb >+ { >+ } >+ >+ void test2(int a, int b, int c, >+ int d) >+ { >+ } >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 49351
:
7281
|
7282
|
7283
|
7284
|
7285
|
7289
|
7290
|
7291