Using EOGenerator with WOLips/Eclipse 3.0

I use EOGenerator extensively when working with WebObjects. In WOLips/Eclipse 2.0 I had a GenerateEOs task in my build.xml file (I copied it from a post by Chuck Hill to the WOProject mail list). Unfortunately, it no longer works in WOLips/Eclipse 3.0. There is a WOGen Ant task that should be able to duplicate what EOGenerator does, but well, I’m just stuck in my ways.

As suggested on the WOProject list, I configured EOGenerator to run as a Builder for my project using the following steps:

  1. Select the appropriate Project/Framework in the Eclipse Package Explorer
  2. Select Properties from the Project menu and then select Builders
  3. Click the New button
  4. Configure the fields in the the window as follows:
    • Name: EOGenerator
    • Location: /Developer/Applications/eogenerator/eogenerator
    • Arguments: (shown on separate lines for clarity only)
      • -model ${project_loc}/superduperproject.eomodeld
      • -destination ${project_loc}/src/ca/codebase/substrate/
      • -subclassDestination ${project_loc}/src/ca/codebase/substrate/
      • -templatedir /Developer/Applications/eogenerator/
      • -javaTemplate CBJavaSourceEOF5.eotemplate
      • -subclassJavaTemplate CBJavaSubclassSourceEOF5.eotemplate
      • -define-copyrightYear “2003 – 2004”
      • -define-copyrightBy “Codebase Software Systems”
      • -verbose
      • -java
  5. Click Apply

Notes:

  1. ${project_loc} is an Eclipse variable (it contains the path to the project).
  2. I keep eogenerator and it’s templates in a folder in /Developer/Applications/ and my EO’s are in the ca.codebase.substrate package, change the paths above to reflect your environment.
  3. In Build Options for the Builder, select when you want to Run the builder. I find the defaults (After a “Clean” and During Manual Builds) are fine for my needs.