Last modified by David Avendasora on 2011/05/25 12:58

Hide last authors
David Avendasora 60.1 1 WOLips has the ability to generate .java files for the Entities in your project's EOModel files. In Project Builder and Xcode, and really old versions of WOLips, you had to do this yourself by using [[Rubicode's EOGenerator>>url:http://www.rubicode.com/Software/EOGenerator/||shape="rect"]]. WOLips now has it's own built-in EOGenerator. It has a different templating engine ([[Velocity>>url:http://velocity.apache.org/||shape="rect"]] instead of [[MiscMerge>>url:https://github.com/rentzsch/mogenerator/tree/master/MiscMerge||shape="rect"]])
chuckhill 51.1 2
David Avendasora 59.1 3 === Create and Configure an .eogen file for your EOModel ===
chuckhill 51.1 4
David Avendasora 59.1 5 1. Right-click on your EOModel in WOLips and select WOLips Tools=>Create EOGenerator File.
David Avendasora 60.1 6 [[image:attach:eogenIcon.jpg]]
David Avendasora 59.1 7 1. Double click on the <ModelName>.eogen icon in the Package Explorer or Navigator:
David Avendasora 60.1 8 [[image:attach:EOGenerator1.jpg]]
David Avendasora 59.1 9 1. In the "Models" section, add the EOModel(s) that have Entities that you want to generate Java classes for.
David Avendasora 60.1 10 1. In the "Referenced Models" section, include any other EOModels that contain Prototypes or Entities that are used or referenced by the EOModels in the "Models" section.
chuckhill 51.1 11
David Avendasora 60.1 12 {{note}}
13 Java classes will not be generated for Entities in the EOModels in the "Referenced Models" section.
14 {{/note}}
chuckhill 51.1 15
David Avendasora 60.1 16 The File Names settings can be ignored unless you need to generate oddly formed file names. You will usually want to **Create Packages** (place the generated files in a directory corresponding to their package). It can useful to have different **Destination** and **Subclass Destination** directories. The totally generated classes in the Destination directory are not very interesting and can be tucked away out of sight.
chuckhill 51.1 17
David Avendasora 60.1 18 [[image:attach:EOGenerator2.jpg]]
chuckhill 51.1 19
David Avendasora 60.1 20 The **Templates** determine how the Java code is generated. The setting should be self explanatory. The **Defines** are useful for extending the templates with custom values.
chuckhill 51.1 21
David Avendasora 60.1 22 [[image:attach:EOGenerator3.jpg]]
23
David Avendasora 59.1 24 === Generate the Classes ===
chuckhill 51.1 25
David Avendasora 59.1 26 ==== The Simplest Way is Set it on Automatic ====
chuckhill 51.1 27
David Avendasora 59.1 28 Use the WOLips build preferences to ensure your classes are regenerated every time you save changes to the EOModel
chuckhill 51.1 29
David Avendasora 59.1 30 {{panel}}
David Avendasora 60.1 31 [[image:attach:Picture 16.jpg]]
David Avendasora 59.1 32 {{/panel}}
chuckhill 51.1 33
David Avendasora 59.1 34 ==== Manual Generation during Development ====
chuckhill 51.1 35
David Avendasora 60.1 36 To generate the Java classes manually, simply right (control) click on the .eogen configuration and select **EOGenerate...** from the context menu. A dialog window will be shown when EOGenerator finishes so that you can verify what it did.
chuckhill 51.1 37
David Avendasora 59.1 38 ==== Troubleshooting ====
chuckhill 51.1 39
chuckhill 55.1 40 {{note title="EOGenerator Not Running?"}}
David Avendasora 60.1 41 Nothing happens? Just see a flicker of a progress bar at the bottom right? Go back to the Preferences. The path to the eogenerator executable is missing or incorrect.
chuckhill 55.1 42 {{/note}}