Version 12

    The Teiid Designer project is a set of Eclipse-based features and plugins. Therefore, Teiid Designer runs within the Eclipse runtime platform. Teiid Designer can also be developed using the Eclipse IDE. This document describes how to setup an Eclipse IDE for Teiid Designer development, maintainence, and testing.


    First let's get a copy of the latest Teiid Designer source code, then we will get your Eclipse IDE all setup, and lastly we will test Teiid Designer by running it within the IDE.


    Check It Out


    Teiid Designer currently uses Subversion (SVN) for source code management. Follow these steps to check out the latest (trunk) Teiid Designer source code for the first time:


    1. Create directory where you want to put the Teiid Designer code. For example, mkdir ~/projects/teiid-designer.
    2. Create a directory within the directory you created in the previous step. I usually call the directory trunk as that is what SVN calls it. For example, mkdir ~/projects/teiid-designer/trunk.
    3. At a command-line prompt, change directory to the trunk directory. For example, cd ~/projects/teiid-designer/trunk.
    4. Issue one of these commands:

    When you need to work with source code branches, just follow steps 2 through 4 again for the specific branch you will be working with.


    Set Me Up


    If you need to install Eclipse to use as your IDE you can download it here: Eclipse Downloads. Make sure you download a version that has the PDE (Plugin Devellopment Environment) feature.


    After starting up the Eclipse IDE for the first time there a few things we need to do:


    Verify JRE


    In Eclipse preferences, make sure that:

    • the installed JRE should is set to 1.6 (Preferences -> Java -> Installed JREs), and
    • the Java compiler compliance level is set to 1.6 (Preferences -> Java -> Compiler -> Compiler compliance level).


    If you don't have JRE 1.6 you can download one here: Java SE Downloads.


    Teiid Designer Eclipse Preferences


    Make sure you have checked-out the Teiid Designer source code.


    The Teiid Designer Eclipse IDE preferences are stored in the eclipse-preferences.epf file found in the trunk directory we checked out from SVN (see Check It Out). Import this file using File -> Import... -> General -> Preferences. These preferences help ensure we maintain better coding standards and minimize the differences between changes made by committers and previous code versions.


    Target Platform


    The Eclipse Target Platform is used to compile and test the Teiid Designer plug-ins against. This platform consists of the Eclipse runtime binaries for your operating system, any additional Eclipse features, and any required 3rd-party features and plug-ins. In the case of Teiid Designer, these additional Eclipse features are required: the Eclipse Modeling Framework (EMF), Unified Modeling Language 2.0 (UML2), Eclipse Graphical Editing Framework (GEF), Eclipse Data Tools Project (DTP), and the Eclipse Web Tools Platform (WTP).


    One way to create the target platform is to define it manually. Manually creating the target platform requires you to install another Eclipse and install in that version all the required features and plugins needed. An alternative to manually creating the target platform is to use a target definition file from the JBoss Tools (JBT) project. The JBT target definition already has the correct version of the Eclipse runtime and all the required additional features and plug-ins to match the release or product Teiid Designer is being developed for.


    Target Definition File Target Platform Setup (recommended)


    Eclipse documentation states that "A target definition file specifies all aspects of a target - including its location, constituent plug-ins and environment." JBoss Tools, the parent project of Teiid Designer, contains several target platform definition files that it uses to perform the various builds of products and releases. These target definition files are found in the JBoss Tools source code repository. Using one of these target definition files as your Teiid Designer target platform ensures the target platform you are developing and testing against, agrees with the target platform JBoss Tools is going to use. To use a JBoss Tools target platform definition file, follow these steps:


    1. Create directory where you want to put the JBoss Tools code. For example, mkdir ~/projects/jboss-tools/trunk/build.
    2. At a command-line prompt, change directory to the trunk directory. For example, cd ~/projects/jboss-tools/trunk/build.
    3. Issue one of these commands:
    4. Back in your Eclipse IDE, import the JBoss Tools "jboss-trunk-build" project into your workspace by selecting File -> Import... -> Existing projects into workspace and selecting the single project located in the directory from step 1.
    5. The target definition files are located in the "jboss-trunk-build" project under the "target-platform" directory.
    6. In Preferences -> Plug-in Development -> Target Platform select the appropriate target platform. The "" file is a good one to use.


    Manual Target Platform Setup (not recommended)


    It is recommended that you use a JBoss Tools target definition file to setup your target platform.


    To create a target platform manually, use the following steps:

    1. Download and install the Eclipse IDE for Java EE Developers in the directory of your choosing. For instance, mkdir ~/target-platforms/eclipse3.7.2. Yes this is a different installation of Eclipse than the one installed earlier.
    2. Run this new installation of Eclipse and select Help -> Install New Software.
    3. Select (replace "indigo" with the release name of the target platform Eclipse runtime) n the Work with: drop-down.
    4. Under Database Development select both "Extender SDK's."
    5. Under Modeling select the following:
      a) EMF - Eclipse Modeling Framework SDK
      b) Graphical Editing Framework GEF SDK
      c) UML2 Extender SDK
      d) XSD - XML Schema Definition SDK
    6. Under Web, XML, Java EE and OSGi Development select the following:
      a) Eclipse Jave Web Developer Tools
      b) JavaScript Development Tools
      c) JST Server UI
      d) WST Server Adapters
    7. Click Next -> Next, accept the licensing terms, and click Next -> Finish to finish the Install wizard.
    8. When prompted, restart Eclipse so that all these new plugins will be installed.
    9. Now, exit this version of Eclipse.
    10. Back in your Eclipse IDE, select Preferences -> Plug-in Development -> Target Platform and click Add... to create a new target definition.
    11. Choose Nothing: Start with an empty target definition in the New Target Definition wizard and click Next >.
    12. On the Locations tab, click Add..., select Directory, then Next >, and browse to the directory of where you installed the target platform Eclipse in the first step. If you selected the correct directory (where the command to run Eclipse is located), then all this target platform's will load and show.
    13. Click Finish and select this new target platform as the active/default target platform.


    Install SVN Eclipse Components


    Teiid Designer uses Subversion (SVN) as its source code management system. In order to work with SVN from within the IDE you must install the SVN plugins and create the SVN source code repositories. Here are the steps:


    1. Install the SVN plugins by running Help -> Install New Software.
    2. Select (replace "indigo" with the release name of the Eclipse runtime) n the Work with: drop-down.
    3. Under Collaboration select Subversive SVN Team Provider and Subversive JDT Ignore Extensions.
    4. Click Next -> Next, accept licensing terms, and click Next -> Finish to finish the Install wizard.
    5. When prompted, restart your Eclipse IDE.
    6. When Eclipse restarts you might be asked to select an SVNKit. Select the latest, compatible one for the target platform.
    7. In Eclipse, open the SVN repositories view by running Window -> Show View -> Other -> SVN -> SVN Repositories.
    8. Create a new repository by using one of these URLs:

    Import Projects


    Make sure you have setup your Teiid Designer SVN repository before importing the Teiid Designer projects.


    Once you've checked out Teiid Designer source code, you are ready to import those projects. Follow these steps to get the Teiid Designer projects into your Eclipse workspace:


    1. Run File -> Import... -> Existing projects into workspace.
    2. Select the root directory where you have put the projects. For example, ~/projects/teiid-designer/trunk.
    3. The Projects list should be filled up. Deselect any projects that are found in the "depcrecated" directory and press Finish to get all of the projects into your Eclipse workspace.
    4. Perform a full build of all projects if you need to.

    If you ever update or checkout files from the command-line you will need to Refresh your Eclipse workspace.


    Running Teiid Designer From the IDE

    Under Run -> Run Configurations ..., you will find predefined launch configurations for the different platforms (Mac, Linux, and Windows). Select the appropriate launcher and Run. Once Eclipse starts, there will be a Designer perspective available to open.