blob: d8469c5533926d8c09c338795af24804f488035f [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<gmfmap:Mapping xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:gmfmap="http://www.eclipse.org/gmf/2008/mappings"
xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">
<nodes>
<containmentFeature
href="mindmap.ecore#//Map/rootTopics"/>
<ownedChild>
<domainMetaElement
href="mindmap.ecore#//Topic"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping">
<diagramLabel
href="mindmap.gmfgraph#TopicName"/>
<features
href="mindmap.ecore#//Topic/name"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="mindmap.gmftool#//@palette/@tools.0/@tools.0"/>
<diagramNode
href="mindmap.gmfgraph#Topic"/>
<children
compartment="//@nodes.0/@ownedChild/@compartments.0">
<containmentFeature
href="mindmap.ecore#//Topic/comments"/>
<ownedChild>
<domainMetaElement
href="mindmap.ecore#//Thread"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping">
<diagramLabel
href="mindmap.gmfgraph#ThreadName"/>
<features
href="mindmap.ecore#//Thread/subject"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="mindmap.gmftool#//@palette/@tools.0/@tools.1"/>
<diagramNode
href="mindmap.gmfgraph#Thread"/>
<children
compartment="//@nodes.0/@ownedChild/@children.0/@ownedChild/@compartments.0">
<containmentFeature
href="mindmap.ecore#//Thread/items"/>
<ownedChild>
<domainMetaElement
href="mindmap.ecore#//ThreadItem"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping">
<diagramLabel
href="mindmap.gmfgraph#ThreadItemLabel"/>
<features
href="mindmap.ecore#//ThreadItem/body"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="mindmap.gmftool#//@palette/@tools.0/@tools.2"/>
<diagramNode
href="mindmap.gmfgraph#ThreadItemLabel"/>
</ownedChild>
</children>
<compartments
children="//@nodes.0/@ownedChild/@children.0/@ownedChild/@children.0">
<compartment
href="mindmap.gmfgraph#ThreadItemCompartment"/>
</compartments>
</ownedChild>
</children>
<compartments
children="//@nodes.0/@ownedChild/@children.0">
<compartment
href="mindmap.gmfgraph#ThreadCompartment"/>
</compartments>
</ownedChild>
</nodes>
<nodes>
<containmentFeature
href="mindmap.ecore#//Map/resources"/>
<ownedChild>
<domainMetaElement
href="mindmap.ecore#//Resource"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewPattern="{0} [{1}]"
editorPattern="{0} : {1}"
editPattern="{0} : {1}">
<diagramLabel
href="mindmap.gmfgraph#ResourceLabel"/>
<features
href="mindmap.ecore#//Resource/name"/>
<features
href="mindmap.ecore#//Resource/email"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="mindmap.gmftool#//@palette/@tools.0/@tools.3"/>
<diagramNode
href="mindmap.gmfgraph#Resource"/>
</ownedChild>
</nodes>
<links>
<tool
xsi:type="gmftool:CreationTool"
href="mindmap.gmftool#//@palette/@tools.1/@tools.0"/>
<diagramLink
href="mindmap.gmfgraph#TopicSubtopics"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="mindmap.ecore#//Topic/subtopics"/>
<creationConstraints>
<sourceEnd
body="self &lt;> oppositeEnd"/>
</creationConstraints>
</links>
<links>
<domainMetaElement
href="mindmap.ecore#//Relationship"/>
<domainSpecialization
body="self.type = RelationshipType::EXTENDS"/>
<domainInitializer
xsi:type="gmfmap:FeatureSeqInitializer">
<initializers
xsi:type="gmfmap:FeatureValueSpec">
<feature
xsi:type="ecore:EAttribute"
href="mindmap.ecore#//Relationship/type"/>
<value
body="RelationshipType::EXTENDS"/>
</initializers>
<initializers
xsi:type="gmfmap:FeatureValueSpec">
<feature
xsi:type="ecore:EAttribute"
href="mindmap.ecore#//Relationship/label"/>
<value
body="'extends'"/>
</initializers>
</domainInitializer>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewPattern="«{0}»">
<diagramLabel
href="mindmap.gmfgraph#RelationshipLabel"/>
<features
href="mindmap.ecore#//Relationship/label"/>
</labelMappings>
<containmentFeature
href="mindmap.ecore#//Map/relations"/>
<tool
xsi:type="gmftool:CreationTool"
href="mindmap.gmftool#//@palette/@tools.1/@tools.3"/>
<diagramLink
href="mindmap.gmfgraph#RelationshipLink"/>
<sourceMetaFeature
xsi:type="ecore:EReference"
href="mindmap.ecore#//Relationship/source"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="mindmap.ecore#//Relationship/target"/>
</links>
<links>
<domainMetaElement
href="mindmap.ecore#//Relationship"/>
<domainSpecialization
body="self.type = RelationshipType::INCLUDES"/>
<domainInitializer
xsi:type="gmfmap:FeatureSeqInitializer">
<initializers
xsi:type="gmfmap:FeatureValueSpec">
<feature
xsi:type="ecore:EAttribute"
href="mindmap.ecore#//Relationship/type"/>
<value
body="RelationshipType::INCLUDES"/>
</initializers>
<initializers
xsi:type="gmfmap:FeatureValueSpec">
<feature
xsi:type="ecore:EAttribute"
href="mindmap.ecore#//Relationship/label"/>
<value
body="'includes'"/>
</initializers>
</domainInitializer>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewPattern="«{0}»">
<diagramLabel
href="mindmap.gmfgraph#RelationshipLabel"/>
<features
href="mindmap.ecore#//Relationship/label"/>
</labelMappings>
<containmentFeature
href="mindmap.ecore#//Map/relations"/>
<tool
xsi:type="gmftool:CreationTool"
href="mindmap.gmftool#//@palette/@tools.1/@tools.2"/>
<diagramLink
href="mindmap.gmfgraph#RelationshipLink"/>
<sourceMetaFeature
xsi:type="ecore:EReference"
href="mindmap.ecore#//Relationship/source"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="mindmap.ecore#//Relationship/target"/>
</links>
<links>
<domainMetaElement
href="mindmap.ecore#//Relationship"/>
<domainSpecialization
body="self.type = RelationshipType::DEPENDENCY"/>
<domainInitializer
xsi:type="gmfmap:FeatureSeqInitializer">
<initializers
xsi:type="gmfmap:FeatureValueSpec">
<feature
xsi:type="ecore:EAttribute"
href="mindmap.ecore#//Relationship/type"/>
<value
body="RelationshipType::DEPENDENCY"/>
</initializers>
<initializers
xsi:type="gmfmap:FeatureValueSpec">
<feature
xsi:type="ecore:EAttribute"
href="mindmap.ecore#//Relationship/label"/>
<value
body="'depends'"/>
</initializers>
</domainInitializer>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewPattern="«{0}»">
<diagramLabel
href="mindmap.gmfgraph#RelationshipLabel"/>
<features
href="mindmap.ecore#//Relationship/label"/>
</labelMappings>
<containmentFeature
href="mindmap.ecore#//Map/relations"/>
<tool
xsi:type="gmftool:CreationTool"
href="mindmap.gmftool#//@palette/@tools.1/@tools.1"/>
<diagramLink
href="mindmap.gmfgraph#RelationshipLink"/>
<sourceMetaFeature
xsi:type="ecore:EReference"
href="mindmap.ecore#//Relationship/source"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="mindmap.ecore#//Relationship/target"/>
</links>
<diagram>
<diagramCanvas
href="mindmap.gmfgraph#mindmap"/>
<domainModel
href="mindmap.ecore#/"/>
<domainMetaElement
href="mindmap.ecore#//Map"/>
<palette
href="mindmap.gmftool#//@palette"/>
</diagram>
<audits
id="org.eclipse.gmf.examples.mindmap.audits"
name="Mindmap Audits"
description="Audits to detect problems in mindmap diagrams.">
<audits
name="Cyclic relationship check"
description="This audit detects (simple) cycles between Topic relationships"
id="cycle"
message="A cycle was found in relationships between two Topic elements.">
<rule
body="self.relations->forAll(r1, r2 | r1.target = r2.source and r1.type = r2.type implies r2.target &lt;> r1.source)"/>
<target
xsi:type="gmfmap:DomainElementTarget">
<element
href="mindmap.ecore#//Map"/>
</target>
</audits>
<audits
name="Topic name audit"
description="A Topic must have a name provided."
id="topic.name"
message="Topics must have a name">
<rule
body="name.size() > 0"/>
<target
xsi:type="gmfmap:DomainElementTarget">
<element
href="mindmap.ecore#//Topic"/>
</target>
</audits>
</audits>
</gmfmap:Mapping>