locked
How to synchronize all UML Class Diagrams from code RRS feed

  • Question

  • Problem: How to synchronize many UML class diagrams from code with "one click"?
    Our development team (8 people) worked since 2007 with Visual Studio and upgraded about 4 months ago to VS2010 ultimate; used language is C#.
    In parallel, we used Enterprise Architect (Sparx) to have an UML Design of our Software Product by Reverse Engineering for documentation purposes and better understanding. Currently we have about 200 class diagrams and after each development iteration (about 7 weeks), we synchronized the UML Design via "importing" all concerned Projects of the Solution (Code Engineering…>Import Source Directory: Select 'Project'). This was a job of about 4 hours (with checking all class diagrams).
    A few weeks ago, we released our Software Product V1.0 and continue currently with V1.1.
    We are now checking whether to continue with Enterprise Architect or using the new modeling tools in VS2010 for UML Design functionality. So, I installed the VS2010 Feature Pack 2 and checked the new possibilities:
    - Export from Enterprise Architect and Import to VS2010 worked, but there was some data loss (Class diagrams were not imported, strange dependencies, etc.) --> Currently no option.
    - Instead, using the Architecture Explorer and UML Explorer works very well and is fast enough to re-draw the most important class diagrams of the 200 as in Enterprise Architect.
    But there is currently one pitty thing: Once we will have re-drawed all UML class diagrams again in VS2010, how can we synchronize them all together from the code with "one click"? Currently I only figured out, that each class must be dragged again to the UML class diagram to be synchronized from code.
    Is there another possibility to synchronize ALL UML Class Diagrams together?
    And if not, is there such a function or mechanism planned for a future update Version?

    Tuesday, January 25, 2011 5:10 PM

Answers

  • Hi Hantz,

     

    Thanks for trying out the product.  I don't have a great solution for your problem, but a possible work around.  

     

    There currently is not a way to refresh all of the classes on the diagram from the diagram it self.  As you found, you can drag the same class onto the diagram and it will get refreshed from what is in the code.  A possible work around, would be to after you have your diagram build, if you want to refresh the contained classes, drag the full namespace onto the diagram.  This will add a package shape to the diagram, which you can remove, and also refresh each visible class on the diagram.  

     

    I hope this helps,

    Mark


    Mark Groves | Program Manager | Visual Studio
    Wednesday, January 26, 2011 2:44 AM
  • Hi Mark,

    I tried your mentiond workaround and it even synchronizes several class diagrams over several projects in the solution, when dragging all concerned namespaces together with "one click". The only shortcoming still is, that we have to know, which of all about 300 namespaces to select and to drag.

    So, one current idea is to have one empty class diagram only to be used to drag all concerned namespaces for synchronizing purpose. Another idea is, that each team member using a class diagram, synchronizes it before use. I will discus this with our team.

    Thanks for our hint!

    Hantz

    Wednesday, January 26, 2011 4:05 PM

All replies

  • Hi Hantz,

     

    Thanks for trying out the product.  I don't have a great solution for your problem, but a possible work around.  

     

    There currently is not a way to refresh all of the classes on the diagram from the diagram it self.  As you found, you can drag the same class onto the diagram and it will get refreshed from what is in the code.  A possible work around, would be to after you have your diagram build, if you want to refresh the contained classes, drag the full namespace onto the diagram.  This will add a package shape to the diagram, which you can remove, and also refresh each visible class on the diagram.  

     

    I hope this helps,

    Mark


    Mark Groves | Program Manager | Visual Studio
    Wednesday, January 26, 2011 2:44 AM
  • Hi Mark,

    I tried your mentiond workaround and it even synchronizes several class diagrams over several projects in the solution, when dragging all concerned namespaces together with "one click". The only shortcoming still is, that we have to know, which of all about 300 namespaces to select and to drag.

    So, one current idea is to have one empty class diagram only to be used to drag all concerned namespaces for synchronizing purpose. Another idea is, that each team member using a class diagram, synchronizes it before use. I will discus this with our team.

    Thanks for our hint!

    Hantz

    Wednesday, January 26, 2011 4:05 PM
  • Good to hear.  Thanks. 
    Mark Groves | Program Manager | Visual Studio
    Wednesday, January 26, 2011 5:07 PM