CS2Java - Sourcecode/UML Generator

MartinFeldmann developed the CS2Java UML Generator in 2007 within the scope of his Bachelor-Thesis. This wiki-web contains the thesis and a users manual.

Abstract

The increasing complexity of software systems in the industry and in research, as well as the requirement of reuseability makes documentation of software a necessity for the developer. The thesis is about the development of a documentation tool for the object oriented CS framework, which uses the graphical programming language LabVIEW, and is constructed especially for the development of control systems for large experiments at research instituts worldwide. The requirements for certain types of documentation and the way of generating it is discussed. Therefore, the useability of the OMG standard XMI is compared to generating source code of a common programming language as an intermediate step. The result is a code generator, which generates Java source code out of the CS classes. With an appropriate CASE tool, the Java source code can be used to automatically generate an UML diagram for documentation purposes.

Manual

Installation

Prerequisites
  • An installed LabVIEW Version 8.2 on the PC you want to use the tool.
  • A CASE Tool of your choice, cf. to thesis tables on page 71/72.

Download the tool from here, and extract it to your corresponding LabVIEW/ CS installation, e.g. F:\LVSCC\LV820\GPL\Projects\cs-framework\CSClassUtilities\CS2Java. This is necessary for the program to find the LabVIEW sources.

Start the program with GenerateCode.vi .

User Interface

The user interface

After starting GenerateCode.vi, this user interface will open up.

  • The array classpaths to classes to be analyzed is used to register the CS classes, from which the Java sources shall be created. If you leave this array empty, all classes in your CS system will be analyzed. You can optionally specify the classpath, or just the classname without any path.

  • The button class or interface generation lets you select, whether the program shall generate Java classes or Java interfaces from the CS classes. This is important if you have multiple inheritance, depending on the way you want it to be displayed later by the CASE tool.

  • The field directory parsed java files lets you determine where to store the generated Java files.

  • There are displays which let you know the progress the program has already made when running, and there is a message log for error messages.

  • Further you can specify where all the temporary files are stored. There are default values for them all, so you don't have to fill in these fields. Moreover, these files are only important for debugging purposes, so you don't have to bother.

After filling out the fields, you can press the START button. The program will generate the Java files in the desired location.

CASE Tool

If you want to display your software system as an UML class diagram, or as another kind of diagram for that matter, you have to use a CASE tool, which generates this diagram. In the thesis on page 71/72 you will find a table, where the attributes of some free CASE tools are listed. I recommend using the JDeveloper from Oracle, which is a powerful modelling tool, but you can use a CASE tool of your choice.

JDeveloper instructions
  • Import the Java sourcecode into your JDeveloper project.
  • Create a new empty class diagram.
  • Drag'n'Drop the whole package of Java source files into the diagram.
  • Present your new shiny diagram at the next meeting and enjoy.

-- MartinFeldmann - 05 Jun 2008
Topic attachments
I Attachment Action Size Date Who Comment
Bachelor-Thesis2.pdfpdf Bachelor-Thesis2.pdf manage 6526.4 K 2008-06-05 - 13:01 UnknownUser This is the corresponding BSc.-Thesis
Topic revision: r4 - 2008-06-06, HolgerBrand
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)