Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Code Generation
Code Generation [message #1840670] Wed, 21 April 2021 19:35 Go to next message
Thomas Chiang is currently offline Thomas ChiangFriend
Messages: 103
Registered: March 2020
Senior Member

I have my ecore metamodels that I have defined. The are inter-dependent on one another. I have chosen to use Sirius in order to generate a graphical editor for the instances of my metamodel. While doing so, I have been running into issues when trying to define the graphical representation of the reference classes that I have defined that connect classes between my metamodels; the Input and Output classes.

I am currently trying to debug to figure out what mighty be preventing the graphical representation from appearing in my editor as everything else seems to be working just fine and it passes the built in validation tool as well. Then I came across the generation section for the ecore models and I was wondering if there is a setting in there or a boolean value of some sort that is usually untouched that would allow for element based edges to be defined in Sirius that connects two different metamodels. Is there somewhere I can go for the documentation on what exactly all of these values are in the generation section here of my ecore metamodels?
Re: Code Generation [message #1840682 is a reply to message #1840670] Thu, 22 April 2021 05:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33180
Registered: July 2009
Senior Member
Assuming you've read the documentation linked here:

Use the forum linked there to ask questions specifically about Sirius.

Descriptions for the properties are either in the status line for the normal properties view and on the little ? for the forms properties view. And of course the properties change depending on what you have selected. These appear to be the properties of the package, not properties of a reference.

Ed Merks
Professional Support:
Re: Code Generation [message #1840699 is a reply to message #1840682] Thu, 22 April 2021 08:37 Go to previous message
German Vega is currently offline German VegaFriend
Messages: 104
Registered: December 2015
Location: Grenoble, France
Senior Member
Hello Thomas,

From your description is not clear what exactly is not working.

It is not clear if your problems are related to the ecore package definitions or your Sirius definitions (and better ask in the Sirius forum, as Ed suggested you).

One may guess from the screenshot that you successfully defined your metamodel in several packages.

In your question you mentioned the classes Input and Output, the only thing I can see on the screenshot that could be problematic is that you actually
have two different classes with those same names in different packages (one inherit from Local_Reference and the other from Global_Reference).

Sirius is very "flexible" concerning references to domain classes, if you do not explicitly specify the referenced metamodels it will lookup everywhere in the workspace
for a class with the given name, and many times it ends up picking up the wrong one.

You better use qualified names to reference your classes in your Sirius designer definition and explicitly reference the used metamodels ( as adviced in the sirius documentation) :

It is recommended that the Diagram Description be explicitly associated with the meta-model(s) of the semantic elements it will represent. You can add
referenced meta-models from different sources in the Metamodels property section of the Diagram Description. Sirius will work even without this association,
but setting it explicitly will give you better feedback when validating your VSM .

Why are you mentioning code generation in your post? what make you think this may be related to your problem?

Generating java code for your metamodel is not related, in principle, to Sirius designer definitions.

Again, Sirius is very flexible, it can work with generated or not generated (dynamic) metamodels, available on the workspace or installed in the Eclipse EMF registry, etc, etc.

What is your configuration? have you generated java code for your metamodel? did you generate the basic tree editor ? this may be a good idea, as you can check
that your metamodel is working, before getting into Sirius matters

Previous Topic:[CDO] Can't get repositories to checkout properly
Next Topic:Enforce unique IDs (also for deep copies)
Goto Forum:

Current Time: Mon Jul 15 08:26:16 GMT 2024

Powered by FUDForum. Page generated in 0.03235 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top