Sorry about the slow response. It's been catapult season for me.
On 10/09/2011 12:41 PM, Philipp Haselwarter wrote:
> "Eric M. Ludlam"<ericludlam@...> writes:
>> There is a doc file cogre/cogre.info created when you build CEDET.
>> ---8<---[snipped 22 lines]---8<---
> …which is a little holey :)
> --8<---------------cut here---------------start------------->8---
> File: cogre.info, Node: Class Diagrams, Next: Export, Prev: Getting Started, Up: Top
> 2 Class Diagrams
> Add text here
> --8<---------------cut here---------------end--------------->8---
Heh, yea. Not as complete as it could be.
> Cogre sounds like such a good idea, but it is indeed not obvious how to
> actually use it, some real world tutorial could be quite helpful!
Part of the reason is that some of the workflows are incomplete in
COGRE. It is ok to create diagrams, move nodes, and do lots of stuff,
but much of the framework is set up to accomplish a core round-trip
solution, and there is no good way to add key details to your UML for
code gen. It is actually easier to generate the simple code, edit the
code, and ask cogre to refresh it's diagram from your code than create a
UI to let you type in attributes for your class.
Also, I can't really work on enhancing cogre anymore for some random
non-technical reasons. If a volunteer who can sign over changes to the
FSF would like to take over aspects of COGRE, I would be happy to assist
any way I can.
> Eg when I use `cogre-uml-quick-class' and save the output buffer to a
> file, after reopening the file I can't see the graph anymore, just
> text. And the *.dot files…how do you actually use those?
If you save a cogre diagram, it should load back in. Of course, you
need to add a .cgr extension to the save file. While poking around, I
just noticed that is never enforced. No wonder it was confusing.
dot files are for the dot program, which is a utility that draws
connected graphs. COGRE uses .dot files as a way to export your graph
to DOT so that you can use dot to create nicer looking print diagrams,
or so cogre can directly export to png and other output types.
Cogre also uses the dot layout engine if you select the Layout menu option.
> Can cogre generate a class diagram for a whole project? Cedet knows
> about heritage, so I'd guess cogre could figure out how objects are
I did make that work once, but it depended on a tool that was deprecated
from CEDET as it was unmaintainable. Unfortunately, I had no layout
engine, so needless to say, it was rather unpleasant.
There is no code I know of to do what you want, but a quick call to
semanticdb-find-tags-by-class for 'type could get you a list of
everything making repeated calls to the quick-class function on anything
that doesn't inherit from anything and then call the dot layout engine.
Might not be too bad to do.