scala2plantuml icon indicating copy to clipboard operation
scala2plantuml copied to clipboard

Show the relationships from one symbol to another

Open steinybot opened this issue 4 years ago • 0 comments

You may also want to discuss this in Ideas.

Description

I want to show how one symbol is connected to another and hide anything that is not relevant.

This would allow one to visualise how things are connected either advertently or inadvertently. It can help to explain large busy diagrams where it is hard to follow why a particular type is being included from the given starting symbol.

This can help with refactoring if for example you begin the refactoring and discover that you have to make many changes far from where the original change was and want to know how you go there and perhaps how to change the design so that the code is not so coupled together.

Potential Solution

  • Add an option --to which takes the destination symbol.
  • Build a graph of the types.
  • Do a depth first search using the distance between type names as a heuristic for which paths to travel down first under the assumption that related types are likely to lead to the solution quicker.
  • Modify nz.co.bottech.scala2plantuml.SymbolProcessor#processSymbol so that we can populate currentLevelSymbols with the nodes from the search result.
  • When --to is set then --max-level should default to 1.

Additional Information

This will have an interesting interaction with the --max-level option.

steinybot avatar Mar 09 '21 21:03 steinybot