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 162693 Details for
Bug 295825
[formatter] Commentaries are running away after formatting are used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
v02.txt (text/plain), 2.48 KB, created by
Frederic Fusier
on 2010-03-22 12:32:26 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2010-03-22 12:32:26 EDT
Size:
2.48 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.202 >diff -u -r1.202 Scribe.java >--- formatter/org/eclipse/jdt/internal/formatter/Scribe.java 19 Mar 2010 09:04:36 -0000 1.202 >+++ formatter/org/eclipse/jdt/internal/formatter/Scribe.java 22 Mar 2010 16:07:23 -0000 >@@ -1706,7 +1706,7 @@ > isTokenStar = true; > lineNumber = Util.getLineNumber(this.scanner.currentPosition, this.lineEnds, scannerLine>1 ? scannerLine-2 : 0, this.maxLines); > if (lineNumber == firstLine && previousToken == SKIP_FIRST_WHITESPACE_TOKEN) { >- editStart = this.scanner.getCurrentTokenStartPosition(); >+ buffer.append(' '); > } > previousToken = token; > if (this.scanner.currentCharacter == '/') { >@@ -1888,7 +1888,7 @@ > printIndentationIfNecessary(replacement); > replacement.append(BLOCK_LINE_PREFIX); > this.column = col; >- } else { >+ } else if (buffer.length()==0 || buffer.charAt(0)!=' ') { > replacement.append(' '); > } > } >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java,v >retrieving revision 1.61 >diff -u -r1.61 FormatterCommentsBugsTest.java >--- src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java 19 Mar 2010 09:04:29 -0000 1.61 >+++ src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java 22 Mar 2010 16:07:25 -0000 >@@ -6146,6 +6146,21 @@ > } > > /** >+ * @bug 295825: [formatter] Commentaries are running away after formatting are used >+ * @test Verify that block comment stay unchanged when text starts with a star >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=295825" >+ */ >+public void testBug295825() { >+ String source = >+ "public class A {\n" + >+ " /* * command */\n" + >+ " void method() {\n" + >+ " }\n" + >+ "}\n"; >+ formatSource(source); >+} >+ >+/** > * @bug 300379: [formatter] Fup of bug 287833 > * @test Verify that the leading '{' is not deleted while formatting > * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=300379"
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 295825
: 162693