Creating the first model and generating code using Eclipse.
Assuming PyDev is installed, select PyDev perspective, click File in main menu and select new -> Pydev Project.
Enter desired name, commonly the egg name and click finish
Create new folder named agx inside new project by right clicking project in navigator and selecting new -> Folder.
Open Papyrus perspective and navigate to agx folder.
Create a new model by right clicking folder in navigator and selecting new -> create an empty Model, select target folder and enter a name for the model. finally click finish.
Two files are created. The diagram file and a UML file. After refreshing they appear in navigator.
Open outline view by clicking Window and selecting Show View -> Outline.
The UML model related tool-bar can be expanded at the top right.
Right click on already created uml file, select Properties and navigate to AGX Properties.
Define output directory. This is where generated code goes to.
Define generator executable. By clicking apply AGX Eclipse will fetch provided profiles by invoking defined executable.
Select pydev profile, and activate it by selecting it and clicking >>.
Click import selected profiles. Selected profiles are now copied to UML Model location.
After refreshing navigator imported profile appear next to model. Keep in mind that it’s essential to have model and profiles in the same folder. Thats because the path to profile is stored in model.
Click Properties Tab at the bottom of Eclipse IDE, select model in outline and klick Profiles in properties tab.
On the right you find the + icon for applying profiles.
Click + icon, navigate to pyegg.profile.uml in agx folder, select it and click OK.
Choose pyegg profile, click OK and save model (ctrl + s)
In this example we’re just drawing a package generating python egg structure. The remaining profiles and generators are described in Users Documentation.
Expand Palette, click Package* and paint a package in your diagram.
Click Properties Tab -> General and give it desired egg name. This must be target package name, preceiding names define the namespace packages.
Rickt click package in diagram and select profile -> Apply Stereotype.
Select pyegg profile, click -> and OK.
pyegg stereotype now apears to be set on package.
Select package, in Properties Tab -> Profile. In Applied stereotypes expand pyegg.
Now available tagged values appear for defined stereotype. Select tagged value name you want to define value for and click + button on the right to add value.
UML2 does not support multi valued tagged values. In case where enumerations are needed, value is seperated by comma. Refer to Users Documentation for details.
Save changes after defining tagged values.
The Model is now ready to be generated. Right click diagram related UML file agx.hello.world.uml in navigator and select AGX -> generate.
AGX opens a console and prints generator output to it.
After refreshing generated code appears in navigator.
Congratulations. You have done your first AGX MDSD project.