Git Product home page Git Product logo

quickdiagram's Introduction

Quick Diagram Tool for C#

This project is archived.

Project Status Update

This was an experimental project to prototype a code visualization tool for C# that is integrated with Visual Studio and enables you to quickly add source symbols to a diagram to explore their structure and relationships, similar to the CodeMap feature in Visual Studio Enterprise Edition but with a more lightweight approach.

The enhanced version of this tool is now called Codartis Diagram Tool and is available as a commercial product at https://codartis.com .

The following is the old Readme.md content

Code visualization tool for C# to quickly explore, navigate and document source code structure and relationships. Integrates into Visual Studio 2015, 2017 and 2019. Similar to the Code Map feature of Visual Studio Enterprise Edition but more lightweight ... and free.

Explore code visually

  • Add types or entire hierarchies from source code to diagram to visualize their relationships.
  • Use the diagram to discover related types.

Navigate quickly

  • Jump from the diagram to relevant source code segments.

Document with diagrams

  • Copy/paste diagrams into documentation.

Getting Started

  • Use the context menu in the source code editor to add types or entire hierarchies to the diagram.

Add To Quick Diagram

  • Use existing diagram nodes to discover their related entities. Dots on the sides of the diagram rectangles indicate that related entities exist.

Show Related Entities Large

  • Double-click on diagram nodes to jump to their declaration in the source code.
  • Save diagrams as image or copy/paste them directly into documentation.

See the Help for details.

Thanks to

  • Roslyn for the best parser API.
  • QuickGraph for the great graph library.
  • Graph# (sadly, Codeplex link is dead) for inspiration about WPF diagram canvas implementation and graph layout algorithms.
  • LearnVSXNow for VSIX resources.
  • Extensibility Tools for helping a lot in VSIX authoring.

License

GPL-2.0

quickdiagram's People

Contributors

dependabot[bot] avatar realvizu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quickdiagram's Issues

Test/measure memory consumption

Find out if we have memory leaks or overly generous memory usage.
Some areas to check: image export, clipboard handling, update diagram.

Link child to ancestor if parent types are not on the diagram

In the actual version, you see the inheritance hierarchy only if all types are on the diagram. If a type is missing on the diagram, the hierarchical tree is split in two as separated objects.

Suggestion : link related (as ancestor/child) types with a specific link type (providing some actions to see how many types there is between the two types, reinsert them on the diagram, etc.)

Like :
A <- B <- C <- D
A <****** D

Selection off-by-three when going to sealed type

It seems that every time I have displayed a class hierarchy and double-click a sealed class to open it in VS, the selection is always off by 3 chars.

Instead of the expected (using '|' as selection markers)
<tab>public sealed class |TypeName| : BaseName
it becomes
<tab>public sealed cla|ss TypeN|ame : BaseName

I have only seen it on sealed, but other keywords could possibly also be affected.

ViewportCalculator thinks the viewport size is 0,0

It happens when the tool window is floating and visible when starting up visual studio.

DiagramControl.xaml: ViewportResizeCommand="{Binding Path=ViewportCalculator.ResizeCommand}" is executed after tool window resize event so tool window size is not recorded in ViewportCalculator.

Auto follow nodes with viewport sometimes pans to the right too much

When add+resize gets processed together by the layout engine then everything is fine. But when the new node gets its position first (with zero size) and then gets its size, the viewport immediately pans to the enlarged node but later the layout engine will move it to the right.
Possible solution: translate the result of the layout engine to make exisiting nodes' position fixed.

Add fields, properties and methods to diagram

It would be a very handy enhancement, if one could show the methods, fields and properties of a class in the quick diagram. It is already possible to show the description of the class, so replacing this text with the list of methods, fields and properties when the user clicks a "Show/Hide Details" button may be rather straight forward. This would make the quick diagram a UML class diagram that can be used to generate code documentation if needed.

Suggestion: Allow namespace handling

Allow an option to display/hide the namespaces of types in the diagram. Hiding namespaces by default, as the tool does it right now, is OK. Sometimes I need to see namespaces displayed, as I have multiple types with the same name in different namespaces.

VS2019 Version

What expectation about VS2019 version of this exceptional and intuitive tool?
Thanks

How to see all classes relationship in the solution?

I don't want to add the classes one by one - there are too many. To get the idea about some new solution, I just want the tool to analyze whole solution (project) and build the diagram for me, including all relevant info.

How to Uninstall

Hi,
Please explain how to Uninstall this product, in the documentation.
I dont see it in control panel (Windows).
Thanks & Regards
Pilla Gurumurty Patrudu

Switching to the QuickDiagram tool window enters pan state

Repro:

  • Put QuickDiagram tool window into MdiChild mode (its tab is in the document well).
  • DblClick a diagram node to go to source. The source code editor comes to the foreground and QuickDiagram tool window gets hidden.
  • Switch back to QuickDiagram tool window by clicking its tab.
  • QuickDiagram tool window comes to foreground in pan mode (it pans by following the mouse without holding down the mouse button).

Maybe typo in Map

In Codartis.Util/Map.cs in line 30 there is:
lock (_dictionary)
maybe it should be:
lock (_lockObject)

Does nothing in VS2015

The extension when installed from VS2015 tools->extension and updates options does nothing

Just sits. Anything that can be done to make it work?

Adding new diagram nodes gets very slow as node number increases

The suspect is Diagram.HideRedundantDirectDiagramConnectors but we should profile to make sure.

The algorithm in HideRedundantDirectDiagramConnectors is very naive (finds all paths between all nodes). Try to find a better algorithm or move this task to background thread that will catch up eventually.

QuickDiagram cannot identify Implementing and Derived Types

In a large C# project in VS2019, sometimes QuickDiagram tool is able to locate implementing and derived types, but most of the time it doesn't find any at all.
image

It makes no difference whether the class/interface is added to the diagram from its definition in source code, or from one of its references as illustrated above. Cleaning and rebuilding the solution does not make a difference. Restarting Visual Studio and reloading the solution do not solve it either. Manually locating and adding a derived/implemented type to the diagram will usually cause the QuickDiagram tool to discover their relationship, but additional derived/implemented types will remain missing, even if they are present within in the same csproj. I get the feeling it might have something to do with multiple classes/interfaces specified in the same source files but I can't say this with any certainty.

This is frustrating because it makes this extension almost useless.

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.