Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Graphical Modeling Framework/Concepts/Links"

(Type Based Links)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{GMF}}
 +
 
==Graphical Definition==
 
==Graphical Definition==
  
Line 12: Line 14:
  
 
===Reference Based Links===
 
===Reference Based Links===
Properties 'domainMetaElement' and 'sourceMetaFeature' should not be specified. Property 'linkMetaFeature' is an EReference; EClass that contains it is a link source and EReference type is a link target.
+
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.
  
 
==Generator Model==
 
==Generator Model==

Latest revision as of 12:38, 5 October 2011



GMF
Website
Download
Dev Builds
Update Site releases milestones
Community
Mailing ListNewsgroupIRC
Bugzilla
Open
Help Wanted
Bug Day
Source
GMF Notation: View CVS repo

GMF Runtime: View CVS repo
GMF Tooling: View Git Repo, GitHub


Graphical Definition

Mapping

There are two types of link mappings:

  • Type based links
  • Reference based links

The first type is used when particular EClass is specified and creation of such link in runtime means creation of this EClass instance. When EClass is not specified then this is the second type of link mapping; creation of such link in runtime means setting the specified reference value.

Type Based Links

Mapping property 'domainMetaElement' (UI: Element) specifies EClass (type) of the link. If 'sourceMetaFeature' (UI: Source Feature) property is not specified then 'containmentFeature' (UI: Containment Feature) is used to denote link source (iow link container is it's source). If 'sourceMetaFeature' (UI: Source Feature) is specified then it should be a EReference defined within link EClass and it's value is the link source. Property 'linkMetaFeature' must always be specified and it references link target.

Reference Based Links

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.

Generator Model

Link is represented by GenLink class in the model. It may reference the following model facets:

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

In addition to the properties derived from the other models GenLink provides:

  • outgoingCreationAllowed (true) - it is possible to draw the link from source to target on diagram
  • incomingCreationAllowed (false) - it is possible to draw the link from target to source on diagram
  • viewDirectionAlignedWithModel (true) - when link is drawn from target to source it's direction in domain and notation models differ; when this property is true view in notation model will be "reoriented" to be aligned with direction in domain model
  • targetReorientingAllowed (true) - user may reorient link target
  • sourceReorientingAllowed (true) - user may reorient link source

Back to the top