STEM Eclipse Setup Old

From Eclipsepedia

Revision as of 12:28, 28 July 2011 by (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

STEM Contents Page


STEM Eclipse Setup


The current STEM code-base is built on Eclipse 3.7 (Indigo). We strongly recommend installing the very latest build of Eclipse 3.7 or higher. Note that multiple versions of Eclipse can be installed concurrently. So if you have other projects that require other versions of Eclipse, this is not a problem. We try to stay current with the latest version of Eclipse so if this documentation gets out of data please don't hesitate to try the latest (3.7 or higher).

Eclipse comes as a zip file Eclipse does not come with an installation program, as many Windows application do. Instead all that is needed to install Eclipse is to unzip the contents of the downloaded file. All of the Eclipse application is under the eclipse directory found in the zip file. Where the file is unzipped to is up to you. Internally Eclipse uses relative paths, and path variable to find things, which allows the application itself to be installed anywhere you like.

In the examples below, we will assume this is Windows XP and use the directory C:\eclipse, but as said you can do otherwise if you like. On Linux this might be /var/eclipse

Eclipse 3.7 installation

  • Create the directory C:\eclipse. This will be parent directory for this Eclipse SDK installation and for all later versions of eclipse. It will also be the parent directory for an alternative common installation directory for eclipse features and plug-ins.
  • Create the Eclipse workspace “c:\stem”. The directory "c:\stem" will contain the Eclipse “workspace” for the STEM project. There is nothing special about this directory, you can use c:\workspace or any other that makes sense to you (though don't use the default one in the eclipse installation directory as that will cause problems later when moving up to later versions of eclipse). For consistency, we'll use c:\stem throughout the documentation.

  • Download the latest Eclipse 3.7 (Indigo) release from [1] eclipse downloads and save it in a temporary location (e.g., the desktop). You are given the choice of different levels of Eclipse support. You should select Eclipse for RCP/Plug-in Developers
  • Unzip the latest build file and extract the contents to the sub-directory created previously c:\eclipse. You now have a new subdirectory c:\eclipse\eclipse.
  • Rename the new sub-directory to c:\eclipse\eclipse3.7 to reflect its version number.
  • Open the directory c:\eclipse\eclipse3.7 in the windows explorer, right click on the eclipse.exe icon and create a Windows “short cut”. Drag the short-cut to either the desktop or to the Windows quick launch bar.
  • Right-click on the short-cut icon and edit the “Target” field to specify the Eclipse executable and up to three command line arguments:
    • C:\eclipse\eclipse3.7\eclipse.exe
    • -data <workspace> The directory that is the eclipse “workspace” to use when starting eclipse from this icon. This is where you would point to c:\stem. If you have multiple Eclipse workspaces, then do not specify it here and you will be asked to choose the workspace at startup.
    • -vm <path> The specific Java virtual machine to use to run eclipse when started from this short-cut. This helps to make sure that there no problems arising from confusion over exactly which JVM is being used.
    • -vmargs <args> Arguments to be passed to the JVM to specify such things as the initial and maximum heap sizes to be used by the JVM when running eclipse. The maximum heap size is most important. We'll use 256 and 800 Megabytes in our example, the default for eclipse is 40 and 256 Megabytes respectively which is too small for STEM. Use values make sense on your machine.
    • The resulting Target field might be:
-data c:\stem 
-vm C:\Progra~1\IBM\Java50\bin\javaw.exe 
-showlocation -vmargs -Xmx800M
  • ClickOK when finished with the edits.
  • Click on the eclipse short-cut and you should be greeted by the eclipse welcome page. Congratulations! If not, there could be problems with the Java installation, perhaps you don't have Java installed or it is not the correct version. Open a command line window and type: " java -version" It should report version 1.5 or higher.
  • If you are reinstalling Eclipse, then you may get notified of errors because your workspace uses features that are not yet installed. Don't worry, the next step should fix this!

The next step is to tell the system where you have installed Eclipse so that some required ANT scripts can run correctly. You can do this by either defining the ECLIPSE_HOME system environment variable or by defining the eclipse internal ANT variable eclipse.home2.

  • Define Ant variables eclipse.home2 to point to your eclipse installation folders.
    • Select Windows->preferences->ant->runtime->properties
    • Select add properties
      • Name: eclipse.home2
      • Value: c:\eclipse\eclipse3.7
  • To specify the Java memory size values:
    • Select Windows->preferences->java->Installed JREs
    • Select jdk1.5...
    • Select Edit
    • Enter -Xms256M -Xmx512M for Default VM Arguments:

The next step is to install additional eclipse features necessary for development.

Installing Required (and Optional) Features and Plugins

Many of the additional plugins that are required by STEM are available at the Indigo Discovery Site [2] STEM uses the new Eclipse "Target Platform" feature that makes it easier for users to automatically install required plugins. However, certain plugins must still be installed manually. For example, Eclipse Modeling Framework (EMF) features will build correctly using Target Platform but the EMF editor will not be automatically installed. Users should still use the manual installation instructions below to install

  • EMF
  • The Subclipse SVN plugin (optional) [3]
  • Mylin (optional)

Checking out the STEM Source Code

Check out the STEM sourcecode from SVN. If you are using Subclipse, connect to the repository as shown below.


Configuring SVN to check out the STEM source code.

Using Target Platform

Use to the new Target Platform feature automatically adds to your development environment those additional Eclipse Plugins that are required to make STEM build. After you have installed Eclipse 3.7, open the Eclipse Preferences dialog from the application toolbar. As shown below,

> Plug-in Development > Target Platform
Makes sure to check STEM-Eclipse36
This will build STEM with the correct version of EMF and Java. 
Please Watch the newsgroup as we soon plan to update the EMF build to version 3.7

NOTE: If you change workspace location (the workspace folder) you need to repeat this procedure. Target Platform is a workspace specific property.


Setting the Target Platform.

Manually Installing Features from the Indigo Discovery Site

One of eclipse's outstanding features is its extensiblity by additional features and capabilities by adding plug-ins. We use that ability in this step to add additional features for STEM development. Some optional and (and strongly recommended) features still require that you manually add the plugins.

EMF (required)

  • Start Eclipse
  • Select Help→Install New Software
  • Under Work With select the Indigo Site
  • In the table below expand the tree. We recommend that you install the the following features one at a time.
  • Ensure that the checkbox "Contact all update sites..." is marked to cause all requirements to be resolved. In each case this will allow Eclipse to automatically add any required plugins.
  • Install the Eclipse Modeling Framework (EMF) SDK:
    • Under Modeling select "EMF - Eclipse Modeling Framework SDK".
    • Click “Next”
    • Accept the terms in the license agreement and click “Next”
    • Click "Finish"
    • Restart Eclipse

The Following Required Features are now installed automatically by setting the STEM Target Platform (described above). You no longer need to install these individually 
(although you can still find them on the Indigo site).
1. The Eclipse Business Intelligence and Reporting Tools (BIRT):
2. The Zest Toolkit SDK ("Graphical Editing Framework Zest Visualization Toolkit SDK" (Tip: type "zest" into the filter text box to quickly find it)
3. The Graphical Editing Framework GEF:


By Manually Installing EMF you will be sure your development environment has the EMF Editor.

The next step is to install other optional eclipse plug-ins for project development. Feel free to install other additional Eclipse Extensions you are interested in.

Subclipse (required)

The Subclipse integrates SVN into your environment. You need to install it separately. The steps for installing Subclipse are similar to the steps outlined for EMF above but you need to specify the Subclipse download site as describe in the instructions on the Sublipse plugin site:[4]

Mylin (optional)

 Mylin provides many tool including the Mylin talks list and Mylin connection to Bugzilla

UMLet (optional)

The project uses UML to document its design. There are many UML tools available, some powerful, some simple, some proprietary, some free. We have selected “simple” and “free” as the most appropriate choice for the project. The goal is to quickly enable developers to be able to draw and edit UML class diagrams. The “UMLet” eclipse plug-in does exactly that. For more information on UML see the book UML for Java Programmers (see the Books section of this document for a reference).

This isn't a critical part of the development process unless one is updating the UML diagrams of the EMF models in org.eclipse.ohf.stem.core so you can skip this step if you wish.

The UMLet plug-in does not have an “update site” that eclipse can use to do the installation. This is no problem, we'll download the zip file and create our own local installation site.

  • Download the UMLet zip file The current version is 7
  • Unzip the UMLet zip file to the plugins directory for the Eclipse Extension that you defined earlier. (e.g. \eclipse\eclipse-contrib\eclipse\plugins)
  • Restart Eclipse.
  • Verify the UMLet plug-in has been installed.
    • “Help→Software Updates→Manage Configuration”, the new location will be listed, but since the UMLet plug-in is not a feature it is not listed.
    • “Help→About Eclipse SDK”→Plug-in Details”.
    • Scan the list (the “provider” is and you'll likely find it at the bottom.

Jdraw (optional)

Jdraw is a tool for editing icons.