Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
This is out of date and FIXME needs review to make it work with UmpleTL
The debug mode for Umple adds a comment featuring the name of each jet template alongside the code that template generated. This can be useful when you have no idea which Jet template created a given piece of the code.
As it currently causes a number of tests to fail, the mode is not enabled by default.
There are two ways to enable the debug mode, differing only in their first step.
The easiest way is to run the InsertDebugCode.rb Ruby script located in the build directory. After that has run, in Eclipse, refresh and rebuild all of the Jet projects (UmpleToJava, UmpleToRuby, UmpleToCpp, and UmpleToPhp). Next, do a complete build using Ant (ant -Dmyenv=local -f build.umple.xml).
The second way is to modify the build.umple.xml file and uncomment lines 46-50. Then run
ant -Dmyenv=local -f build.umple.xml templates. Assuming that the Ruby interpreter is on your path, this will run the script from the first method. Rebuild the Jet projects in Eclipse, and do a complete build with Ant as in the first method (the pre_build option may work as well if the complete build takes too long).
If everything has been done correctly, the files in the cruise.umple/src-gen-jet/cruise.umple.compiler packages should contain lines referencing the model.
isDebugMode() method. If these lines are in the files, then everything has been done correctly. Adding the debug; keyword before the class definition in an Umple file should result in the template names being added to the output. Please note that this will currently cause some tests to fail, and do not commit the modified jet templates to the repository.
The only way to undo the changes made by the script is to delete the jet projects and download them from the repository again, then repeat the steps above, minus the part where the script is run.