[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [mdt-papyrus.dev] writing a program which creates .notation & .di file out of an .uml file
|
THANK YOU :)
you solved the problem. Now I am very happy.
"The problem may come from your “source” or “target” ID" was the solution. My mistake was, that I wrote the href into the source and the target. But I needed the ID. Now i see the transition!
Thanks a lot,
greetings,
Chris
Gesendet: Donnerstag, 19. April 2012 um 13:41 Uhr
Von: "LETAVERNIER Camille" <Camille.LETAVERNIER@xxxxxx>
An: "Papyrus Project list" <mdt-papyrus.dev@xxxxxxxxxxx>
Betreff: 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 bendpoints tag is required, but can be empty
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?
p.s. this is my first experience with a mailing list and i hope my english isn't too bad