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

Bug 351098

Summary: [Xpand] Arbitrary text outside of define blocks possible
Product: [Modeling] M2T Reporter: Dietmar Stoll <btickets>
Component: XpandAssignee: Project Inbox <m2t.xpand-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: karsten.thoms
Version: 1.1.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Dietmar Stoll CLA 2011-07-04 10:29:42 EDT
Build Identifier: 

In an *.xpt file, one can enter arbitrary text between DEFINE statements, or between IMPORT and DEFINE statements. The text is highlighted in blue. I think this should raise an error and only be allowed inside REM and ENDREM tags.

Example:

<<IMPORT my::Model>>

arbitrary text

<<DEFINE main FOR MyModelEle>>
<<ENDDEFINE>>

documentantion and text outside of rem section

<<DEFINE main FOR MyOtherEle>>
<<ENDDEFINE>>

Reproducible: Always
Comment 1 Karsten Thoms CLA 2011-07-06 10:15:35 EDT
I don't consider this as a problem. The text is just ignored.
Comment 2 Dietmar Stoll CLA 2011-07-06 11:45:42 EDT
True, but here's a related case: When the text is at the very beginning of the file, I get (for instance) the following error when executing the template, but no error at development time:

Problems running workflow workflow.MyDslGenerator: no viable alternative at input 'MyArbitraryText' on line 1
Comment 3 Karsten Thoms CLA 2020-04-30 13:54:54 EDT
This is a batch close of open M2T Xpand bugs. It is not planned work on this component in the foreseeable future. If you think this issue needs to be solved and you plan to contribute a fix then feel free to reopen it.