| Summary: | Xpand: Feature Request: Include Statement to include static text like copyright headers for source files | ||
|---|---|---|---|
| Product: | [Modeling] M2T | Reporter: | Olaf Bigalk <bib.odo> |
| Component: | Xpand | Assignee: | Project Inbox <m2t.xpand-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | karsten.thoms, sebastian.zarnekow, sven.efftinge |
| Version: | unspecified | Flags: | karsten.thoms:
kepler+
|
| Target Milestone: | M6 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Olaf Bigalk
I'm not sure if this would be realized. We try to keep the language as small as possible and don't introduce concepts that could be solved with existing means. In this case, this could be solved (and is so in many projects) by providing an Xtend function that does the job. You could even call the XpandFacade in this function, which would solve your second need. But maybe it would be a good idea to add such a function to stdlib? @Karsten: Could you outline briefly what you are going to do here? I would add extensions to org::eclipse::xtend::util::stdlib::io named "includeFile":
String includeFile (String filePath, String encoding)
String includeFile (String filePath)
In Xpand it could be used like this:
«EXTENSION org::eclipse::xtend::util::stdlib::io»
...
«includeFile("header.txt")»
I see sounds good. Added with changeset 10f89fbae927c8ecd0e3e8e35f819cda98ea0062 You may want to use the value of the coding parameter. Fixed Requested via bug 522520. -M. |