Skip to main content
Jump to: navigation, search

Difference between revisions of "STEM Eclipse Setup Old"

m (Installing Features from the Europa Discovery Site)
(update introduction)
Line 1: Line 1:
 
'''[http://wiki.eclipse.org/index.php/STEM STEM Contents Page]'''  
 
'''[http://wiki.eclipse.org/index.php/STEM STEM Contents Page]'''  
 
=STEM Eclipse Setup=
 
=STEM Eclipse Setup=
==Installing the Eclipse SDK on 32 bit Windows==
+
===Introduction===
 
The current STEM codebase is built on Eclipse 3.3 (Europa).  We strongly recommend installing the current build of Eclipse 3.3.  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.
 
The current STEM codebase is built on Eclipse 3.3 (Europa).  We strongly recommend installing the current build of Eclipse 3.3.  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.
  
Line 9: Line 9:
 
In the examples below, we will assume this is Windows XP and use the directory <code>C:\eclipse</code>, but as said you can do otherwise if you like. On Linux this might be <code>/var/eclipse</code>
 
In the examples below, we will assume this is Windows XP and use the directory <code>C:\eclipse</code>, but as said you can do otherwise if you like. On Linux this might be <code>/var/eclipse</code>
  
===Eclipse installation===
+
===Eclipse 3.3 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 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.  
  
Line 33: Line 33:
 
*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!
 
*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 install additional eclipse features necessary for development.
 
*The next step is to install additional eclipse features necessary for development.
 +
 
==Installing Features from the Europa Discovery Site==
 
==Installing Features from the Europa Discovery Site==
 
Many of the additional plugins that are required by STEM are available at the ''Europa Discovery Site'' ]
 
Many of the additional plugins that are required by STEM are available at the ''Europa Discovery Site'' ]

Revision as of 10:17, 4 September 2007

STEM Contents Page

STEM Eclipse Setup

Introduction

The current STEM codebase is built on Eclipse 3.3 (Europa). We strongly recommend installing the current build of Eclipse 3.3. 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.

Eclipse comes as a zip file Eclipse-build-id.zip. 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 unzip'ed 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.3 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 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.3 (Europa) 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 file (e.g.,eclipse-rcp-europa-win32.zip) 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.3 to reflect its version number.
  • Open the directory c:\eclipse\eclipse3.3 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.3\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. We'll use 256 and 512 Megabytes in our example, the default for eclipse is 40 and 256 Megabytes respectively. Use whatever values make sense on your machine.
    • The resulting Target field might be:
C:\eclipse\eclipse3.3\eclipse.exe
 -data c:\stem -vm C:\Progra~1\IBM\Java50\bin\javaw.exe
 -vmargs -Xms256M -Xmx512M
  • 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 install additional eclipse features necessary for development.

Installing Features from the Europa Discovery Site

Many of the additional plugins that are required by STEM are available at the Europa Discovery Site ]

  • Start Eclipse
  • Select Help→Software Updates→Find and Install...
  • Select search for new features to install and click on Next.
  • Select Europa Discovery Site and click on Finish
  • Accept the mirror sites as they are presented or pick one that is closer, then click “OK”
  • In the window labeled “Select the features to install:” expand the tree and select the following:
    • Models and Model Development This is the required EMF (eclipse modeling framework)
    • Graphical Editors and Framework
    • Charting and Reporting
    • See the Screenshot of the Callisto selection.
  • Click "Select Required" to cause all requirements to be resolved.
  • Click “Next”
  • Accept the terms in the license agreement and click “Next”
  • Click "Finish"

The specified features will be downloaded and then you will be prompted to install them.

The next step is to install other optional eclipse plug-ins for project development.

Installing Eclipse Features

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 needed for STEM development

  • When installing Eclipse for the first time:
    • Create the following directory: C:\eclipse\eclipse-contrib\eclipse
    This directory will contain an extension location which will simplify the migration from one version of eclipse to the next by making it simple to reinstall the necessary libraries, features and plug-ins to the new version.
    • Define the new “Extension Location”.
      • Create an empty file at C:\eclipse\eclipse-contrib\eclipse\.eclipseextension This marks that directory as an eclipse extension location.
      • Start Eclipse
      • “Help→Software Updates→Manage Configuration”
      • Right click on “Eclipse SDK” and select “Add→Extension Location”.
      • Select the directory C:\eclipse\eclipse-contrib\eclipse”
      • Click “Yes” when asked to restart eclipse.
    • Define Ant variables eclipse.contrib and eclipse.home2 to point to your eclipse installation folders.
      • Select Windows->preferences->ant->runtime->properties
      • Select add properties
        • Name: eclipse.contrib
        • Value: c:\eclipse\eclipse-contrib\eclipse
      • Also add eclipse.home2
        • Name: eclipse.home2
        • Value: c:\eclipse\eclipse3.3

Now you will be installing new Eclipse components and features into this extension folder. You will then be able to install a new version of Eclipse and simply by specifying the Extension location, you will pick up all of your previous extensions. As you install new features, be sure that you take the option of installing into the Extension location.

Reinstalling Eclipse and optional features

If you followed our instructions for placing optional features into the eclipse-contrib subdirectories, then the reinstallation is very easy.

  • After reinstalling Eclipse as described above:
    • Start Eclipse
    • “Help→Software Updates→Manage Configuration”
    • Right click on “Eclipse SDK” and select “Add→Extension Location”.
    • Select the directory C:\eclipse\eclipse-contrib\eclipse”
    • Click “Yes” when asked to restart eclipse.
    • It should now have reinstalled any features that you previously installed in the eclipse-contrib subdirectories.

There are also some other things that you might need to take care of after reinstalling a new version of Eclipse.

  • Workspace selection
    • Instead of specifing the workspace by the ""data"" parameter on the shortcut, you may specify what workspace you want to use from a startup prompt. If so you will notice that it has forgotten the list of known workspaces. You can edit c:\eclipse\eclpse3.2.0\configuration\.settings\org.eclipse.ui.ide.prefs and copy the values from this file in your old version.
    • It may have not transfered all of your options. You will probably at least have to change the Java compiler version. Go to window->preferences->java->complier and specify 5.0 for Complier compliance level.


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 www.umlet.com) and you'll likely find it at the bottom.

Installing or updating Optional Eclipse Plug-ins

It is very simple to install or update Eclipse plugins.

Most are distributed as zip files.

  • Download the new or updated plugin as a zip file.
  • Verify that the top level directory in the zip file is eclipse/plugins or eclipse/features.
  • Unzip the file into c:\eclipse\eclipse-contrib\.
  • Restart Eclipse.

Other plugins use the Eclipse update facility like Europa which was described earlier and you have hopefully already installed. You can use the Europa instructions as a model for how to install other plugins that use an update site to distribute updates.

Installing Jdraw

Jdraw is a tool for editing icons.

http://www.j-domain.de/homepage.php?page=20

Installing Tomcat web Server as an Eclipse Plugin

Tomcat is a web Server that can either be run external to Eclipse or as an Eclipse plugin. To install it as a plugin, see the following instructions:

http://plato.acadiau.ca/courses/comp/dsilver/2513/EclipseAndTomcatTutorial/

There is also a version of Tomcat embedded inside of Eclipse that is used for the Help system. The following article discusses how to use it within an application.

http://www.eclipsezone.com/eclipse/forums/t62852.html

You will normally use the embedded Tomcat and have no need for the external version.

Back to the top