Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. right-click on Project, click "Add/Remove Bytecode Enhancer"
  2. in the Enable OpenJPA dialog which will be shown: (TBD: Attach screenshot here, once ugly OPENJPA-1521 is resolved?)
    1. choose if OpenJPA libraries should be added to project, this will copy the OpenJPA JARs from the Eclipse plug-in into a lib directory of the Java project, and add them as Referenced Libraries. (In a normal existing project you'll already have them via Maven or otherwise, but for whatever so you'll not use / want to deactivate this; for new or test projects this is convenient.)
    2. choose enhancement options, if you need any. These are the same options as the CLI PCEnhancer supports.
  3. menu Project > Properties (or right-click on Project > Properties) should now show the "OpenJPA PC-Enhancer Project Builder" added after the usual "Java Builder"
  4. when Eclipse builds (compiles) the project, classes will now be byte-code enhanced

...

  • persistence.xml is ignored, the plug-in / builder only looks for annotations annotations (@Entity, @MappedSuperclass, @Embeddable, @ManagedInterface) to decide if a class actually needs enhancement
  • any error markers (the lines shown in the Problems view) are on the .class resource, instead of on the source .java class, which would be more convenient
  • the Builder runs even on classes which are red and compilation issues, because the Eclipse compiler still tries to produce a .class file, and may log weird error messages in that case

...