CM3 - One Minute Tutorial
Welcome to the 1-minute tutorial of CM3. In this tutorial you will set up a minimal environment and create your first CM3 plugin for Magic Draw 9.5.
Prerequisites
- Apache Ant 1.6 (or Eclipse 3.x)
- Magic Draw 9.5 (the community edition is sufficient)
Getting started
- Download and unzip the CM3-Zoo-Demo.
- (Optional, for Eclipse only) Import the cm3-zoodemo project into a fresh eclipse workspace and switch to the Java perspective.
- (Optional, for Eclipse only) Goto Window > Preferences > Java > Build Path > Classpath Variables and create a new entry named "MAGICDRAW_HOME" and set it to your Magic Draw 9.5 installation directory.
- Rename build.properties.template to build.properties and set the property magicdraw.root to your Magic Draw 9.5 installation directory (use '/' instead of '\').
Now you are ready to start the show!
Building the plugin
- Execute build.xml (default target 'all') using Ant. This will generate, compile and package the CM3 plugin for Magic Draw 9.5 and install it to your local copy of Magic Draw 9.5 (you don't need to care about the details by now - just let the magic happen...)
- Now run Magic Draw 9.5 (or restart it, respectively). You will find a new entry named "CM3" in the menu bar.
Congratulations! You have successfully created your first CM3 plugin for Magic Draw!
See CM3 in action!
- Open ZooModel.xml.zip found in the model folder of the cm3-zoodemo project.
- Select CM3 > Validate Model from the menu and wait for the validation to be finished.
- Now you will see a new dialog titled "CM3: Message" which contains CM3 validation messages. Unfortunately somebody did a bad job and now you're facing validation errors. Take a closer look at the messages: CM3 complains about the name of the Class "GoLeo06" (which is the name of the mascot of the FIFA World Cup 2006). Rename it to "Clarence". Save the model and run validation - violá, the message disappears!
Congratulations! You've successfully mastered the 1-minute-tutorial of CM3.
You want to see more? You want all errors messages to disappear? Well, then get yourself a cup of coffee and go ahead to the 2-minute-tutorial.
CM3 - Validating your models