Develop the TelCal subsystem with Eclipse IDE

Purpose of this document

Main goal of this document is to explain how to develop the TelCal subsystem with the Eclipse IDE (Interface Development Environment). First paragraphs describe the prerequisites and give some settings to tune Eclipse. Following paragraphs show how to check out the TelCal subsystem and other needed modules. Then last paragraphs explain how to develop, build and execute the generated code.

Go to the brief introduction to the Eclipse platform page to see how to install an Eclipse IDE and needed plug-ins.

operating system version
Linux RH Enterprise 4 kernel 2.6.9-11
program version
ACS 6.0.4
TelCal TELCAL-MONTHLY-2007-03-B
Eclipse SDK 3.3.0
Eclipse CDT plug-in 4.0.0

TelCal prerequisites

First install ACS (Alma Common Software) that provides a software infrastructure common to all partners of the ALMA project.

Then define the almadev directory structure. $HOME/.acs_<ACS version> directories that easily allow to switch between different versions of ACS.

[~] > ls -ld .acs*
lrwxrwxrwx  1 almadev alma   10 Sep 11 14:19 .acs -> .acs-6.0.4
drwxr-xr-x  2 almadev alma 4096 May 24 15:56 .acs-6.0.3
drwxr-xr-x  2 almadev alma 4096 Sep 11 14:20 .acs-6.0.4

$HOME/introot_<TelCal branch> directories that allows to develop on several TelCal branches.

[~] > ls -ld introot*
lrwxrwxrwx   1 almadev alma   32 Sep 10 09:33 introot -> introot_TELCAL-MONTHLY-2007-03-B
drwxr-xr-x  19 almadev alma 4096 Aug  1 10:40 introot_GUI2-2007-06-ITER-21
drwxr-xr-x  19 almadev alma 4096 Sep  6 08:33 introot_SFIASDM-2007-05-B
drwxr-xr-x  19 almadev alma 4096 Mar  1  2007 introot_TELCAL-development-2006-12-B
drwxr-xr-x  19 almadev alma 4096 May  4 11:25 introot_TELCAL-development-2007-03-B
drwxr-xr-x  19 almadev alma 4096 Sep  5 10:49 introot_TELCAL-MONTHLY-2007-03-B

Don't forget to scrap INTROOT directories when you change the ACS version. These directories must be generated using the getTemplateForDirectory command (let see at the end of the install ACS procedure). The developer integration area is defined through the INTROOT environment variable.

 [~] > echo $INTROOT
/diska/home/almadev/introot

To develop TelCal in the Eclipse environment and if Eclipse is well tuned you not need to define the INTROOT environment variable. *** JCR: BE CAREFUL WITH THE PyDev PLUG-IN (the Eclipse PYTHONPATH contains the $INTROOT/lib/python/site-packages directory ...)

Eclipse prerequisites

First install Eclipse (version SDK-3.3.0) for the almadev user. Launch Eclipse and update it from the Update Manager. Follow the The Eclipse Project Updates remote site and install the Eclipse 3.3 patches feature. Then install the following remote sites.

Eclipse feature or plug-in link to the remote site
PyDev http://pydev.sf.net/updates
Eclox http://download.gna.org/eclox/update

Then install the following required plug-ins.

Eclipse settings

The first thing to do before use the Eclipse IDE for TelCal development is to tune some parameters. First login as the almadev user. Then open the Windows -> Preferences menu. It is advised to tune the following parameters.

Eclipse lets you export and import settings as a .epf file. Affected settings are those from the Windows -> Preferences menu. Project settings, opened perspectives, CVS settings, and the like are not included. So far, migrating settings to newer versions of Eclipse has worked well. To export settings open the File -> Export window, choose General -> Preferences and follow instructions. To import settings follow the same way from the File -> Import window.

Checkout without Eclipse

This paragraph explains how to manage with Eclipse a TelCal version checkouted with CVS.

Checkout manually the TelCal subsystem using the cvs program. Go to this paragraph that explains how to do it.

[~/workspace/TELCAL-MONTHLY-2007-03-B] > cvs checkout -f -r TELCAL-MONTHLY-2007-03-B \
> ACS/NO-LGPL/sla ICD TELCAL
...

Now we want to indicate to the Eclipse IDE how to work with this downloaded version of TelCal. Launch Eclipse and choose the directory /home/almadev/workspace/TELCAL-MONTHLY-2007-03-B as the workspace.

Eclipse: open the workspace TELCAL-MONTHLY-2007-03-B

Switch to the Resource perspective. From the File -> New -> Project... menu create the three projects (of type General -> Project) needed for the TelCal environment: ACS, ICD and TELCAL. Be sure to use same names for projects than for corresponding folder's names.

Eclipse: create a new general project Eclipse: add TELCAL as new general project

So Eclipse automatically found the CVS information. The project sla (under ACS/NO-LGPL) must be converted to a C project. Select the ACS project from the C/C++ Projects view. Then from the File -> New -> Other... menu choose C -> Convert to a C/C++ Make Project. Repeat the same steps to convert ICD and TELCAL to C++ projects.

Eclipse: convert ACS to a C project Eclipse: convert ICD and TELCAL to a C++ projects

Projects are automatically connected to the CVS server now. You must enter your CVS password.

Checkout with Eclipse

Create the directory that will contained the wanted workspace of a specific CVS version or branch of TelCal.

[~/workspace] > mkdir TELCAL-MONTHLY-2007-03-B

Launch Eclipse and choose for the workspace the directory /home/almadev/workspace/TELCAL-MONTHLY-2007-03-B.

Eclipse: open the workspace TELCAL-MONTHLY-2007-03-B

Then go to the workbench. Open the CVS Repository Exploring perspective. In the CVS Repositories view add a new Repository Location (right click on the mouse to activate the contextual menu). Write all needed information (host, repository path, user, password and choose pserver for the connection type).

Eclipse: add a CVS repository

The link to the CVS server is now defined. To checkout projects of the TelCal subsystem go to the File -> Import... menu and choose CVS -> Projects from CVS import type.

Eclipse: import projects from CVS

Check Use existing repository location and choose the server CVS you have configured before. Then check Use an existing module. Be careful: some projects appears twice on this window. It is normal because there are folders and CVS modules on the same place. The difference is done regarding icons:

Eclipse: checkout from CVS (1)

It is advised to download folders (a simple folder icon) rather than modules. Then checkout the ACS/NO-LGPL/sla folder. On the next window choose Checkout as a project in the workspace.

Eclipse: checkout from CVS (2)

Click on the Next button and uncheck Use default workspace location and choose the directory /home/almadev/workspace/TELCAL-MONTHLY-2007-03-B/ACS/NO-LGPL/sla (probably you must add manually the ACS/NO-LGPL/sla directory).

Eclipse: checkout from CVS (3)

Click on the Next button and choose the HEAD branch. Finally click on the Finish button.

Repeat the previous steps for the ICD (ALMA-R4_1 branch) and TELCAL (TELCAL-MONTHLY-2007-03-B branch) modules. The only difference is to keep ckecked the Use default workspace location for both projects in this case.

Eclipse: checkout from CVS (4) Eclipse: checkout from CVS (5) Eclipse: checkout from CVS (6) Eclipse: checkout from CVS (7)

Like in the previous paragraph, convert the project sla to a C project. Convert ICD and TELCAL to C++ projects.

Project settings

Open the Windows -> Preferences menu.

For each project sla, ICD and TELCAL tune some properties. Select a project in the Navigator view and open the Project -> Properties dialog box.

Create Make targets

Go to the Make Targets view, right click (contextual menu) on the ICD project and choose Add Make Target. Add the build, clean, install and man targets.

Eclipse: create a new Make target

Repeat previous steps for the sla project creating all, clean and install targets (from the sla/ws/src directory). Repeat previous steps for the TELCAL project creating build, clean, install, man and test targets.

You can verbose a target by using the make MAKE_VERBOSE=on build command instead of the default one (uncheck Use default in the Make target window and enter the new desired command).

Build TelCal

All projects may be built from the Make Targets view. So build the sla project from the all and install targets. The install target installs all needed files in the INTROOT integration directory. Then build ICD (build and install targets). And finally build the TelCal subsystem (build and install targets).

Execute a program

*** JCR: TO BE WRITTEN

online mode: acscommandcenter

offline mode

test programs

Commit a file

In the C/C++ Projects or Navigator right click on the file to commit. Choose Team -> Commit..., enter a comment and click on the Finish button.

Eclipse: commit a file

Useful links

link comment
ALMA / Eclipse (Java) FAQ set up and work with the Eclipse IDE for ALMA development
ALMA / Eclipse (C++) FAQ develop in C++ with the Eclipse IDE for ALMA
ALMA / CVS naming conventions for branches
Eclipse CVS FAQ
Eclipse CDT FAQ