I updated cogre's semantic-uml code to make copies of the tags saved
on the nodes. This does basic unlinking of the tag from the buffer
removing the overlays.
I had to update semantic's copy mechanism to run an `unlink-copy-hook`
on the copied tag. semantic-decorate then uses this to remove all
secondary overlays from the tag.
I checked these items into CVS.
In this way, the automatic graph generation for the uml diagrams can
now save for Emacs Lisp object systems.
Unfortunately it won't work for classes in some other languages
because the tag-copy function doesn't copy the children tags. That
requires a bit more infrastructure change since there is only a get
function for tag members, and not a put function. The put function
needs to be unique per language too, so it will tag a big effort to
get that working and tested across a range of languages, particularly
those not in the CEDET repository.
Eric
>>> "Eric M. Ludlam" <eric@...> seems to think that:
>>>> Austin Haas <austin@...> seems to think that:
>>
>>Is it possible to save/load a UML diagram that I created manually in COGRE?
>
>Yes, it is possible to save/restore COGRE diagrams which do not
>include semantic tag information in them. I tried it and found a new
>bug which I've fixed and checked into CVS.
>
>>I was able to save one after commenting out the cogre-save method in
>>uml-create.el, which states that "You cannot save autogenerated
>>graphs", but I wasn't able to load the file.
>
>If your UML diagram is built from semantic tags which are live in a
>buffer somewhere, then the saved COGRE diagram will save, but you
>won't be able to load it. This is because semantic tags have overlay
>information in them which can't get read back in correctly.
>
>To rectify this situation, we would need to re-write some bits of
>COGRE to clone the tags that it uses so that this info is removed from
>the tag, at which point the save / load cycle would be ok.
>
>
>If you have a diagram you saved as you describe above, you can edit
>the .cgr file, and just replace the #<overlay ...> text with the
>vector [100 110] (or whichever numbers were in the overlay tag). Once
>you do that, it should be possible to reload the file.
>
>Good Luck
>Eric
>
--
Eric Ludlam: zappo@..., eric@...
Home: http://www.ludlam.net Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org
|