Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 365632

Summary: [Xtend2] BEFORE can only be used together with AFTER in FOR/ENDFOR Loop
Product: [Tools] Xtend Reporter: patrick.lehmann
Component: CoreAssignee: Project Inbox <xtend-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow, sven.efftinge
Version: 2.3.0Flags: sebastian.zarnekow: juno+
Target Milestone: M7   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description patrick.lehmann CLA 2011-12-05 11:51:29 EST
Build Identifier: Build id: 20110916-0149

In Rich-Strings using the FOR/ENDFOR Loop, BEFORE can only be used together with  AFTER. If BEFORE is used alone, it is not called.

Reproducible: Always

Steps to Reproduce:
Example Code:

class XtendCheck {
	
	def print(Iterable<String> strings) {
		'''«FOR s:strings BEFORE printBefore»
		«ENDFOR»'''
	}
	
	def printAfter() {
		'''after'''
	}
	
	def printBefore() {
		'''before'''
	}
}

Workaround: use an empty AFTER like "AFTER ''''''"
Comment 1 Sven Efftinge CLA 2012-04-10 09:30:00 EDT
pushed to master
Comment 2 Karsten Thoms CLA 2017-09-19 17:02:30 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:13:54 EDT
Closing all bugs that were set to RESOLVED before Neon.0