nidi3 / graphviz-java

Use graphviz with pure java
Apache License 2.0
937 stars 107 forks source link

add method addLink() to be able to provide link attributes #137

Closed thombergs closed 4 years ago

thombergs commented 4 years ago

Adds a method addLink(Link) to MutableNode to allow to modify link attributes directly.

Solves #136 .

This seemed to be the easiest way to solve #136. Let me know if there is another way. Would be great to get this (or a similar solution) merged so I can use it in my project :).

codecov-io commented 4 years ago

Codecov Report

Merging #137 into master will increase coverage by 0.01%. The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #137      +/-   ##
============================================
+ Coverage     77.78%   77.79%   +0.01%     
- Complexity      966      967       +1     
============================================
  Files            86       86              
  Lines          3119     3121       +2     
  Branches        311      311              
============================================
+ Hits           2426     2428       +2     
  Misses          508      508              
  Partials        185      185
Impacted Files Coverage Δ Complexity Δ
...ain/java/guru/nidi/graphviz/model/MutableNode.java 71.05% <100%> (+0.78%) 33 <1> (+1) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 15d366c...ed82627. Read the comment docs.

nidi3 commented 4 years ago

There is already public Link linkTo(LinkTarget target) and Link implements LinkTarget