C# Code Reverse Plug-in

C# Reverse Engineering Plug-in is the easiest way to reverse C# source code into UML diagrams in Astah.

   Versions


   How to Install

  1. Download the Plug-in file by clicking the blue Download button at the top of this page.
  2. After the download is complete, drag the downloaded .jar file to an open instance of Astah. A pop-up will appear asking you to confirm installation, choose [Yes].
  3. If the pop-up below opens restart Astah.
    astah plugin menu
    The [Plugin] menu exists in version 7.2 or later. if you are using version 7.1 or earlier, read this FAQ.
  4. If you see the [Import C#] option under [Tools] - [C#], your installation is complete!
    C# reverse plugin

   How to Use

  1. First, you need to export C# code to XML using Doxygen.
  2. Download and install Doxygen.
  3. Launch Doxygen from [doxygen] - [Doxywizard]. [Doxygen GUI Frontend] dialog opens, select [Wizard] - [Project] and specify the items as below.
    Project nameEnter the project name
    Project version or idEnter Project version or ID
    Source code directlySpecity the source code directory
    Scan recursivelyCheck if you want to scan recursively including the sub folders.
    Destination directoryDo not use the following symbols &, <, >, * or @.
  4. Next move to [Wizard] - [Mode] and check the items shown in the figure below.
  5. Now configure [Wizard] - [Output] and check [XML].
  6. Go to [Expert] - [Input] and specify the encoding which is used in the source code (e.g. UTF-8, CP1252).
    List of supported encoding.
  7. Still in [Expert] - [Preprocessor]. Make sure to check the three options, [Enable_Preprocessing], [Macro_Expansion] and [Search_includes], rest can be your preference.
  8. Go to [File] - [Save] to save all the configuration you made, and go back to [Doxygen GUI frontend] dialog, select [Run] tab. Specify the working directory and click [Run doxygen]. If Doxygen finished converting without any errors, you will see the message "Doxygen has finished" in the window.
  9. In Astah, create a new file or open an existing file. Then go to [Tools] - [C#] - [Import C#] and start loading the XML file.
  10. To create a class diagram with imported source code, right-click on a package and generate a Class Diagram automatically.

   When import fails

  • Make sure that you set the correct encode in Doxygen. Please follow the step below to re-generate the .xml file.
    1. Check which encoding is used in the C# source code.
      All source code files need to be using the same encoding.
    2. Launch Doxygen. Go back to Step.3 to configure the setting.
    3. In the Step.6, set the same encode that you checked that is used in the C# source code.
      (Reference: List of Encode Doxygen supports)
    4. Go back to Step.8 and generate the XML and try importing to Astah again.
  • We tested this plugin with Doxygen version 1.8.6. If you are usin other version of Doxygen, use Version 1.8.6.

If this solution didn't help, please contact us.


   Download Old Versions

VersionUpdateCompatible withDownload
1.0.92015.7.17Version 6.7 or later
1.0.52013.3.22Version 6.6 or later