C# Reverse Program Users Guide

The C# Reverse Program was created as a sample program by using Astah API. With this program, you can generate Astah models from C# Source Code. Please read the License Agreement before you start using this program.

Doxygen

To use this program, you need to have Doxygen, which is free. Because this program requires an XML file that is generated by Doxygen.

About Support Service

This program is provided as a sample of Astah API, so Change Vision, Inc. shall not provide technical support for any problems during using this C# Reverse Program.

System Environment

Both OS and Java Running Environment need to meet the same system requirements to run Astah UML or Astah Professional. This program has been tested on Windows only.

  • Astah Professional, Astah UML 6.0 or later
    Astah Professional(Astah UML) Install Folder\lib\commons-digester.jar(version 1.5)
  • Java Running Environment (Applicable Java version for Astah Professional(Astah UML) is required)
  • Doxygen 1.7.1 (doxygen-1.7.1-setup.exe), Doxygen Main Site or Download Doxygen
    For details about Doxygen, please refer to the license or documents they provide

Supported C# items

This program reverses all Classes, Attributes and Operations including their specified definitions.
Pointers would be reversed as a class with * in its name. This specification may be changed in the future version.
See Supported C# items for details.

Steps for importing C# Source Code

  1. Download Doxygen
  2. Install and Launch
    • Double-click the doxygen-1.7.1-setup.exe and install.
    • Select Start menu - "doxygen" - "doxywizard" to launch Doxygen.
  3. Set up Doxygen
    • Once you launch the Doxygen, the "Doxygen GUI Frontend" dialog opens automatically.
      Click [Wizard] - [Topics] - [Project] and configure the information.
      doxygen1_s
  4. Destination directoryDo not use the following symbols. If it includes any of them, the reverse program may not work properly.
    &, <, >, * or @
    • Open [Wizard] - [Topics] - [Mode] and then configure the following items.
      doxygen
    Select the desired extraction modeSelect "Documented entities only"
    Select Programming language to optimize the result forSelect "Optimize for C# output" or "Optimize for C#/CLI output"
    • Open the [Wizard] - [Topics] - [Output] and then configure the following items.
      C# Doxygen
    Select the output format(s) to generateSelect "XML" if you are using Doxygen 1.5.6, 1.5.7.1, 1.5.8, 1.7.0 or 1.7.1
    Select both "HTML" and "XML" if you are using Doxygen 1.5.7
    (Checking on "XML" only does not export XML in Doxygen1.5.7 properly)
    • [Expert] - [Topics] - [Input] button then configure the information.
      cpp_doxygen4_s
    INPUT_ENCODINGSpecify the correct Character encoding that is used for the Source code
    • Click "Save" button on the [Doxygen GUI Frontend] dialog and save the setting.
    • Specify the Doxygen Working Directory on the [Doxygen GUI Frontend] at step3.
  5. Importing Source code by Doxygen
    • Click "Start" button on the [Doxygen GUI Frontend] at step4 to generate XML.
    • The message "*** Doxygen has finished" appears when it completes successfully
  6. Generate Astah models from the XML
    • To generate Astah models, use the Astah Professional(Astah UML) Install folder\api\sample\sample_doxygen_c_plus\run.bat
      i.e. Generate the XMI file (C:\doxygen_xml) to Astah models (C:\doxygen_xml\converted.asta)
      run.bat C:\doxygen_xml C:\doxygen_xml\converted.asta

Configure the Astah C# Reverse program - Config.properties

You are able to customize the C# reverse program by modifying the following file.

Astah Professional(Astah UML) install folder\api\sample\sample_doxygen_c_plus\doxygen_cplus\Config.properties

jude_cplus_types_for_attribute

You can specify how you want to reverse the Property, as either Class's Attribute or Association. Properties are reversed as Associations by default. However if you define types in the Config.properties, you can reverse properties with the defined types as Class's Attributes.

(i.e.) BrickOut::Form1,BrickOut::Form2
Put types with namespace with commas between.

Auto-Create Class Diagram

You are able to generate Class diagrams with the Source Code you imported just by selecting [Auto Create Class Diagram/Detailed Class Diagram] menu from the Pop-up menu of Project, Package, Subsystem, Model or Classes in the Structure Tree.

[Tips] Auto-Create Class Diagram (Astah User Community)

Auto Create Class Diagram

Compile sample application

If you have altered the source code of this program, you need to compile before rerunning. To compile, double click the following file. Astah professional (Astah UML)

install folder\api\sample\sample_doxygen_c_sharp\compile.bat