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

From version 46.1
edited by Kieran Kelleher
on 2007/07/29 16:00
Change comment: Removed the ant/perl script stuff since WOLips now offers a simple checkbox in the WOLips/build preferences that automates the EOGeneration of the java classes
To version 47.1
edited by chuckhill
on 2006/11/01 19:29
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.kieran
1 +XWiki.chuckhill
Content
... ... @@ -1,63 +1,17 @@
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**.
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 2  
3 -=== Install and Configure EOGenerator ===
3 +=== Install and Configure ===
4 4  
5 -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:
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 6  
7 7  [[image:EOGeneratorPreferences.jpg]]
8 8  
9 -=== Setup Configuration for a Model ===
9 +=== Configure for a Model ===
10 10  
11 -The next step is to fill in the .eogen configuration for your model.
11 +The next step is to fill in the .eogen configuration for your model. If you have multiple models that you need to generate Java classes for, each of these will need its own .eogen configuration. Double click on the <ModelName>.eogen icon in the Package Explorer or Navigator. The top section of the editor looks like this:
12 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 -{{info title="Autogenerating"}}
20 -
21 -If you already have an EOModel file that opens in Entity Modeler properly, you can bypass the manual .eogen file creation described below by right-clicking on your EOModel in WOLips and selecting WOLips Tools=>Create EOGenerator File.
22 -
23 -{{/info}}
24 -
25 -Double click on the <ModelName>.eogen icon in the Package Explorer or Navigator:
26 -[[image:eogenIcon.jpg]]
27 -The top section of the editor looks like this:
28 -
29 29  [[image:EOGenerator1.jpg]]
30 30  
31 -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.
32 -
33 -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.
34 -
35 35  [[image:EOGenerator2.jpg]]
36 36  
37 -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.
38 -
39 39  [[image:EOGenerator3.jpg]]
40 -
41 -=== Generate the Classes ===
42 -
43 -==== The Simplest Way is Set it on Automatic ====
44 -
45 -Use the WOLips build preferences to ensure your classes are regenerated every time you save changes to the EOModel
46 -
47 -{{panel}}
48 -
49 -!Picture 16.jpg!
50 -
51 -{{/panel}}
52 -
53 -==== Manual Generation during Development ====
54 -
55 -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.
56 -
57 -==== Troubleshooting ====
58 -
59 -{{note title="EOGenerator Not Running?"}}
60 -
61 -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.
62 -
63 -{{/note}}