[Uml-devel] (no subject)

Ralf Habacker ralf.habacker at gmail.com
Sun Jun 23 17:57:24 UTC 2013


Am 22.06.2013 21:37, schrieb paul424:

> Having tried the Visaul Paradigm trial version , I wanted to share the 
> outcame XMI UML model exported by it ( I'ts OpenDungeons GPL strategy 
> game).
> As a program of choice I tried  ...... surprise ! Umbrello , It did 
> better than ArgoUML which couldn't simply load the VP's produced file, 
> and I could see all 40+ entities on the bar to the left.
nice to hear.

>
> It seems that graphical representation of UML that is boxes and 
> connectors werent' exported ( donno if XMI UML support it )
  xmi uml version 1.3 or 1.4 do not cover diagrams and widgets, only the 
model. :-(

> , so I would have to drag all 40 entities by hand onto the >>Sketch<< 
> part . Worst is I cannot selected several or all entites in the bar , 
> as the good old combination ctr-a , or shit + ctrl .
Looks that this keys has not been implemented when move to qt4 QTreeWidget.
>
> Can you change this for a better ?
Will be possible if someone take the time to implement this.

As a workaround (on linux) you can do the following steps:

- add a class diagram
- add a class
- save the file
- open the file with a text editor and search for <widgets>. There  you 
will find the following lines:
         <widgets>
          <classwidget linecolor="none" usesdiagramfillcolor="0" 
linewidth="0" showoperations="1" textcolor="#000000" 
usesdiagramusefillcolor="0" showpubliconly="1" showpackage="1" x="49" 
showattsigs="601" showstereotype="1" y="199" showattributes="1" 
font="Sans Serif,9,-1,0,75,0,0,0,0,0" width="333" isinstance="0" 
usefillcolor="1" fillcolor="#ffff00" xmi.id="j9S0hvyEmchMcg6x" 
showscope="1" height="161" showopsigs="601"/>


- Save one <classwidget -.. line  with xmi.id="..." replaced with 
@XMI.ID@ into a file say
- open a console in the the path of the xmi file
- run
echo   ' <classwidget linecolor="none" usesdiagramfillcolor="0" 
linewidth="0" showoperations="1" textcolor="#000000" 
usesdiagramusefillcolor="0" showpubliconly="1" showpackage="1" x="49" 
showattsigs="601" showstereotype="1" y="199" showattributes="1" 
font="Sans Serif,9,-1,0,75,0,0,0,0,0" width="333" isinstance="0" 
usefillcolor="1" fillcolor="#ffff00" @XMI.ID@ showscope="1" height="161" 
showopsigs="601"/>' > classwidget.template

- and then run

for i in `grep "<UML:Class " OpendungeonsClassDiagram1.xml.uml.xmi | 
grep -o 'xmi.id="[0-9A-Za-z]*"'`; do sed "s, at XMI.ID@,$i,g" 
classwidget.template ; done > classwidgets.txt

- now replace the classwidget line mentioned above with the contained of 
classwidgets.txt
- open file with umbrello
- run autolayout on the class diagram

Now you have all classes in your class diagram


Regards
Ralf




More information about the umbrello-devel mailing list