lutaml / lutaml-uml

UML module for LutaML
2 stars 2 forks source link

Change graphviz formatter to use Ruby-Graphviz dsl. #47

Closed w00lf closed 3 years ago

w00lf commented 3 years ago

https://github.com/glejeune/Ruby-Graphviz support rich dsl for creating dot files:

require 'ruby-graphviz'

# Create a new graph
g = GraphViz.new( :G, :type => :digraph )

# Create two nodes
hello = g.add_nodes( "Hello" )
world = g.add_nodes( "World" )

# Create an edge between the two nodes
g.add_edges( hello, world )

# Generate output image
g.output( :png => "hello_world.png" )

And currently, this gem uses strings notations in order to create diagram elements. They should be changed for Ruby-Graphviz dsl instead.

ronaldtse commented 3 years ago

We should wrap the GraphViz gem with a class Lutaml::Layout::GraphVizEngine <Engine, so that we can build a common interface for the future usage of other layout tools.

w00lf commented 3 years ago

We should wrap the GraphViz gem with a class Lutaml::Layout::GraphVizEngine <Engine, so that we can build a common interface for the future usage of other layout tools.

Ok, got you, will do

w00lf commented 3 years ago

We should wrap the GraphViz gem with a class Lutaml::Layout::GraphVizEngine <Engine, so that we can build a common interface for the future usage of other layout tools.

Done in #48

ronaldtse commented 3 years ago

Closing. Thanks @w00lf !