Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Resolving references to external Files in Businessmodels
Resolving references to external Files in Businessmodels [message #778463] Thu, 12 January 2012 08:37 Go to next message
Veit Hoffmann is currently offline Veit HoffmannFriend
Messages: 20
Registered: July 2009
Junior Member
Hi,

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:
href="Adress.model#..."
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:
href="<<AbsolutePathStartingFromWSRoot>>/Adress.model#..."
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 in advance

Veit
Re: Resolving references to external Files in Businessmodels [message #778464 is a reply to message #778463] Thu, 12 January 2012 15:36 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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?

Michael
Re: Resolving references to external Files in Businessmodels [message #778555 is a reply to message #778464] Fri, 13 January 2012 09:06 Go to previous message
Veit Hoffmann is currently offline Veit HoffmannFriend
Messages: 20
Registered: July 2009
Junior Member
Hi Michael,

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
<<AbsolutePathStartingFromWSRoot>>/<<MyModelName>>.model
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
<<PathRelativeToLinkingResource>>/<<ModelName>>...
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
platform:/resource/<<AbsolutePathStartingFromWSRoot>>/<<MyModelName>>.model
and everything works fine.

Sorry for bothering and thanks again

Veit

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?
>
> Michael
>
Previous Topic:Using meta-model ereferences for connections
Next Topic:API not usable without editor in running eclipse UI?!
Goto Forum:
  


Current Time: Fri Apr 26 17:50:14 GMT 2024

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

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

Back to the top