Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Duplicate
-
Affects Version/s: 2.6.1.M1
-
Fix Version/s: 2.7.2.Release
-
Component/s: Formatting
-
Labels:None
-
Environment:STS 2.8.1
-
Number of attachments :
Description
Related to: GRECLIPSE-827
Groovy formatter is splitting list with a single (long) element onto multiple lines. I would think that (although the element contained is large) there isn't much benefit to trying to split this when it only results in new lines with only [ or ]
grails.plugins.springsecurity.interceptUrlMap = [ '/js/**': ['IS_AUTHENTICATED_ANONYMOUSLY'], '/css/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],
becomes
'/js/**': [
'IS_AUTHENTICATED_ANONYMOUSLY'
],
'/css/**': [
'IS_AUTHENTICATED_ANONYMOUSLY'
],
Issue Links
- is duplicated by
-
GRECLIPSE-1488
When a List initializer has more than 28 characters between the brackets, the formatter adds a bunch of unnecessary new lines.
-
Reading
GRECLIPSE-827, I see there is a criteria for the "long-ness" of a list : frankly, I expected the code formating setting for "maximum line width" in the "Line Wrapping" section to be the one having the last word on this.Either that or it should have a separate setting user-modifiable controlling that limit.
It is terribly annoying to have a list being broken up in lines when it is not expected. For example, if you are designing a DSL where tabular data is natural, you will probably end up having somewhat long lists that you will want aligned accross lines; actual behavior breaks this big time.