drewnoakes / dependency-analyser

Shows the dependencies between .NET projects and assemblies as a graph.
https://drewnoakes.com/code/dependency-analyser/
GNU Lesser General Public License v3.0
43 stars 5 forks source link

Allow abbreviating common prefixes #20

Open drewnoakes opened 1 year ago

drewnoakes commented 1 year ago

It's pretty common for lots of projects to have similar prefixes. Abbreviating these can save space and make graphs easier to read, without hurting understanding.

Before

flowchart TD
    Microsoft.VisualStudio.Editors --> Microsoft.VisualStudio.AppDesigner
    Microsoft.VisualStudio.ProjectSystem.Managed.UnitTests --> Microsoft.VisualStudio.ProjectSystem.Managed
    Microsoft.VisualStudio.ProjectSystem.Managed.VS --> Microsoft.VisualStudio.ProjectSystem.Managed
    Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests --> Microsoft.VisualStudio.ProjectSystem.Managed.UnitTests
    Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests --> Microsoft.VisualStudio.ProjectSystem.Managed.VS
    Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests --> Microsoft.VisualStudio.ProjectSystem.Managed
    Microsoft.VisualStudio.ProjectSystem.Managed.TestServices.UnitTests --> Microsoft.VisualStudio.ProjectSystem.Managed
    Microsoft.VisualStudio.ProjectSystem.Managed.CommonFiles --> Microsoft.VisualStudio.ProjectSystem.Managed
    DeployTestDependencies --> Microsoft.VisualStudio.AppDesigner
    DeployTestDependencies --> Microsoft.VisualStudio.Editors
    DeployTestDependencies --> Microsoft.VisualStudio.ProjectSystem.Managed.VS
    DeployTestDependencies --> Microsoft.VisualStudio.ProjectSystem.Managed
    Microsoft.VisualStudio.Editors.UnitTests --> Microsoft.VisualStudio.Editors
    Microsoft.VisualStudio.Editors.UnitTests --> Microsoft.VisualStudio.AppDesigner

After

flowchart TD
    MS.VS.Editors --> MS.VS.AppDesigner
    MS.VS.PS.Managed.UnitTests --> MS.VS.PS.Managed
    MS.VS.PS.Managed.VS --> MS.VS.PS.Managed
    MS.VS.PS.Managed.VS.UnitTests --> MS.VS.PS.Managed.UnitTests
    MS.VS.PS.Managed.VS.UnitTests --> MS.VS.PS.Managed.VS
    MS.VS.PS.Managed.VS.UnitTests --> MS.VS.PS.Managed
    MS.VS.PS.Managed.TestServices.UnitTests --> MS.VS.PS.Managed
    MS.VS.PS.Managed.CommonFiles --> MS.VS.PS.Managed
    DeployTestDependencies --> MS.VS.AppDesigner
    DeployTestDependencies --> MS.VS.Editors
    DeployTestDependencies --> MS.VS.PS.Managed.VS
    DeployTestDependencies --> MS.VS.PS.Managed
    MS.VS.Editors.UnitTests --> MS.VS.Editors
    MS.VS.Editors.UnitTests --> MS.VS.AppDesigner