Generating EO Java Classes
WOLips encapsulates the functionality of EOGenerator so that the Java classes can be generated from within Eclipse. WOLips can create an .eogen definition for you when the model is created or you can create one after the model has been created by going to File New Other... and selecting EOGenerator.
Install and Configure EOGenerator
Before you can generate Java classes you will need to download (from http://www.rubicode.com/Software/EOGenerator/) and install EOGenerator. EOGenerator is not part of Eclipse or WOLips. It is a command line tool which needs a number of parameters/preferences to run. Do not use EOGenerator's instructions for installation as an Eclipse builder. EOGenerator is run using a WOLips configuration. After it is installed, tell Eclipse/WOLips where it is in preferences:
Setup Configuration for a Model
The next step is to fill in the .eogen configuration for your model.
Double click on the <ModelName>.eogen icon in the Package Explorer or Navigator:
The top section of the editor looks like this:
Set the model(s) to generate Java for in the first area. In the second include models containing prototypes and models that are referenced by the models in the first group, but which should not have Java generated for the entities in them.
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.
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.
Generate the Classes
The Simplest Way is Set it on Automatic
Use the WOLips build preferences to ensure your classes are regenerated every time you save changes to the EOModel
!Picture 16.jpg!
Manual Generation during Development
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.