[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] Re: Problem creating link from derived class
|
- From: Martin Jacob <mj@xxxxxxxxxxxxxx>
- Date: Thu, 05 Feb 2009 14:25:12 +0100
- Newsgroups: eclipse.modeling.gmf
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.19 (Windows/20081209)
Hi Christian,
actually Isolator shall be a connection and not a node. I try what u proposed but than I got a node
instead of a connection.
Please find below my complete .gmfmap file. Do you have any other suggestion?
<?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="psc.ecore#//Network/nodes"/>
<ownedChild>
<domainMetaElement
href="psc.ecore#//Node"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
readOnly="true"
viewPattern="{0}"
editorPattern=""
editPattern="">
<diagramLabel
href="psc.gmfgraph#NodeIDLable"/>
<features
href="psc.ecore#//Node/nodeID"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="psc.gmftool#//@palette/@tools.0/@tools.0"/>
<diagramNode
href="psc.gmfgraph#Node"/>
</ownedChild>
</nodes>
<links>
<domainMetaElement
href="psc.ecore#//Conductor"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
editorPattern=""
editPattern="">
<diagramLabel
href="psc.gmfgraph#ConductorNameLable"/>
<features
href="psc.ecore#//Conductor/name"/>
</labelMappings>
<containmentFeature
href="psc.ecore#//Network/conductors"/>
<tool
xsi:type="gmftool:CreationTool"
href="psc.gmftool#//@palette/@tools.0/@tools.2"/>
<diagramLink
href="psc.gmfgraph#Conductor"/>
<sourceMetaFeature
xsi:type="ecore:EReference"
href="psc.ecore#//Conductor/nodeFrom"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="psc.ecore#//Conductor/nodeTo"/>
</links>
<links>
<domainMetaElement
href="psc.ecore#//Connector"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewPattern="{0}+{1}j"
editorPattern="{0}+{1}"
editPattern="{0}+{1}">
<diagramLabel
href="psc.gmfgraph#Connector_X_OhmLable"/>
<features
href="psc.ecore#//Connector/r_Ohm"/>
<features
href="psc.ecore#//Connector/x_Ohm"/>
</labelMappings>
<containmentFeature
href="psc.ecore#//Network/connectors"/>
<tool
xsi:type="gmftool:CreationTool"
href="psc.gmftool#//@palette/@tools.0/@tools.3"/>
<diagramLink
href="psc.gmfgraph#Connection"/>
<sourceMetaFeature
xsi:type="ecore:EReference"
href="psc.ecore#//Connector/nodeFrom"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="psc.ecore#//Connector/nodeTo"/>
</links>
<links>
<domainMetaElement
href="psc.ecore#//Isolator"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
editorPattern=""
editPattern="">
<diagramLabel
href="psc.gmfgraph#IsolatorNameLable"/>
<features
href="psc.ecore#//Conductor/name"/>
</labelMappings>
<containmentFeature
href="psc.ecore#//Network/conductors"/>
<tool
xsi:type="gmftool:CreationTool"
href="psc.gmftool#//@palette/@tools.0/@tools.4"/>
<diagramLink
href="psc.gmfgraph#Isolator"/>
<sourceMetaFeature
xsi:type="ecore:EReference"
href="psc.ecore#//Conductor/nodeFrom"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="psc.ecore#//Conductor/nodeTo"/>
</links>
<diagram>
<diagramCanvas
href="psc.gmfgraph#psc"/>
<domainModel
href="psc.ecore#/"/>
<domainMetaElement
href="psc.ecore#//Network"/>
<palette
href="psc.gmftool#//@palette"/>
</diagram>
</gmfmap:Mapping>
Christian Muth wrote, On 05.02.2009 13:35:
Hi Martin,
your problem might be that you do not have a node mapping (top node
reference) for Isolator, but only for Conductors.
Though Isolator is a specialized Conductor, you have to give it its own
node mapping (second top node reference for Network->conductors, node
mapping inside with domain meta element Isolator and diagram node Node)
for being able to use it with links.
Cheers
Christian