I have a businessmodel that contains references to another emf model.
E.g. an instance of Class Person has an attribute Address that refers to
an element Adress in another model.
By default the EMF Framework stores this with a DOM-Path relative to the
resource cotaining the reference (i.e. the Personmodel). Assuming both
resources are in the same folder the reference looks something like this:
These references can't be resolved by the Graphity-Framework which only
accepts references which are relative to the Workspace.
So the same reference would look like that:
Thus in order to make cross referencing work I currently need to edit
all such References manually from a relative to a workspace-absolute Path.
Can you give me any insight how to make cross references work?
thanks for your quick reply. Yes my models are all correctly registered.
I tracked the problem down after debugging basically all ResourceSet and
XMLHandler methods to an issue in my Wizard that is responsible for
creating the Diagram and the adjacent Businessmodel :(.
There I created a rather strange URI for the Models
This leads to the problem that during resolution of the Elements. The
URIHelper thinks that Uris are absolute - They are in fact.
Till here no Problem for Graphiti...
But I created a cross reference in the Buisinessmodel to another
resource. This cross reference gets correctly resolved as a
PlatformResource Uri and thus trimmed on storage to something like
Now the problems on load arise since the URIHelper assumes absolute Uris
and has the "resolve" property set to false. Therefore the correct
PlatformResource Uri can't be resolved.
The fix was rather simple then...
I created a correct Platform Resource Uri in the Wizard
and everything works fine.
Sorry for bothering and thanks again
Am 12.01.2012 16:36, schrieb Michael Wenz:
> That sounds kind of strange. Graphiti uses EMF means to reference and
> resolve model objects, so I wonder why it should not support the EMF
> default referencing mechanism.
> Are you sure that both metamodels are correctly registered with EMF? Are
> there any other special settings in respect to referencing?