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 185757 Details for
Bug 332818
[formatter] Java formatter, Blank Lines tab, only 1st line indented when multiple lines is set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
v00.txt (text/plain), 3.21 KB, created by
Frederic Fusier
on 2010-12-23 05:38:48 EST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2010-12-23 05:38:48 EST
Size:
3.21 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: formatter/org/eclipse/jdt/internal/formatter/Scribe.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java,v >retrieving revision 1.222 >diff -u -r1.222 Scribe.java >--- formatter/org/eclipse/jdt/internal/formatter/Scribe.java 26 Nov 2010 16:42:56 -0000 1.222 >+++ formatter/org/eclipse/jdt/internal/formatter/Scribe.java 22 Dec 2010 17:32:41 -0000 >@@ -1004,6 +1004,7 @@ > for (int i = 0; i < linesNumber; i++) { > printIndentationIfNecessary(this.tempBuffer); > this.tempBuffer.append(this.lineSeparator); >+ this.column = 1; > } > emptyLines = this.tempBuffer.toString(); > } else { >@@ -1020,6 +1021,7 @@ > for (int i = 0; i < linesNumber; i++) { > printIndentationIfNecessary(this.tempBuffer); > this.tempBuffer.append(this.lineSeparator); >+ this.column = 1; > } > emptyLines = this.tempBuffer.toString(); > } else { >@@ -1041,6 +1043,7 @@ > for (int i = 0; i < realNewLineNumber; i++) { > printIndentationIfNecessary(this.tempBuffer); > this.tempBuffer.append(this.lineSeparator); >+ this.column = 1; > } > emptyLines = this.tempBuffer.toString(); > } else { >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java,v >retrieving revision 1.40 >diff -u -r1.40 FormatterBugsTests.java >--- src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java 22 Dec 2010 16:34:42 -0000 1.40 >+++ src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java 22 Dec 2010 17:32:44 -0000 >@@ -7630,6 +7630,59 @@ > } > > /** >+ * @bug 332818: [formatter] Java formatter, Blank Lines tab, only 1st line indented when multiple lines is set >+ * @test Ensure that the indentation is set on all blank lines >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=332818" >+ */ >+public void testBug332818() throws Exception { >+ this.formatterPrefs.indent_empty_lines = true; >+ this.formatterPrefs.number_of_empty_lines_to_preserve = 99; >+ String source = >+ "public class Test {\n" + >+ "\n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ " private String f1;\n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ "\n" + >+ " \n" + >+ " private String f2;\n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ "}\n"; >+ formatSource(source, >+ "public class Test {\n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ " private String f1;\n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ " private String f2;\n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ " \n" + >+ "}\n" >+ ); >+} >+ >+/** > * @bug 332877: [formatter] line comment wrongly put on a new line > * @test Ensure that the comment on last enum constant is not wrongly put on a new line > * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=332877"
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 332818
:
185512
|
185513
|
185613
|
185614
| 185757