[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmt] Re: [TCS] Is "autoCreate=ifmissing" usable?

I finally reported this issue on the Bugzilla. Sorry for the delay.

Frédéric Jouault wrote:
createIn adds the created element to the context, whereas lookIn currently does not.

I tried "createIn", but the result is worse than with "lookIn".

With "lookIn", duplicate elements were created, and actually I observe that all elements were added to the context. In the example below, template "VariableRefExpression" does not produce "name not found" errors during injection.

template Assignment :
variable{refersTo=name, lookIn=owningProgram.variables, autoCreate=ifmissing} "=" expression ";";


template VariableRefExpression :
variable{refersTo=name};

With "createIn", duplicate elements are still created, but none are added to the context (or maybe not to the desired context). The injector fails to resolve variable names in "VariableRefExpression".

Best regards,

Guillaume