This page gives instructions on how to run AM in the Eclipse SDK. Working in
Eclipse may not be appropriate for all AM users, since there is somewhat of a
learning curve for using Eclipse. But the AM application is rather
straightforward, so this documentation is provided for the interested and the
curious.
- Install Eclipse on your machine if you don't have it already. You can
get version 3.4
from here.
- Install AM::Parallel on your machine if you don't have it already.
Follow the
instructions here.
- Install the Eclipse Perl Integration
IDE plug-in into Eclipse,
following the instructions here. Essentially, all you should have to do
is this:
After starting Eclipse select Help > Software
Updates... from the menu and switch to the
Available Software tab. Click the Add Site...
button and enter:
http://e-p-i-c.sf.net/updates.
- Check that you have EPIC installed correctly. Select Window >
Preferences and you should see "Perl EPIC" in the menu on the left.
- Create a project for each AM task that you run. Select File > New >
Other > Perl > Perl Project. A "New Project" wizard dialog box will
open. Give the project a name in the "Project name:" field. Run the wizard
to completion. You should see the package in the "Package Explorer" panel.
- If you have more than one version of Perl on your machine (some people
do), make sure that Eclipse knows which version's executable file to run.
Set this as follows: Run > Run Configurations... to get the "Create,
Manage, and Run Configurations" dialog box. Select the "(x)= Arguments" tab
and unselect the "Use default working directory" checkbox at the bottom.
Click on "Variables..." and then "Edit Variables". You should see a small
spreadsheet with a line for the Variable "perlExecutable" and the Value with
a pathname to the Perl executable (e.g. c:/Perl/bin/perl.exe). Change that
item if you need to (e.g. c:/Perl/bin/perl5.8.7.exe). Then close up the
dialog box. Make sure you don't accidentally insert items into fields that
you don't want to (e.g. "Working Directory"). Check the "Use default working
directory" box again. Then close up the dialog boxes.
- Select (right-click on) your project in the "Package Explorer" panel and
create a new folder for your Perl command file: File > New... > Folder
and put the name of your AM project (e.g. finnverb) in the field in the
dialog box.
- Inside the AM project folder that you have just created, place your AM
files data and test (and outcomes, if you want one) in
that directory. You may do this by copying them in, downloading them from a
browser, or using Eclipse editing to create them in place.
- Place your AM command file (e.g. finnverb.pl) in your Eclipse project.
Again, you can do this via copying it in, downloading it from elsewhere, or
using Eclipse editing in place. It should have a .pl suffix, and then you
should see a camel icon, signifying that Eclipse recognizes it as a Perl
file.
- To run the file, right-click on your Perl command file (e.g. finnverb.pl)
and select Run As. You should see the option Perl Local;
select that option and AM will be launched.
- No output is currently sent to the Eclipse console (or elsewhere), so
you will need to wait until you think processing is done. When you think it
is, select your Eclipse project and hit the F5 key (Refresh). You should see
the file amcpresults there if you told AM you want an output file. You can
click on the amcpresults file and Eclipse will bring it up in an editor.
Why would you want to do all of this? There are several reasons:
- Eclipse is an IDE, or Integrated Development Environment. It is very
useful in developing applications that integrate different types of
functionality and programming and scripting languages. For example, you can
easily integrate AM into larger programs in Eclipse.
- Eclipse is highly interactive and hence allows for running AM in a much
more user-friendly environment than command lines or windows and icons.
- Eclipse has a very advanced debugging environment, which is supported by
EPIC, so you can very easily debug your AM Perl command file. This is not
very easy otherwise.
- Eclipse has sophisticated coding support, including for Perl scripting.
It colorizes certain types of constructs (e.g. variables, reserved words,
array and hash codes, etc.) so that you can easily visualize the structure
of the code you are developing. It also does some syntax checking so it can
catch some errors you make in your coding.