Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating class diagrams #175

Closed
Auliyaa opened this issue Jan 13, 2016 · 22 comments
Closed

Generating class diagrams #175

Auliyaa opened this issue Jan 13, 2016 · 22 comments
Labels
enhancement Improved functionality plugin idea This feature may be best suited for a plugin

Comments

@Auliyaa
Copy link

Auliyaa commented Jan 13, 2016

Currently, class hierarchy is shown as plain text, It would be nice if there was an option available to include SVG class diagram inside a class' documentation.

In addition, having the possibility to generate a full class diagram over a project (that would be displayed inside the home page or in a specific section) would be another nice addition.

@FlippieCoetser
Copy link
Contributor

YES, please! Will be super helpful!

@Auliyaa
Copy link
Author

Auliyaa commented Jan 14, 2016

I do agree with you to some extent.
However having this kind of feature as an option would allow all sorts of
small architectures to be rendered in a clear way inside the documentation
page.

Moreover, ther could be an option to generate one diagram per namespace /
module in order to ensure readability for larger code bases.

On Thu, Jan 14, 2016 at 7:28 AM, Jeongho Nam [email protected]
wrote:

First, I'm sorry to opposite some opinion. Of course, what I want to say
is a subjective perspective, too.

I've used Doxygen for many years and of course, have used GraphViz to
generate class diagrams automatically. However, quality of [full] class
diagram automatically generated is not good. It's very hard to read and
lines expressing relationship and connection are very complicate to
comprehend.

Even the automatically generated full class diagram expanded to a project
level, the diagram's readability can't be guaranteed. So I want to insist,
if make a class diagram generator, it would be better to express class
diagram with only with hierarchy and inheritance relationship.

In my case, I draw class and collaboration diagram for each module or
package by my hand. At next, insert the diagrams to API document as image
files and the auto-generated API document with auto-generated inheritance
(not full, only prints object name) diagram.

http://samchonorg.wix.com/framework#!architecture-designs/c1lio
http://samchon.github.io/framework/api/cpp/annotated.html

Although I opposite to generate full class diagram, I do not opposite to
generate a simple diagram. I am challenging to a open-source contest as a
subject of UML. If I can be helpful, I want to try the function.


Reply to this email directly or view it on GitHub
#175 (comment)
.

Cordialement.

M: [email protected]

@Chowarmaan
Copy link

👍

@electricessence
Copy link

++

@aciccarello
Copy link
Collaborator

You might want to look at #68 which talks about class diagrams.

@0815fox
Copy link

0815fox commented Jun 20, 2016

Last weekend I forked @meirgottlieb s typedoc-plantuml module and added automatical generation of uml class diagrams:

https://github.com/0815fox/typedoc-plantuml

screenshot

@samchon
Copy link

samchon commented Jun 21, 2016

@0815fox Wow, it seems amazing.
I had been drawing diagrams and inserted to API documents by my hand like such below:

I appreciate for your help.

image

@0815fox
Copy link

0815fox commented Jun 21, 2016

Credits to the uml tag features go to @meirgottlieb.

@nadhir-falta
Copy link

@0815fox Michael, how do I get to generate class diagrams automatically?

@0815fox
Copy link

0815fox commented Jan 9, 2017

@nadhir-falta I wrote it just short time before / while they modified the interface of typedoc. I do not have time to adopt to their new interface. It stopped working with 0.5.0 of typedoc, I think.

@krisztianb
Copy link
Contributor

@0815fox First of all, thank you for your work with typedoc-plantuml. I would really like to use it, as there seems to be no other solution for auto-generating documentation for a TypeScript project. Would it be difficult to adopt typedoc-plantuml to the latest typedoc?

@0815fox
Copy link

0815fox commented Nov 2, 2017

Probably it is not too difficult, but I will not spend any time on this, as I don't have the time for it.

@Chowarmaan
Copy link

Chowarmaan commented Nov 2, 2017 via email

@krisztianb
Copy link
Contributor

@Chowarmaan Thanks for the information. Can you create UML class diagramms using compodoc? I can't find such a feature. It looks like that it can only generate a kind of module dependency graph.

@Chowarmaan
Copy link

Chowarmaan commented Nov 2, 2017 via email

@krisztianb
Copy link
Contributor

I've just checked their Issues page and saw that there are already several requests for this (one using the plantuml approach). So I guess we have to wait.

@SlickNutter
Copy link

@Chowarmaan is compodoc also good for non-angular typescript projects?

@Chowarmaan
Copy link

I use it with Angular/Ionic and it works well. I do not see why it would not work as it does take your tsconfig.json as a parameter, so it knows where the source is. I have not tried it on other projects outside of Angular though myself.

@SlickNutter
Copy link

SlickNutter commented Feb 13, 2018 via email

@aciccarello
Copy link
Collaborator

Someone created a plugin for creating mermaid diagrams in doccomments using an @mermaid annotation.

/**
 * Hoge is sample class for example of `typedoc-plugin-mermaid`.
 *
 * @mermaid Make TypeDoc easy to use with mermaid.js
 * graph TB
 *   mermaid.js --> TypeDoc;
 */
export class Hoge {
}

typedoc generated documentation with diagram matching the above code snippet

@krisztianb
Copy link
Contributor

@aciccarello Mermaid does not support class diagrams, does it?

@krisztianb
Copy link
Contributor

krisztianb commented Nov 9, 2019

I just wanted to update this thread. Both the typedoc-plantuml and typedoc-plantuml-extended packages form NPM are working with the latest 0.15.0 typedoc.

typedoc-plantuml: This is the original package created by Meir Gottlieb which enables you to insert UML diagrams into your comments using the <uml> tag and the PlantUML-Syntax inside of it.

typedoc-plantuml-extended: Someone uploaded the extensions of typedoc-plantuml developed by @0815fox to NPM and called it this way. It automatically creates class diagrams for your classes without having to insert any tags in your comments.

Just so that you know, because it wasn't clear to me: You need to install JAVA and Graphviz in order to use any of the two, because PlantUML relies on them. You don't have to install PlantUML by yourself as the required .jar file is included in the packages above.

@Gerrit0 Gerrit0 added enhancement Improved functionality plugin idea This feature may be best suited for a plugin labels Dec 16, 2019
@Gerrit0 Gerrit0 closed this as completed Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality plugin idea This feature may be best suited for a plugin
Projects
None yet
Development

No branches or pull requests