Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Cannot create link model for arbitrary nodes(In a simple model I can't seem to be able to create link gmf model between arbitrary nodes.)
Cannot create link model for arbitrary nodes [message #677153] Tue, 07 June 2011 18:00 Go to next message
eight  is currently offline eight Friend
Messages: 27
Registered: June 2011
Junior Member
I have a simple xsd model, which defines a few simple nodes, and a generic link as:

<xsd:complexType name="Link">
<xsd:attribute name="Source" type="xsd:anyURI"></xsd:attribute>
<xsd:attribute name="Target" type="xsd:anyURI"></xsd:attribute>
</xsd:complexType>

The functionality I am after should allow to link any nodes on the canvas by setting the Source and the Target attributes of a corresponding Link to the names of the source and target nodes, without making the nodes aware of the fact that they may have been linked.

This seems to be a simple feature that GMF should allow out of the box, but I seem not being able to build my gmf model, which would support it.

Specifically, while using the dashboard to combine the graphical and tooling definition, the links are absent from the available items in the wizard dialog (attachment Linksabsent.png):

http://post.scriptum.ru/svalka/gmf/Linksabsent.png



However, I have defined them in both graphical (attachment gmfgraph.png):

http://post.scriptum.ru/svalka/gmf/gmfgraph.png

and tooling (attachment gmftool.png):

http://post.scriptum.ru/svalka/gmf/gmftool.png

If, on the other hand, I will manually add the link to the gmf mapping definition, the Containment feature drop down does not list the Link model either (attachment manuallink.png):

http://post.scriptum.ru/svalka/gmf/manuallink.png

and proceeding without it makes the mapping invalid.

I would appreciate any pointers and hints on how to set up these generic links.

Thanks.


--8

[Updated on: Tue, 07 June 2011 20:47]

Report message to a moderator

Re: Cannot create link model for arbitrary nodes [message #677551 is a reply to message #677153] Wed, 08 June 2011 19:47 Go to previous message
eight  is currently offline eight Friend
Messages: 27
Registered: June 2011
Junior Member
Hi!

This page: http://wiki.eclipse.org/GMF_Links seems to recommend using Reference based links

Quote:
Properties 'domainMetaElement' (UI: Element) and 'sourceMetaFeature' (UI: Source Feature) should not be specified. Property 'linkMetaFeature' is an EReference; EClass that contains it is a link source and EReference type is a link target.


However this statement: Property 'linkMetaFeature' is an EReference; EClass that contains it is a link source and EReference type is a link target. needs further clarification/decoding.

Can anybody kindly explain what it means, so that it could understood outside of the GMF context? What are practical steps to achieve this?

The page above also talkes about referencing "model facets":

TypeLinkModelFacet - for type based links
FeatureLinkModelFacet - for feature based links

Which seem to introduce the notion of "Feature based links" -- is it the same as the "Reference based links", or is it a third type of links?

Thanks.

--8

[Updated on: Wed, 08 June 2011 19:48]

Report message to a moderator

Previous Topic:Problems with validation of audit rules
Next Topic:Best way to automatically change look of editpart
Goto Forum:
  


Current Time: Thu Nov 14 02:33:29 GMT 2024

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

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

Back to the top