Giter Club home page Giter Club logo

scala-uml's Introduction

scala-uml

Obtain UML class diagrams from Scala 2 or Scala 3 source code in a compiler-independent way.

Table of Contents
Quick example:
Input Output
animal.scala olm.scala
trait Animal {
  val location : String
}

sealed case class Wombat(
  location:String
) extends Animal
package animals.extension

import animals.Animal

sealed case class Olm(
  location:String
) extends Animal

This project can generate UML class diagrams from Scala programs without being dependent on the scala compiler. That means you can obtain class diagrams of work in progress files and also standalone files that would not compile on their own. However, it is also possible to generate class diagrams to multiple directories of a public github repository. The project takes into account not only the relationships of the classes but also the package definitions.

Scala-uml evolved from a master thesis in which stereotypes were inserted for all scala-specific features in the context of a UML profile.

  • Input: Folder of Scala files or a config file targeting a public github repository
  • Output: UML class diagram of the files as an svg-image or in the format of class diagrams of PlantUML

At the moment there is no release. However, this project is planned to be a console application and it can allready respond to a few console commands. Until there is an actual console application, in order to use it you need to get the repository and start the application with sbt "run <commands>".

Commands available:

Command Functionality
-f,--files <path> Directory of input Scala files
-o,--output <path> Directory of output class diagram
-n,--name <name> name of the output file
-t,--textual states that the output format should be in the .puml format of PlantUML class diagrams
-e,--exclude r <regex> Excludes classes or packages from the diagram that match a given regular expression . The regular expression is matched on the package + name. If you want to delete anything in a package named "org::com::foo" you can use (org::com::foo.*). More options are planned here :)
-g,--github <path to config> Processes directories of a github repository stated in a config file. More infos on config files here
name = "kivy-astmanip"
owner = "theorydudes"
directories = {
  type="directories",
  dir-entries=[
    {type = "entry", path = "src/main/scala/com/github/theorydudes/model"}
    ]
}

At the moment only public repositories can be used. The config must include the name of the repository and the owner and also a list of directories you want to consider in the visualization. In this case, there is only one directory model. You can just add entries in the list of dir-entries.

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.