[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

Hi Christian,

please find below .gmfmap and gmfgraph

Please note the class names are different than described before. The class Isolator is derived from class Conductor.

.gmfmap:
  <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#//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>



.gmfgraph:
<?xml version="1.0" encoding="UTF-8"?>
<gmfgraph:Canvas xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xmlns:gmfgraph="http://www.eclipse.org/gmf/2006/GraphicalDefinition"; name="psc">
  <figures
      name="Default">
    <descriptors
        name="NodeFigure">
      <actualFigure
          xsi:type="gmfgraph:Rectangle"
          name="NodeFigure"
          lineWidth="2">
        <layout
            xsi:type="gmfgraph:FlowLayout"/>
        <foregroundColor
            xsi:type="gmfgraph:ConstantColor"
            value="black"/>
        <backgroundColor
            xsi:type="gmfgraph:ConstantColor"
            value="lightGreen"/>
        <children
            xsi:type="gmfgraph:Label"
            name="NodeIDLable"/>
      </actualFigure>
      <accessors
          figure="//@figures.0/@descriptors.0/@actualFigure/@children.0"/>
    </descriptors>
...
    <descriptors
        name="ConductorFigure">
      <actualFigure
          xsi:type="gmfgraph:PolylineConnection"
          name="ConductorFigure"
          lineWidth="4">
        <foregroundColor
            xsi:type="gmfgraph:ConstantColor"
            value="black"/>
        <children
            xsi:type="gmfgraph:Label"
            name="ConductorNameFigure"
            text="&lt;...>"/>
      </actualFigure>
      <accessors
          figure="//@figures.0/@descriptors.2/@actualFigure/@children.0"/>
    </descriptors>
    <descriptors
        name="IsolatorFigure">
      <actualFigure
          xsi:type="gmfgraph:PolylineConnection"
          name="IsolatorFigure"
          lineWidth="8">
        <foregroundColor
            xsi:type="gmfgraph:ConstantColor"
            value="black"/>
        <children
            xsi:type="gmfgraph:Label"
            name="IsolatorNameFigure"
            text="&lt;...>"/>
      </actualFigure>
      <accessors
          figure="//@figures.0/@descriptors.3/@actualFigure/@children.0"/>
    </descriptors>
  </figures>
  <nodes
      name="Node"
      figure="NodeFigure"/>
  <connections
      name="Conductor"
      figure="ConductorFigure"/>
...
  <connections
      name="Isolator"
      figure="IsolatorFigure"/>
  <labels
      name="NodeIDLable"
      figure="NodeFigure"
      elementIcon="false"
      accessor="//@figures.0/@descriptors.0/@accessors.0"/>
...
  <labels
      name="ConductorNameLable"
      figure="ConductorFigure"
      elementIcon="false"
      accessor="//@figures.0/@descriptors.2/@accessors.0"/>
  <labels
      name="IsolatorNameLable"
      figure="IsolatorFigure"
      elementIcon="false"
      accessor="//@figures.0/@descriptors.3/@accessors.0"/>
</gmfgraph:Canvas>

If you need more details please let me know.

thanks,	Martin


Christian Muth wrote, On 04.02.2009 17:37:
hi martin,


could you please post your .gmfgraph and .gmfmap files (just the relevant portion) so we can reproduce your problem? its way easier than just textual description...



cheers

christian