Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365632 - [Xtend2] BEFORE can only be used together with AFTER in FOR/ENDFOR Loop
Summary: [Xtend2] BEFORE can only be used together with AFTER in FOR/ENDFOR Loop
Status: CLOSED FIXED
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.3.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-05 11:51 EST by patrick.lehmann CLA
Modified: 2017-09-19 17:13 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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