[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Label with Feature Seq Initializer via OCL

Hi, Stephan, Alex,

Perhaps the GMF team would consider applying the ParsingOptions.IMPLICIT_ROOT_CLASS option to provide implicit access to the features of EObject, in models that do not actually declare generalizations to EObject? Then, eContainer() could be used in constraints like this.

It could even be an option in the GMF model, to assuage concerns of OCL portability/compliance.

Cheers,

Christian


Stephan Kleber wrote:
Hi Alex,

thank you.

I looked into it and decided not to do this, because it would have meant a major change in the model. The issue concerns a lot of model elements.

Instead of OCL I used the java-Option and did create the Label Strings myself. There rose one question:

Is it meant to be that I cannot introduce java-Code into the mapping model as I can do with OCL? I had to write directly into the generated methods of class ElementInitializers after generation of the diagram editor.

This is OK to me but seamed to be odd.

Stephan

Alex Shatalin schrieb:
Hello Stephan,

You should introduce back reference "topicContainer" into the Topic model element. As a result OCL constraint will be like:
'Prefix' + topicContainer.topics->size()


-----------------
Alex Shatalin