Working with the EMF Common Base Event v1.0.1 sample

This sample demonstrates creating and configuring Common Base Events. Users experience creating and configuring a Common Base Event using the Common Base Event XML file template Event Factory and logs the newly created Common Base Event to the console.

The contents of the sample Java source code need to be obtained from CVS and stored in org.eclipse.tptp.platform.examples_<version>.jar with a path of archive\HyadesEMFCommonBaseEventv101Sample. The plugin.xml contents of org.eclipse.tptp.platform.examples_<version>.jar should be updated to include the relevant extension and extension points from plugin.xml revision 1.3 in CVS. The dependencies and configuration file necessary to create and configure a Common Base Event are included.

If you have not already done so, create the example by File > New > Example... >Logging > EMF Common Base Event v1.0.1 Sample.

To run this sample, follow these steps:

  1. If the workbench's default JRE is not 1.4.0 or above, modify the newly created Java project to compile and execute using JRE 1.4.0 or above. To add the JRE 1.4.0 to the Java Build Path:
    1. Right-click on HyadesEMFCommonBaseEventv101Project and select Properties.
    2. Select Java Build Path from the list in the left pane.
    3. Under the Libraries tab, select JRE_LIB and click the Remove button.
    4. Click the Add Library button.
    5. In the Add Library dialog, select the JRE System Library from the list and click Next.
    6. Select the Alternate JRE option, and click Installed JREs to add a JRE. The preferences dialog for Installed Java Runtime Environments opens.
    7. Click Add.
    8. On the Add JRE dialog, specify the name and home directory of the JRE 1.4.0. Click OK.
    9. Click OK.
    10. Click Finish.
    11. Click OK in the properties dialog.
  2. Confirm that all compilation errors have been fixed.
  3. From the Java perspective, right-click on the project, and select Run As > Run... to run the sample class.
  4. In the Run configuration dialog, double-click on Java application. A new configuration is created.
  5. Under the Main tab, the project name is pre-filled. Click Search to find the Main class that should be run.
  6. In the Choose Main Type dialog, double-click on the HyadesEMFCommonBaseEventv101Sample listed. The Main class field now has the value HyadesEMFCommonBaseEventv101Sample.
  7. Click Run to run the sample.