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 74826 Details for
Bug 197169
Formatter expands @ in annotation in javadoc, creating invalid tag
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fix
197169.diff (text/plain), 1.81 KB, created by
Matt McCutchen
on 2007-07-27 15:11:09 EDT
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
Matt McCutchen
Created:
2007-07-27 15:11:09 EDT
Size:
1.81 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: formatter/org/eclipse/jdt/internal/formatter/comment/Java2HTMLEntityReader.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/Java2HTMLEntityReader.java,v >retrieving revision 1.3 >diff -u -r1.3 Java2HTMLEntityReader.java >--- formatter/org/eclipse/jdt/internal/formatter/comment/Java2HTMLEntityReader.java 10 May 2006 18:03:41 -0000 1.3 >+++ formatter/org/eclipse/jdt/internal/formatter/comment/Java2HTMLEntityReader.java 27 Jul 2007 18:27:58 -0000 >@@ -14,6 +14,8 @@ > import java.util.HashMap; > import java.util.Map; > >+import org.eclipse.jdt.internal.compiler.parser.*; >+ > /** > * <code>SubstitutionTextReader</code> that will substitute html entities for > * html symbols encountered in the original text. Line breaks and whitespaces >@@ -25,6 +27,12 @@ > > /** The hardcoded entity map. */ > private static final Map fgEntityLookup; >+ >+ /** >+ * True if we have not yet seen a non-whitespace character on the current >+ * line. >+ */ >+ private boolean beginLine = true; > > static { > fgEntityLookup= new HashMap(7); >@@ -50,6 +58,17 @@ > * @see org.eclipse.jdt.internal.ui.text.SubstitutionTextReader#computeSubstitution(int) > */ > protected String computeSubstitution(int c) { >+ /* >+ * When @ is first on a line, translate it to @ so it isn't >+ * misinterpreted as a Javadoc tag. >+ * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=197169 >+ */ >+ if (c == '@') >+ return beginLine ? "@" : null; //$NON-NLS-1$ >+ else if (c == '\n' || c == '\r') >+ beginLine = true; >+ else if (!ScannerHelper.isWhitespace((char) c)) >+ beginLine = false; > String lookup= (String) fgEntityLookup.get(String.valueOf((char) c)); > return lookup; > }
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 197169
: 74826 |
74955