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 110357 Details for
Bug 241345
[formatter] Didn't Format HTML tags is unavailable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
v00.txt (text/plain), 3.61 KB, created by
Frederic Fusier
on 2008-08-19 12:11:00 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2008-08-19 12:11:00 EDT
Size:
3.61 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.21 >diff -u -r1.21 FormatterCommentParser.java >--- formatter/org/eclipse/jdt/internal/formatter/FormatterCommentParser.java 8 Jul 2008 10:44:19 -0000 1.21 >+++ formatter/org/eclipse/jdt/internal/formatter/FormatterCommentParser.java 19 Aug 2008 16:04:00 -0000 >@@ -27,6 +27,7 @@ > char[][] htmlTags; > int htmlTagsPtr = -1; > private boolean invalidTagName; >+ public boolean parseHtmlTags; > > public FormatterCommentParser(long sourceLevel) { > super(null); >@@ -187,6 +188,7 @@ > * closing (e.g. </tag_name>). > */ > protected boolean parseHtmlTag(int previousPosition, int endTextPosition) throws InvalidInputException { >+ if (!this.parseHtmlTags) return false; > boolean closing = false; > boolean valid = false; > boolean incremented = false; >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.147 >diff -u -r1.147 Scribe.java >--- formatter/org/eclipse/jdt/internal/formatter/Scribe.java 1 Jul 2008 10:04:23 -0000 1.147 >+++ formatter/org/eclipse/jdt/internal/formatter/Scribe.java 19 Aug 2008 16:04:02 -0000 >@@ -949,6 +949,7 @@ > this.formatterCommentParser.source = this.scanner.source; > this.formatterCommentParser.scanner.lineEnds = this.lineEnds; > this.formatterCommentParser.scanner.linePtr = this.maxLines; >+ this.formatterCommentParser.parseHtmlTags = this.formatter.preferences.comment_format_html; > } > > /** >#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.22 >diff -u -r1.22 FormatterCommentsBugsTest.java >--- src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java 8 Jul 2008 10:44:17 -0000 1.22 >+++ src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java 19 Aug 2008 16:04:04 -0000 >@@ -1915,4 +1915,40 @@ > "}\n" > ); > } >+ >+/** >+ * @bug 241345: [formatter] Didn't Format HTML tags is unavailable >+ * @test Ensure that unset 'Format HTML tags' preference format HTML tags like simple text >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=241345" >+ */ >+public void testBug241345() throws JavaModelException { >+ this.preferences.comment_format_html = false; >+ String source = >+ "/**\n" + >+ " * <p>Should not format HTML paragraph</p>\n" + >+ " */\n" + >+ "public interface Test {\n" + >+ " /**\n" + >+ " * \n" + >+ " * These possibilities include: <ul><li>Formatting of header\n" + >+ " * comments.</li><li>Formatting of Javadoc tags</li></ul>\n" + >+ " */\n" + >+ " int bar();\n" + >+ "\n" + >+ "}\n"; >+ formatSource(source, >+ "/**\n" + >+ " * <p>Should not format HTML paragraph</p>\n" + >+ " */\n" + >+ "public interface Test {\n" + >+ " /**\n" + >+ " * \n" + >+ " * These possibilities include: <ul><li>Formatting of header\n" + >+ " * comments.</li><li>Formatting of Javadoc tags</li></ul>\n" + >+ " */\n" + >+ " int bar();\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 241345
:
107793
| 110357 |
110425