Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] RE : writing a program which creates .notation & .di file out of an .uml file

thanks a lot for this information :)
By the way the problem is solved now.
My mistake was, that i wrote the states' hrefs into the transitions source and target attributs intead of of the states sharp-ids :)

Gesendet: Donnerstag, 19. April 2012 um 13:54 Uhr
Von: "VELTEN Mathieu" <mathieu.velten@xxxxxxxx>
An: "Papyrus Project list" <mdt-papyrus.dev@xxxxxxxxxxx>
Betreff: [mdt-papyrus.dev] RE : writing a program which creates .notation & .di file out of an .uml file
Hi,

-          The bendpoints tag is required, but can be empty

Not really, This can lead to exception & model corruption when changing of router afterwards (rectilinear for example) because some routers assume there is at least two bendpoints corresponding to the source and target position. you need to use :
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ArEZoooWEeG5ha9xSOgN0g" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>

Regards,

Mathieu



De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mdt-papyrus.dev-bounces@xxxxxxxxxxx] de la part de LETAVERNIER Camille [Camille.LETAVERNIER@xxxxxx]
Date d'envoi : jeudi 19 avril 2012 13:41
À : Papyrus Project list
Objet : Re: [mdt-papyrus.dev] writing a program which creates .notation & .di file out of an .uml file

Hello Chris,

 

Here’s the minimum xmi code for drawing a Transition between two nodes in a Papyrus State Machine diagram :

 

<edges xmi:type="notation:Connector" type="7000" source="_K9alcIoREeG9Mu1FwC8BkA" target="_LWjeMYoREeG9Mu1FwC8BkA">

      <element xmi:type="uml:Transition" href="model.uml#_MekPIIoREeG9Mu1FwC8BkA"/>

      <bendpoints xmi:type="notation:RelativeBendpoints"/>

</edges>

 

-          SourceAnchor and TargetAnchor are not required


 

The problem may come from your “source” or “target” ID (If the corresponding notation Nodes don’t exist, you can’t draw an edge between them).

 

Note that all edges must be located at the root of the Diagram, even if they are actually located in a sub-state machine:

 

<notation:Diagram>

       <children>

             ...

       </children>

       <edges>

             ...

       </edges>

</notation:Diagram>

 

 

Hope this helps,

Camille

__________________________

Camille Letavernier

+33 (0)1 69 08 00 59 - camille.letavernier@xxxxxx

CEA LIST - Laboratoire d'Ingénierie dirigée par les modèles pour les Systèmes Embarqués (LISE)

 

De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de chris miesel
Envoyé : jeudi 19 avril 2012 12:45
À : mdt-papyrus.dev@xxxxxxxxxxx
Objet : [mdt-papyrus.dev] writing a program which creates .notation & .di file out of an .uml file

 

hi everybody,



i have a question and i have found no forum or another helpful place where I could find some information to solve the problem. So I wrote this eMail to you in a hope that anybody can help me.

Firstly I want to tell you what my goals are:

I use Papyrus and I enjoy it very much, especially the work with statemachine diagrams. Now I want to write a little program which parses a .uml-file of a Statemachine diagram and creates a .notation-file and a.di-file so that I can see the Diagram (This has the goal that when somebody creates an .uml-file via a transformation for example i don't see anything but the tree-form. Now I want to make it visible in Papyrus). Therefore I analysed the .notation-files and compared it with the .uml-files, so that I was able to see the correlations between the two files.

I have programmed and programmed and now i can create a .di-file and a .notation file which is displayed by papyrus. I can see States, Pseudostates, FinalStates and the diagram itself. But I don't see any Transitions :(


Problem: How can I display the Transitions? Or perhaps it isn't possible? What does papyrus do when it reads the .notation-file and and the transitions at the end?

 

Explanation to my Transition-Creator:

 

For each Transition I add a String like this on the write place in the .notation-file. I fill the source=... and target=... and also the href="" with the references of the source-state, the target-state and the transition.

 

<edges xmi:type="notation:Connector" type="7000" source="..." target="..." lineColor="0">
    <children xmi:type="notation:DecorationNode" type="7001">
      <layoutConstraint xmi:type="notation:Location"/>
    </children>
    <children xmi:type="notation:DecorationNode" type="7002">
      <layoutConstraint xmi:type="notation:Location"/>
    </children>
    <children xmi:type="notation:DecorationNode" type="7003">
      <layoutConstraint xmi:type="notation:Location" y="60"/>
    </children>
    <styles xmi:type="notation:FontStyle" fontHeight="8"/>
    <element xmi:type="uml:Transition" href="">     <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_dip844n-EeG6J4X3i638Ww"/>   
  </edges>

What is wrong here? How important are the Source- and TargetAnchor tags and the coordinates in the benpoints tag?

 

You see I am in exasperation :(

 

Can anybody help me with this problem or show me a place in which I can search the solution?

 

Thank you and greetings,

Chris

 

p.s. this is my first experience with a mailing list and i hope my english isn't too bad

  

Ihr WEB.DE Postfach immer dabei: die kostenlose WEB.DE Mail App für iPhone und Android.   
https://produkte.web.de/freemail_mobile_startseite/

 


Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos ne pourra être engagée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être engagée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.


  

Ihr WEB.DE Postfach immer dabei: die kostenlose WEB.DE Mail App für iPhone und Android.   
https://produkte.web.de/freemail_mobile_startseite/

Back to the top