Changes for page EOGenerator
Last modified by David Avendasora on 2011/08/25 00:02
From version 63.1
edited by Pascal Robert
on 2007/12/21 20:44
on 2007/12/21 20:44
Change comment:
There is no comment for this version
To version 65.1
edited by Johan Henselmans
on 2008/01/17 15:14
on 2008/01/17 15:14
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. probert1 +XWiki.johanhenselmans - Content
-
... ... @@ -15,6 +15,42 @@ 15 15 16 16 === Tutorial === 17 17 18 +There are two ways: create eclipse-wide settings, or create settings per project. 19 + 20 +==== settings for eclipse ==== 21 + 22 +~1. Download the templates that Mike Schrag made from [[http://webobjects.mdimension.com/wolips/EOGenerator/Velocity%20EOGenerator%20Templates/]] 23 + 24 +and place them in a folder. In my case that was in 25 + 26 +[[ApplicationsDevelopingVelocityEOGeneratorTemplates]] 27 + 28 +2. Go to Preferences > WOLips > EOGenerator 29 + 30 +In EOGenerator Template Folder, fill in the folder you have placed the templates 31 +In EOGenerator Java Template fill in Entity.java 32 +In EOGenerator Subclass Java Template fill in Entity.java 33 + 34 +This is how it looks in my settings: 35 + 36 +3. Go to the eomodel from which you want to create classes and subclasses in the WOPackage sidebar of Eclipse 37 + 38 +4. Right click and choose WOLips Tools > Create EOGenerator File from the contextual menu, (it's a submenu) 39 + 40 +Now a eogen file is created which has the name of the EOModel and an .eogen extension. 41 +If there is already an eogen file, then another one will be created, with a number between the EOModel name and the extension. 42 +The one with the highest number will be the newest (unless you decided to throw earlier ones away, then the numbering starts all over again). 43 + 44 +5. Go to the eogen file, right click and choose EOGenerate... from the contextual menu. 45 + 46 +If you have some definitions in your EOModel that have a Class Name that is not an EOGenericRecord, then the appropriate java class and subclass will be generated. 47 + 48 +For instance: a Person class name in EOModel will result in a //Person.java file (which will be overwritten the next time EOGeneration will take place) and a Person.java file. The java file without the underscore is the file that will not be overwritten the next time. This file is the file that you would add your own methods. The next time the model changes, the //underscore.java file will be overwritten, but your methods are safe. 49 + 50 +6. Check if everything worked out fine. If not (e.g. you made a typing error and a java file happens to be empty) throw away the generated file yo do not want, and restart the process. 51 + 52 +==== settings per project ==== 53 + 18 18 ~1. Under Preferences > WOLips > EOGenerator 19 19 ~> Remove all entries (this is not strictly necessary, but it rules out any errors at the project level) 20 20