[Uml-devel] Re: [Uml-user] File import

Luis De la Parra lparrab at gmx.net
Wed Oct 9 09:58:10 UTC 2002


> As I understood you wrote a external filter to convert the data of file
> versions 1-4 into a file of version 5? Is this right?
>
yes, this is right.

> My idea was, ignore all code of reading and writing the files of version 5.
> Instead I want to change the code in that way, It could read the binary
> files direct into the new system. It was clear for me, that we mostly have
> files of version 4, so I can concentrate my activies on this version. If I
> remember right, the problem widget/wigetData vs. widget is no general
> problem, the problems are lying in the details. There are a lot of changes
> in parameters (add/remove/change) to each UMLObject, so we have to find
> out, how to set this parameters in a right default value.

I dont know how much time after switching to file version 5 the XML code was 
implemented, so no idea if there are many users using this file format.

Setting a default value for new attributes is no problem (an has to be done 
with the filter-approach as well). We just have to see whats the default in 
the current version of the program and do the same (colors, etc)

> Over the weekend I didn't anything in this part, because I want to wait
> your answer to my proposal. If your are interested in my parts of code you
> may get it as a patch against  current cvs. On the other side I'm
> interested in your parts of code to test it and to see, how can we solve
> the import problem.

do you have something working?  since my changes to the program are so small I 
felt free to commit them already, you can check them there (umldoc.cpp)
I also added the filter to the repository so that it can be tested... If then 
we decide we dont need it we can remove the filter, I didnt add it to the 
kdevelop project or anything so it doesnt mess anything up...
->has to be compiled separatly:
g++ -lqt -L/usr/lib/qt3/lib/ -I/usr/lib/qt3/include/ -oumlfilter filter.cpp
should do the trick.
then just 
$umlfilter <filev4>

> Let's start to finish this job.

did some tests with the file Jonathan sent me and more or less works, ok.
It uses very stupid defaults now (color blue with red, show grid, etc) but 
this is only for testing.
Some information is lost, especially, I havent translated asociations yet (ie, 
all asociations are lost in the conversion) but this shouldnt be too dificult 
to do.
Another thing that gets lost is the folders in the listView (ie, after 
importing the file are objects and diagrams are in the default folders) but I 
dont think this is *too* bad, and this would require quite some effort to 
translate, I think, so I dont want to wast my time on it.

check it out and tell me what you think.

regards,

luis.

ps. Jens: if you have something working you can send me your pattch to check 
it out. Maybe after testing the filter you can tell me which option you find 
better.




More information about the umbrello-devel mailing list