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.
- JRE 1.4.0 or above is required to compile and execute this sample.
- The 'HyadesEMFCommonBaseEventv101Sample.event.xml.file' environment variable is set to the sample's configuration template's (HyadesEMFCommonBaseEventv101Sample.event.xml) absolute path and name. For example, <workspace>/HyadesEMFCommonBaseEventv101Sample/config/HyadesEMFCommonBaseEventv101Sample.event.xml, where <workspace> is the absolute path to the workbench's workspace.
To run this sample, follow these steps:
- 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:
- Right-click on HyadesEMFCommonBaseEventv101Project
and select Properties.
- Select Java Build Path from the list in the left pane.
- Under the Libraries tab, select JRE_LIB and click the Remove button.
- Click the Add Library button.
- In the Add Library dialog, select the JRE System Library from the list and click Next.
- Select the Alternate JRE option, and click Installed JREs to add a JRE. The preferences dialog
for Installed Java Runtime Environments opens.
- Click Add.
- On the Add JRE dialog, specify the name and home directory of the JRE 1.4.0. Click OK.
- Click OK.
- Click Finish.
- Click OK in the properties dialog.
- Confirm that all compilation errors have been fixed.
- From the Java perspective, right-click on the project, and select
Run As > Run... to run the sample class.
- In the Run configuration dialog, double-click on Java application. A new configuration
is created.
- Under the Main tab, the project name is pre-filled.
Click Search to find the Main class that should be run.
- In the Choose Main Type dialog, double-click on the HyadesEMFCommonBaseEventv101Sample listed.
The Main class field now has the value
HyadesEMFCommonBaseEventv101Sample.
- Click Run to run the sample.
(C) Copyright IBM Corporation 2000, 2006.