Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] [question?] using the new version of henshin

hi i got a not-working example:
    this one is not related with profiling, is about add attributes to the nodes.

     add a comment to a flow final node.
if i put a attribute to the comment, the transformation will not working, if i delete the property in the comment node. the rule will work.
since any "real" uml models  will contain attributes, this should be corrected.

to avoid complexity, i did not apply any profile.
you can test it out with the attached files: root model : My1.uml   henshin file: uml_metamodel.henshin

yours sincerely,
 
Simon Han
<?xml version="1.0" encoding="UTF-8"?>
<uml:Model xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"; xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"; xmi:id="_hA4owIWUEeGviOljg1XpsA">
  <packagedElement xmi:type="uml:Activity" xmi:id="_iiCScIWUEeGviOljg1XpsA">
    <ownedComment xmi:id="_TtCiMIWWEeGviOljg1XpsA"/>
    <node xmi:type="uml:FlowFinalNode" xmi:id="_Wt2D8IWaEeGviOljg1XpsA" name="f0">
      <ownedComment xmi:id="_Kba-IIWcEeGviOljg1XpsA"/>
    </node>
  </packagedElement>
</uml:Model>
<?xml version="1.0" encoding="UTF-8"?>
<henshin:TransformationSystem xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"; xmlns:henshin="http://www.eclipse.org/emf/2011/Henshin"; xmi:id="_cPI7kIWVEeGviOljg1XpsA" name="">
  <rules xmi:id="_2v6HsIWZEeGviOljg1XpsA" name="test">
    <lhs xmi:id="_2v6HsYWZEeGviOljg1XpsA" name="LHS">
      <nodes xmi:id="_3X2RcIWZEeGviOljg1XpsA" name="f0">
        <type href="../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//FlowFinalNode"/>
      </nodes>
    </lhs>
    <rhs xmi:id="_2v6HsoWZEeGviOljg1XpsA" name="RHS">
      <nodes xmi:id="_3X2RcYWZEeGviOljg1XpsA" name="f" outgoing="_93l8EIWZEeGviOljg1XpsA">
        <type href="../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//FlowFinalNode"/>
      </nodes>
      <nodes xmi:id="_61k8kIWZEeGviOljg1XpsA" name="testing" incoming="_93l8EIWZEeGviOljg1XpsA">
        <type href="../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Comment"/>
        <attributes xmi:id="_TZRC4IWcEeGviOljg1XpsA" value="hahah">
          <type href="../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Comment/body"/>
        </attributes>
      </nodes>
      <edges xmi:id="_93l8EIWZEeGviOljg1XpsA" source="_3X2RcYWZEeGviOljg1XpsA" target="_61k8kIWZEeGviOljg1XpsA">
        <type href="../../plugin/org.eclipse.uml2.uml/model/UML.ecore#//Element/ownedComment"/>
      </edges>
    </rhs>
    <mappings xmi:id="_3X2RcoWZEeGviOljg1XpsA" origin="_3X2RcIWZEeGviOljg1XpsA" image="_3X2RcYWZEeGviOljg1XpsA"/>
  </rules>
  <imports href="../../plugin/org.eclipse.uml2.uml/model/UML.ecore#/"/>
</henshin:TransformationSystem>
<?xml version="1.0" encoding="UTF-8"?>
<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"; xmlns:henshin="http://www.eclipse.org/emf/2011/Henshin"; xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation"; xmi:id="_pbj8wIWZEeGviOljg1XpsA" type="Henshin" measurementUnit="Pixel">
  <children xmi:type="notation:Shape" xmi:id="_2wNpsIWZEeGviOljg1XpsA" type="2001" italic="true" fillColor="16114135" lineColor="0">
    <children xmi:type="notation:DecorationNode" xmi:id="_2wNpsoWZEeGviOljg1XpsA" type="5001"/>
    <children xmi:type="notation:DecorationNode" xmi:id="_2wNps4WZEeGviOljg1XpsA" type="7001">
      <children xmi:type="notation:Shape" xmi:id="_3yN5QIWZEeGviOljg1XpsA" type="3001">
        <children xmi:type="notation:DecorationNode" xmi:id="_3yXqQIWZEeGviOljg1XpsA" type="5002"/>
        <children xmi:type="notation:DecorationNode" xmi:id="_3yXqQYWZEeGviOljg1XpsA" type="5003"/>
        <children xmi:type="notation:DecorationNode" xmi:id="_3yXqQoWZEeGviOljg1XpsA" type="7002">
          <styles xmi:type="notation:SortingStyle" xmi:id="_3yXqQ4WZEeGviOljg1XpsA"/>
          <styles xmi:type="notation:FilteringStyle" xmi:id="_3yXqRIWZEeGviOljg1XpsA"/>
        </children>
        <element xmi:type="henshin:Node" href="uml_metamodel.henshin#_3X2RcIWZEeGviOljg1XpsA"/>
        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3yN5QYWZEeGviOljg1XpsA" x="22" y="20"/>
      </children>
      <children xmi:type="notation:Shape" xmi:id="_7g8NwIWZEeGviOljg1XpsA" type="3001">
        <children xmi:type="notation:DecorationNode" xmi:id="_7g8NwoWZEeGviOljg1XpsA" type="5002"/>
        <children xmi:type="notation:DecorationNode" xmi:id="_7g8Nw4WZEeGviOljg1XpsA" type="5003"/>
        <children xmi:type="notation:DecorationNode" xmi:id="_7g8NxIWZEeGviOljg1XpsA" type="7002">
          <children xmi:type="notation:Node" xmi:id="_TZaM0IWcEeGviOljg1XpsA" type="3002">
            <element xmi:type="henshin:Attribute" href="uml_metamodel.henshin#_TZRC4IWcEeGviOljg1XpsA"/>
            <layoutConstraint xmi:type="notation:Location" xmi:id="_TZaM0YWcEeGviOljg1XpsA"/>
          </children>
          <styles xmi:type="notation:SortingStyle" xmi:id="_7g8NxYWZEeGviOljg1XpsA"/>
          <styles xmi:type="notation:FilteringStyle" xmi:id="_7g8NxoWZEeGviOljg1XpsA"/>
        </children>
        <element xmi:type="henshin:Node" href="uml_metamodel.henshin#_61k8kIWZEeGviOljg1XpsA"/>
        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7g8NwYWZEeGviOljg1XpsA" x="256" y="11"/>
      </children>
    </children>
    <element xmi:type="henshin:Rule" href="uml_metamodel.henshin#_2v6HsIWZEeGviOljg1XpsA"/>
    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2wNpsYWZEeGviOljg1XpsA" x="234" y="193" width="387" height="110"/>
  </children>
  <styles xmi:type="notation:DiagramStyle" xmi:id="_pbj8wYWZEeGviOljg1XpsA"/>
  <element xmi:type="henshin:TransformationSystem" href="uml_metamodel.henshin#_cPI7kIWVEeGviOljg1XpsA"/>
  <edges xmi:type="notation:Connector" xmi:id="_93vGAIWZEeGviOljg1XpsA" type="4001" source="_3yN5QIWZEeGviOljg1XpsA" target="_7g8NwIWZEeGviOljg1XpsA">
    <children xmi:type="notation:DecorationNode" xmi:id="_93vGA4WZEeGviOljg1XpsA" type="6001">
      <layoutConstraint xmi:type="notation:Location" xmi:id="_93vGBIWZEeGviOljg1XpsA" x="1" y="-24"/>
    </children>
    <children xmi:type="notation:DecorationNode" xmi:id="_93vGBYWZEeGviOljg1XpsA" type="6002">
      <layoutConstraint xmi:type="notation:Location" xmi:id="_93vGBoWZEeGviOljg1XpsA" x="1" y="21"/>
    </children>
    <styles xmi:type="notation:FontStyle" xmi:id="_93vGAYWZEeGviOljg1XpsA"/>
    <element xmi:type="henshin:Edge" href="uml_metamodel.henshin#_93l8EIWZEeGviOljg1XpsA"/>
    <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_93vGAoWZEeGviOljg1XpsA" points="[22, 1, -126, -6]$[179, 1, 31, -6]"/>
    <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_94Lx8IWZEeGviOljg1XpsA" id="(0.7411764705882353,0.175)"/>
  </edges>
</notation:Diagram>

Back to the top