Changes for page Generating Custom EO Java Classes
Last modified by David Avendasora on 2011/05/25 12:58
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,1 +1,37 @@ 1 1 WOLips encapsulates the functionality of [[EOGenerator>>http://www.rubicode.com/Software/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**. 2 + 3 +=== Install and Configure EOGenerator === 4 + 5 +Before you can generate Java classes you will need to download and install EOGenerator and then tell Eclipse where it is in preferences: 6 + 7 +[[image:EOGeneratorPreferences.jpg]] 8 + 9 +=== Setup Configuration for a Model === 10 + 11 +The next step is to fill in the .eogen configuration for your model. 12 + 13 +{{info title="Multiple Models"}} 14 + 15 +If you have multiple models that you need to generate Java classes for, and they need different settings (templates, destination directories etc), each of these will need its own .eogen configuration. 16 + 17 +{{/info}} 18 + 19 +Double click on the <ModelName>.eogen icon in the Package Explorer or Navigator: 20 +[[image:eogenIcon.jpg]] 21 +The top section of the editor looks like this: 22 + 23 +[[image:EOGenerator1.jpg]] 24 + 25 +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. 26 + 27 +The File Names settings can be ignore 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. 28 + 29 +[[image:EOGenerator2.jpg]] 30 + 31 +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. 32 + 33 +[[image:EOGenerator3.jpg]] 34 + 35 +=== Generate the Classes === 36 + 37 +To generate the Java classes, 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.