Bug 434690 - [Formatter] Prefix before template FOR loop increases indentation
Summary: [Formatter] Prefix before template FOR loop increases indentation
Status: NEW
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.6.0   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-13 02:41 EDT by Stefan Oehme CLA
Modified: 2016-08-07 11:00 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Oehme CLA 2014-05-13 02:41:58 EDT
'''
return «FOR field : cls.persistentState SEPARATOR " &&" AFTER ";"»
  «Objects».equal(«field.simpleName», other.«field.simpleName»)
«ENDFOR»
'''

The indentation increases with each formatter run. 

Of course this can easily be fixed on the user side by correctly using the FOR loop:

'''
«FOR field : cls.persistentState BEFORE "return" SEPARATOR " &&" AFTER ";"»
  «Objects».equal(«field.simpleName», other.«field.simpleName»)
«ENDFOR»
'''
Comment 1 Christian Dietrich CLA 2016-08-07 11:00:38 EDT
bug ist still valid