This chapter describes how to set up the UIMA SDK to work with Eclipse. Eclipse (http://www.eclipse.org) is a popular open-source Integrated Development Environment for many things, including Java. The UIMA SDK does not require that you use Eclipse. However, we recommend that you do use Eclipse because some useful UIMA SDK tools run as plug-ins to the Eclipse platform and because the UIMA SDK examples are provided in a form that's easy to import into your Eclipse environment.
If you are not planning on using the UIMA SDK with Eclipse, you may skip this chapter and read Chapter 4, Annotator and Analysis Engine Developer’s Guide next.
This chapter provides instructions for
The UIMA Eclipse plugins are designed to be used with Eclipse version 3.
EMF stands for Eclipse Modeling Framework. It is an add-on to Eclipse, and is used by the UIMA Eclipse tooling. Use the built-in facilities in Eclipse to find and install new features.
Activate the software feature finding by using the menu: help >> Software Updates >> Find and Install. Select "Search for new features to install", push "Next". Specify the update site where EMF is found as a site to search, making sure the "Ignore features not applicable to this environment" box is checked, and push "Finish". You can find out where this site is by going to http://www.eclipse.org and browsing for EMF. In early 2006, the EMF update site was http://download.eclipse.org/tools/emf/updates. If your computer is on an internet connection which uses a proxy server, you can configure Eclipse to know about that. Put your proxy settings into Ecluse using the Eclipse preferences by accessing the menus: Window => Preferences... => Install/Update, and Enable HTTP proxy connection under the Proxy Settings with the information about your proxy.
This will launch a search for updates to Eclipse; it may show a list of update site mirrors – click OK. When it finishes, it shows a list of possible updates in an expandable tree. Expand the tree nodes to find EMF SDK. The specific level may vary from the level shown below as newer versions are released.
Click "Next". Then pick Eclipse Modeling Framework (EMF), and push "Next", accept any licensing agreements, etc., until it finishes the installation. It may say it's an "unsigned feature"; proceed by clicking "Install". If it recommends restarting, you may do that.
This will install EMF, without any extras. (If you want the whole EMF system, including source and documentation, you can pick the "EMF SDK" and the "Examples for Eclipse Modeling Framework".)
If you haven't already done so, please download and install the UIMA SDK from http://www.alphaworks.ibm.com/tech/uima.
In the directory %UIMA_HOME%/eclipsePlugin, you will find a zip file. (The environment variable %UIMA_HOME% is where you installed the UIMA SDK.) Unzip it into your %ECLIPSE_HOME%/eclipse/plugins directory. %ECLIPSE_HOME% is where you installed Eclipse.
If you have Eclipse running, restart it (shut it down, and
start it again) using the clean
option. Start Eclipse by running the command eclipse -clean
(see explanation in the next section) in
the directory where you installed Eclipse. You may want to set up a desktop shortcut at this point for
Eclipse. Eclipse has a bit of a learning
curve. If you plan to make significant
use of Eclipse, check out the tutorial under the help menu. It is well worth the effort. There are also books you can get that
describe Eclipse and its use.
The first time Eclipse starts up it will take a bit longer as it completes its installation. A "welcome" page will come up. After you are through reading the welcome information, click on the arrow in the upper right of the main panel to exit the welcome page and get to the main Eclipse screens.
If you have modified the plugin structure (by copying or unzipping files directly in the file system) in Eclipse 3.x after you started it for the first time, please include the "-clean" parameter in the startup arguments to Eclipse, one time (after any plugin modifications were done). This is needed because Eclipse may not notice the changes you made, otherwise. This parameter forces Eclipse to reexamine all of its plugins at startup and recompute any cached information about them.
Later chapters refer to example code. You can create a special project in Eclipse to hold the examples. Here's how:
C:/Program Files/apache-uima
) in the
"Path" fieldTo verify that you have set up the project correctly, check that there are no error messages in the "Tasks" or "Problems" view.
You can run outside of Eclipse using the shell scripts in the UIMA SDK's bin directory. In addition, many tools can be run from inside Eclipse; examples are the Document Analyzer, CPE Configurator, CAS Visual Debugger, Semantic Search, and JCasGen. The uima_examples project provides Eclipse launch configurations that make this easy to do.
To run these tools from Eclipse:
For instructions on using the Document Analyzer and CPE Configurator, see Chapter 17, Document Analyzer User's Guide, and Chapter 13 . For instructions on using the CAS Visual Debugger and JCasGen, see Chapter 18, CAS Visual Debugger, and Chapter 19, JCasGen User Guide.