Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gmf-dev] GMF wizards and non containment references

Hi,
we are using GMF with several diagrams that are linked to classes belonging to one single model.
In practice our ecore contains both a main hierarchy of model classes and several hierarchies of classes that are used by the various GMF diagrams.
Each class used to represent a graphical object has references to the underlying model classes.
The top diagram class has containment references to the diagram object classes, while the latter have non-containment references to model classes (since a model class may be shared by more diagram class).
This way, however, the GMF wizards fails to generate the correct graph, tools and mapping files.
The workaround that we've found is the following:
first we remove the non-containment references to the model classes in order to make the GMF wizards work correctly;
then we re-add the references to the model classes and all is working all right.

Anyway this seems to be just a workaround, so we end up with the following questions:

1) is there a better pattern to follow in the scenario we described above (several diagrams sharing the same model classes)?

2) is there a way to avoid the detach/re-attach of the non-containment references to the model classes in order to make the GMF wizards work correctly?

Thank you
Regards

Cens

Back to the top