GithubHelp home page GithubHelp logo

scaldy's Introduction

scaldy

Generates a UML-ish class diagram (in Graphviz dot format) from Scala sources.

The idea is to help auto-document a class model. At the moment Scaldy generates boxes for classes and traits, and shows inheritance and composition relationships with arrows. Some details:

  • Traits are stereotyped with «Trait»
  • Non-concrete boxes are labeled in italics
  • Also concrete boxes have stronger colours
  • Composition is based on class members
  • At the moment only vars marked with @BeanProperty are processed
  • The boxes are grouped and coloured by file
  • At the moment Scaldy assumes that the first line in each file is a non-curly-braced package declaration and skips it because the parser has errors with that, so if your code is not shaped like this it won't work

There are sample model - diagram pairs below src/test/sample.

For example, if you are in sbt and run

> run C:\dev\scaldy\src\test\sample\posts

it will parse the .scala files in that path and generate a scaldy.dot file, then you can run

C:\dev\scaldy>dot -Tsvg scaldy.dot -o ./src/test/sample/posts/diagram.svg

to generate

this diagram.

The result is a bit disconnected because there are no @BeanProperty annotations in this model. This is roughly the same class structure where some defs have been replaced by @BeanProperty var. This sample is under /sample/beanposts/ and generates

this diagram.

Note: using .png for the embedded images instead of .svg because of this issue

scaldy's People

Contributors

alvrod avatar gsoto avatar pmilanese avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.