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 129402 Details for
Bug 221018
formatting fails for " something()()"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fixes the formatter to handle chaining functions calls
patchFor221018 (text/plain), 2.00 KB, created by
Chris Jaun
on 2009-03-19 18:22:56 EDT
(
hide
)
Description:
Fixes the formatter to handle chaining functions calls
Filename:
MIME Type:
Creator:
Chris Jaun
Created:
2009-03-19 18:22:56 EDT
Size:
2.00 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.jsdt.core >Index: src/org/eclipse/wst/jsdt/internal/formatter/CodeFormatterVisitor.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/formatter/CodeFormatterVisitor.java,v >retrieving revision 1.24 >diff -u -r1.24 CodeFormatterVisitor.java >--- src/org/eclipse/wst/jsdt/internal/formatter/CodeFormatterVisitor.java 28 Jan 2009 23:52:47 -0000 1.24 >+++ src/org/eclipse/wst/jsdt/internal/formatter/CodeFormatterVisitor.java 19 Mar 2009 22:22:37 -0000 >@@ -1382,7 +1382,9 @@ > do { > try { > this.scribe.alignFragment(cascadingMessageSendAlignment, 0); >- this.scribe.printNextToken(TerminalTokens.TokenNameDOT); >+ //this.scribe.printNextToken(TerminalTokens.TokenNameDOT); Fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=221018 >+ // functions can return functions in javascript so there won't always be a dot >+ this.scribe.printOptionalNextToken(TerminalTokens.TokenNameDOT, false); > for (int i = startingPositionInCascade; i < size; i++) { > MessageSend currentMessageSend = fragments[i]; > final int numberOfParens = (currentMessageSend.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT; >@@ -1412,7 +1414,9 @@ > } > } > ASTNode[] arguments = currentMessageSend.arguments; >- this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier); // selector >+ // Fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=221018 >+ // functions can return functions in javascript so there won't always be another identifier name >+ this.scribe.printOptionalNextToken(TerminalTokens.TokenNameIdentifier, false); // selector > this.scribe.printNextToken(TerminalTokens.TokenNameLPAREN, this.preferences.insert_space_before_opening_paren_in_method_invocation); > if (arguments != null) { > if (this.preferences.insert_space_after_opening_paren_in_method_invocation) {
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
Flags:
thatnitind
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 221018
: 129402