Chapter 26. IDE Integration

  1. Home
  2. Docs
  3. Chapter 26. IDE Integration
  4. 5. Android Studio Integration
  5. How to generate Java from UML in Android Studio

How to generate Java from UML in Android Studio

Code generation creates and updates source files in a Java project from UML models. You can select to update the whole project, package(s) and class(es) from Visual Paradigm to Android Studio. Before updating source files, you must open the UML project from the Java project.

Project Based Code Generation

You can generate and update source files from the whole UML project. Packages and classes will be created (if not already exists) or updated. To generate/update source files from UML project, perform any of the steps below:

  • Click  in Android Studio toolbar.
  • Click  at the top of Diagram Navigator.
  • Right click on the root node of Diagram Navigator and select Update Project to Code from the popup menu.
    Update Java code in Android Studio

Package Based Code Generation

You can generate and update package and its containing source file(s) from a UML package. Package and classes will be created (if not already exists) or updated. To generate/update source files from UML package, perform any of the steps below:

  • Right click on the package in any diagram and select Update to Code from the popup menu.
    Update Java code for package
  • Right click on the package under Diagram Navigator/Model Explorer/Class Repository and select Update to Code from the popup menu.

Class Based Code Generation

You can generate and update source file from a UML class. Class will be created (if not already exists) or updated. To generate/update source file from UML class, perform any of the steps below:

  • Right click on the class in any diagram and select Update to Code from the popup menu.
    Update Java code for class
  • Right click on the class under Diagram Navigator/Model Explorer/Class Repository and select Update to Code from the popup menu.