Skip to content

J-Diagram is a Visual Studio Code extension to help Java developers. This provides a convenient conversion between the Java source code and the class diagram.

License

Notifications You must be signed in to change notification settings

OH318/J-Diagram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

J-Diagram

Class Diagram Extractor & Coder for Java

Overview

J-Diagram is a Visual Studio Code extension to help Java developers. This provides a convenient conversion between the Java source code and the class diagram.

Dependencies

Supported Environments

  • Windows, MacOS, Linux

Getting Started

Install J-Diagram to Visual Studio Code

  • Find and install J-Diagram

    image

Convert Java source codes to class diagram

  1. Open command palette ( cmd or alt +shift + p).
  2. Type J-diagram : Convert Source to Diagram to change Java sources into drawio diagram
  3. Choose a way you would like to specify a path to Java sources.
  4. Specify where to find java sources
  5. The path may be a directory path for Java sources or a file path for just one Java file.
  6. Then, decide where you would like drawio file to be created. The file will have name of j-diagram.drawio

Extract Java source codes from class diagram

  1. Open command palette ( cmd or alt +shift + p).
  2. Type J-diagram : Convert Diagram to Sources to extract Java sources from drawio diagram
  3. Choose a way you would like to specify a path to drawio file.
  4. Then, locate the drawio file.
  5. Decide where you would like Java files to be created.

Building J-Diagram from Source

  1. Make a runnable .jar file
    1. Import https://github.com/OH318/J-Diagram.git using the Eclipse.
    2. Right-click on the project.
    3. Select "Export" > "Java" >> "Runnable JAR file" and click Next button.
    4. Finish the process
  2. Execute .jar file
    java -jar [runnable .jar path] [java src dir path] [.drawio file path] [0|1]
    # If the last argument is 0, extractor will be executed.
    # If the last argument is 1, coder will be executed. 
  • We had a classpath-related problem with one of the dependencies when we used Maven build in VSCode. So we chose to create the .jar file in Eclipse as an alternative. As soon as we find a solution, we will change it to using Maven build.

Testing J-Diagram

  • Test cases using J-Unit are in converter/src/test/java/com/handong/oh318
  • Test cases for integration testing are in converter/src/test/resource

Contact

About

J-Diagram is a Visual Studio Code extension to help Java developers. This provides a convenient conversion between the Java source code and the class diagram.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published