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 158488 Details for
Bug 300379
[formatter] Fup of bug 287833
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
v00.txt (text/plain), 2.98 KB, created by
Frederic Fusier
on 2010-02-08 11:55:31 EST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2010-02-08 11:55:31 EST
Size:
2.98 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: formatter/org/eclipse/jdt/internal/formatter/FormatterCommentParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatterCommentParser.java,v >retrieving revision 1.30 >diff -u -r1.30 FormatterCommentParser.java >--- formatter/org/eclipse/jdt/internal/formatter/FormatterCommentParser.java 7 Jan 2010 20:18:49 -0000 1.30 >+++ formatter/org/eclipse/jdt/internal/formatter/FormatterCommentParser.java 8 Feb 2010 16:54:01 -0000 >@@ -416,7 +416,8 @@ > int ptr = this.htmlTagsPtr; > while (ptr >= 0) { > if (getHtmlTagIndex(this.htmlTags[ptr--]) == JAVADOC_CODE_TAGS_ID) { >- if (this.textStart == -1) this.textStart = previousPosition; >+ if (this.textStart == -1) this.textStart = this.inlineTagStarted ? this.inlineTagStart : previousPosition; >+ this.inlineTagStarted = false; > return true; > } > } >#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.47 >diff -u -r1.47 FormatterCommentsBugsTest.java >--- src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java 21 Sep 2009 07:28:29 -0000 1.47 >+++ src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java 8 Feb 2010 16:54:02 -0000 >@@ -4934,4 +4934,63 @@ > "}\n"); > } > >+/** >+ * @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" >+ */ >+public void testBug300379() { >+ String source = >+ "public class X {\n" + >+ " /**\n" + >+ " * <pre> {@code\n" + >+ " * \n" + >+ " * public class X {\n" + >+ " * }}</pre>\n" + >+ " */\n" + >+ " public void foo() {}\n" + >+ "}\n"; >+ >+ formatSource(source, >+ "public class X {\n" + >+ " /**\n" + >+ " * <pre>\n" + >+ " * {\n" + >+ " * @code\n" + >+ " * public class X {\n" + >+ " * }\n" + >+ " * }\n" + >+ " * </pre>\n" + >+ " */\n" + >+ " public void foo() {\n" + >+ " }\n" + >+ "}\n"); >+} >+public void testBug300379b() { >+ String source = >+ "public class X {\n" + >+ " /**\n" + >+ " * <pre> {@code\n" + >+ " * \n" + >+ " * public class X {}}</pre>\n" + >+ " */\n" + >+ " public void foo() {}\n" + >+ "}\n"; >+ >+ formatSource(source, >+ "public class X {\n" + >+ " /**\n" + >+ " * <pre>\n" + >+ " * {\n" + >+ " * @code\n" + >+ " * public class X {\n" + >+ " * }\n" + >+ " * }\n" + >+ " * </pre>\n" + >+ " */\n" + >+ " public void foo() {\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 300379
: 158488