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 105620 Details for
Bug 238090
[formatter] New lines wrongly added while formatting too long @see references
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
v00.txt (text/plain), 2.50 KB, created by
Frederic Fusier
on 2008-06-23 06:35:52 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2008-06-23 06:35:52 EDT
Size:
2.50 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.144 >diff -u -r1.144 Scribe.java >--- formatter/org/eclipse/jdt/internal/formatter/Scribe.java 20 Jun 2008 15:54:53 -0000 1.144 >+++ formatter/org/eclipse/jdt/internal/formatter/Scribe.java 23 Jun 2008 10:31:49 -0000 >@@ -2558,6 +2558,7 @@ > headerLine = false; > maxColumn--; > } >+ spacePosition = -1; > } > buffer.append(this.scanner.source, this.scanner.startPosition, tokenLength); > this.column += tokenLength; >#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.13 >diff -u -r1.13 FormatterCommentsBugsTest.java >--- src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java 20 Jun 2008 15:57:25 -0000 1.13 >+++ src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java 23 Jun 2008 10:31:50 -0000 >@@ -1302,4 +1302,41 @@ > "}\n" > ); > } >+ >+/** >+ * @bug 238090: [formatter] Formatter insert blank lines after javadoc if javadoc contains Commons Attributes @@ annotations >+ * @test Ensure that no unexpected empty new lines are added while formatting a reference >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=238090" >+ */ >+public void testBug238090() throws JavaModelException { >+ this.preferences.comment_line_length = 40; >+ String source = >+ "package test.bugs;\n" + >+ "public class LongNameClass {\n" + >+ "/**\n" + >+ " * @see test.bugs.\n" + >+ " * LongNameClass#longNameMethod(java.lang.String)\n" + >+ " */\n" + >+ "public void foo() {\n" + >+ "}\n" + >+ "\n" + >+ "void longNameMethod(String str) {\n" + >+ "}\n" + >+ "}\n"; >+ formatSource(source, >+ "package test.bugs;\n" + >+ "\n" + >+ "public class LongNameClass {\n" + >+ " /**\n" + >+ " * @see test.bugs.\n" + >+ " * LongNameClass#longNameMethod(java.lang.String)\n" + >+ " */\n" + >+ " public void foo() {\n" + >+ " }\n" + >+ "\n" + >+ " void longNameMethod(String str) {\n" + >+ " }\n" + >+ "}\n" >+ ); >+} > }
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 238090
: 105620