our new monthly subscription model! Only
$9.99 a month!
Students / Estudante
M PLUS Plug-in
M PLUS is a Model-driven development (MDD) Plug-in for Astah which enables you to generate C++/Python/Ruby/Swift/VDM++ Source Code from UML Classes. Like Acceleo, MOFScript and Xpand, the M PLUS Plug-in has the ability to preserve the code you directly add into generated code. So you can generate code from the same model while preserving the code you add to the previously-generated code.
Latest Version: 1.6 (Updated: Sep 23, 2017)
Compatible with: Astah Professional, Community 7.1 and SysML 1.4 (Provided as alpha version for Astah SysML)
Developer: Takaaki Teshima
Feedback and report to :
M PLUS Inquiry Form
How to Install
Download the Plug-in file by clicking the blue Download button at the top of this page.
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].
If the pop-up below opens, restart Astah.
The [Plugin] menu exists in
or later. if you are using version 7.1 or earlier,
read this FAQ
Install is complete if [M+] tab is added in the "Extra View" below the diagram editor.
If Extra View is not opened, go to [View] - [Show/Hide Extra View].
How to Use
Go to [M+] tab below diagram editor. Then specify a directory where you want to generate the source code to.
Choose a programming language you'd like export into.
Create a model or open .asta file.
In the structure tree, select the model(s) - Class, Package or a root project that you want to generate the source code of. If your selected models contain sub-packages and models, all of those models will be generated.
Click [Generate Code] button in the [M+] view or use shortcut key [Alt + C] if you are on Windows or Linux.
Once the source code is generated, the result appears in the view. Directly double-clicking the file path will open the file in an editor..=
Modify the code in the "User Code Area" - which is an area quoted with "// ˅" and "// ˄". (Lines in lime green in the figure below.) The code you add in the User Code Area will be preserved for subsequent code generations just like how "User Code Blocks" with Acceleo, "Unprotected Blocks" with MOFScript and "Protected Regions" with Xpand work.
Do not add code other area than "User Code Area", it might clear out all the codes in the "User Code Area".
Do not add code in the line where "// ˅" and "// ˄" are.
Source code will be generated in UTF-8 without a BOM.
Repeat step 3-7. If the code was modified from previous generation, the file path will appear in black and unmodified files will appear in grey.
Close your project. When the file is saved after code generation, the configuration file (m_plus.conf) will be automatically saved in the same directory where the .asta file is saved. Keeping this configuration file means you don't have to re-set the target directory every time you generate the code. You may want to save this configuration file in version control such as Git or Subversion.
Back to Plugin List
Astah UML Pad
Quick Start Video
Are You Modeling?
Friends of Astah
Meet our CEO
CV Members Site