Using the Web material

 < Day Day Up > 



The additional Web material that accompanies this redbook includes the following files:

File name

Description

sg246302.zip

Zipped Code Samples

System requirements for downloading the Web material

The following system configuration is recommended:

Hard disk space:

15 MB minimum

Operating System:

Windows

Processor:

1Ghz or higher

Memory:

1GB or higher

How to use the Web material

Unzip the contents of the Web material zip files into the plug-in folder of your Eclipse SDK. The material is organized around the chapters and sections of our redbook, and the source code can be imported into your Eclipse SDK as an existing project.

The additional material is organized by chapter and sections within a chapter. Most of the material is in the form of Eclipse projects that you can import into your Eclipse workbench. After you unzip the sg246302.zip file, you will have four main folders created:

  1. emf-examples:

    This folder contains Eclipse projects for the examples described in Chapter 2, "EMF examples" on page 29.

    Each major section of Chapter 2, "EMF examples" on page 29 has a matching Eclipse project. The projects are cumulative and they also depend on your having completed the modelling and code generation described in Chapter 1, "Introduction to EMF" on page 3. You will need to make sure that you have created the Java build path variables described in 1.3.9, "Compiling the code" on page 27, otherwise you may get classpath errors when importing the sample projects.

  2. gef-intro:

    This folder contains Eclipse projects for the examples described in Chapter 3, "Introduction to GEF" on page 87. If you import the sample projects you will need to set up the Eclipse environment as described in "Eclipse Classpath settings for sample projects" on page 227.

  3. emf-with-gef:

    This folder contains Eclipse projects for the examples described in Chapter 5, "Using GEF with EMF" on page 165.

    Each major section of Chapter 5, "Using GEF with EMF" on page 165 has a matching Eclipse project. Also be sure to import the appropriate model project for the editor project you want to work with. For example, to work with the NetworkEditor project, you must also import the NetworkEditorModel project.

    Some of the sample projects in this chapter also expect that you have the SAL330RWorkflowModel project in your workspace. You may have created this project by working through the examples described in Chapter 1, "Introduction to EMF" on page 3, or you can import this from our redbook sample material. If you import the SAL330RWorkflowModel project, you will need to set up the Eclipse environment as described in "Eclipse Classpath settings for sample projects" on page 227. If you create the SAL330RWorkflowModel project, you will need to make sure that you have created the Java build path variables described in 1.3.9, "Compiling the code" on page 27, otherwise you may get classpath errors when importing the sample projects.

  4. sample-application:

    This folder contains code for the sample application described in Chapter 7, "Implementing the sample" on page 203. We provide two zip files:

    • workflow-sample-plugins-1.0.0.zip:

      This is our redbook sample application packaged as a plug-in for install in Eclipse. To us this plug-in, unzip the archive to the directory where you installed Eclipse. You can then experiment with the functions of our sample workflow editor by create a new file resource with a .workflow extension.

    • workflow-sample-src-1.0.0.zip:

      This is the zipped source code for our redbook sample application. When you unzip this archive, two Eclipse project folders are created with projects that can be imported into Eclipse: SAL330RGEFDemoApplication, which is the sample editor code; and SAL330RWorkflowModel, which is the associated workflow model used by our redbook sample editor. If you import the sample projects, you will need to set up the Eclipse environment as described in "Eclipse Classpath settings for sample projects" on page 227.

Eclipse Classpath settings for sample projects

When you add our redbook sample application to your Eclipse workbench you need to make sure that all the required plug-ins can be found. There are two alternate ways to set up your environment to do this:

  1. Import external features and plug-ins:

    1. Set up your workspace with plugins as the last folder.

      For example, use d:\sampleapp\plugins

    2. Start Eclipse.

    3. Choose File -> Import.

    4. Check External Features and click Next.

    5. Accept the default Choose from features in run-time workbench and click Next.

    6. Select the features you need to import, including:

      • org.eclipse.platform

      • org.eclipse.platform.win32

      • org.eclipse.jdt

      • org.eclipse.emf

      • org.eclipse.gef

    7. Click Finish.

    8. Import any missing plug-ins by choosing File -> Import... -> External Plug-ins and Fragments.

    9. Make sure to choose Copy plug-in contents into workspace location.

    10. Select all the required plug-ins and click Finish.

      Note 

      The tasks view will list all plug-ins that are missing from the required classpath of the sample project you import.

  2. Configure the target platform:

    1. Workspace folder has no special naming requirement.

    2. Start Eclipse.

    3. Choose Window -> Preferences.

    4. Choose Plug-in Development -> Target Platform.

    5. Select this application and click either Not In Workspace or Select All.

    6. Click OK.

    7. Select the plugin.xml file of the imported sample project, right-click and choose Update Classpath.

    8. Select all the plug-ins that need their classpath updated.

    9. Click Finish.



 < Day Day Up > 



Eclipse Development using the Graphical Editing Framework and the Eclipse Modeling Framework
Eclipse Development Using the Graphical Editing Framework And the Eclipse Modeling Framework
ISBN: 0738453161
EAN: 2147483647
Year: 2004
Pages: 70
Authors: IBM Redbooks

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net