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 75062 Details for
Bug 198362
Formatter stops working when source code contains following line
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_198362.txt (text/plain), 2.53 KB, created by
Olivier Thomann
on 2007-07-31 13:33:23 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-07-31 13:33:23 EDT
Size:
2.53 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java,v >retrieving revision 1.375 >diff -u -r1.375 Parser.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java 18 Jul 2007 00:41:54 -0000 1.375 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java 31 Jul 2007 16:27:27 -0000 >@@ -1725,15 +1725,28 @@ > } > } else if (expr1 instanceof CombinedBinaryExpression) { > CombinedBinaryExpression cursor; >+ int numberOfParens = (expr1.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT; > // shift cursor; create BE/CBE as needed > if ((cursor = (CombinedBinaryExpression)expr1).arity < > cursor.arityMax) { > cursor.left = new BinaryExpression(cursor.left, > cursor.right, PLUS); >+ if (numberOfParens != 0) { >+ // clear the bits on cursor and put them back on cursor.left >+ cursor.bits &= ~ASTNode.ParenthesizedMASK; >+ cursor.left.bits &= ~ASTNode.ParenthesizedMASK; >+ cursor.left.bits |= numberOfParens << ASTNode.ParenthesizedSHIFT; >+ } > cursor.arity++; > } else { > cursor.left = new CombinedBinaryExpression(cursor.left, > cursor.right, PLUS, cursor.arity); >+ if (numberOfParens != 0) { >+ // clear the bits on cursor and put them back on cursor.left >+ cursor.bits &= ~ASTNode.ParenthesizedMASK; >+ cursor.left.bits &= ~ASTNode.ParenthesizedMASK; >+ cursor.left.bits |= numberOfParens << ASTNode.ParenthesizedSHIFT; >+ } > cursor.arity = 0; > cursor.tuneArityMax(); > } >@@ -1743,10 +1756,10 @@ > // cursor.depthTracker = ((BinaryExpression)cursor.left). > // depthTracker + 1; > this.expressionStack[this.expressionPtr] = cursor; >- } else if (expr1 instanceof BinaryExpression && >- // single out the a + b case >- ((expr1.bits & ASTNode.OperatorMASK) >> >+ } else if (expr1 instanceof BinaryExpression >+ && ((expr1.bits & ASTNode.OperatorMASK) >> > ASTNode.OperatorSHIFT) == OperatorIds.PLUS) { >+ // single out the a + b case > this.expressionStack[this.expressionPtr] = > new CombinedBinaryExpression(expr1, expr2, PLUS, 1); > } else { >@@ -1767,7 +1780,7 @@ > new BinaryExpression( > expr1, > expr2, >- op); >+ op); > } > } > /**
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 198362
: 75062