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 212440 Details for
Bug 372801
[formatter] 'Never join wrapped lines' inconsistent behavior, breaking other rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposition of a solution
01.patch (text/plain), 1.42 KB, created by
Mateusz Matela
on 2012-03-11 19:15:35 EDT
(
hide
)
Description:
Proposition of a solution
Filename:
MIME Type:
Creator:
Mateusz Matela
Created:
2012-03-11 19:15:35 EDT
Size:
1.42 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java >index ced5686..34bdea0 100644 >--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java >+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java >@@ -1202,10 +1202,10 @@ > private int useAlignmentBreakIndentation(int emptyLinesRules) { > // preserve line breaks in wrapping if specified > // see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=198074 >- boolean specificEmptyLinesRule = emptyLinesRules != PRESERVE_EMPTY_LINES_KEEP_LAST_NEW_LINES_INDENTATION; >- if ((this.currentAlignment != null || specificEmptyLinesRule) && !this.formatter.preferences.join_wrapped_lines) { >+ if (!this.formatter.preferences.join_wrapped_lines && this.currentAlignment != null && this.currentAlignment.couldBreak()) { > // insert a new line only if it has not been already done before >- // see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=283476 >+ // see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=283467 >+ boolean specificEmptyLinesRule = emptyLinesRules != PRESERVE_EMPTY_LINES_KEEP_LAST_NEW_LINES_INDENTATION; > if (this.lastNumberOfNewLines == 0 || specificEmptyLinesRule || this.formatter.arrayInitializersDepth >= 0) { > > // Do not use alignment break indentation in specific circumstances
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 372801
:
211765
| 212440 |
213608