• ..

    Red is meant to change for your own projects.

    Set up the Eclipse IDE for team development

    I use the following shell script to batch the installation of Eclipse:
  • http://www.cs.toronto.edu/~yijun/tutorial/eclipse-install.sh

    There is already a native Eclipse for Gtk available, which requires rather recent packages from RedHat (it was tested on Redhat 9.0)

    Eclipse has several perspectives, what we need are Resource, Debugging, CDT and CVS perspectives.

    Create a CVS repository location:

    Open the "CVS" Perspective, right click at the "CVS Repositories" view, choose "New/Repositories Location".

    Enter the following information in the dialog:

  • Host, e.g., either a domain name or an IP address epicmp.elis.rug.ac.be
  • Repository path, e.g., the absolute path to the CVS repository /sfroot/cvs/fpt
  • Authentication, the username and password
  • Connection, "pserver" does not work very well, for some reason that the /root/.cvsignore is not accessible. I use extssh.
  • Finish.

    Expand the repository as if a directory tree. Take a look at the HEAD category, which is the latest source code.

    Create a project locally from the CVS repository

    Expand HEAD, you will find project directory. We can right click on project and choose "Check Out As...", name it as fpt-1.2 for example. Then the project files will be downloaded into your workspace in the resource perspective.

    Change the project properties

    Open the "Resource" perspective, in the "Navigator" view, right click at the project name fpt-1.2, choose "properties". In the dialog, filling "C/C++ project" property as "Stop On Error". "CVS" property as "Enable watch/edit for this project".

    Tips

  • You may click at Window/Perferences/Workbench/General to choose "Single click" as the Open mode. That can save some mouse clicks;
  • You may check the "C/C++ Editor" preference with "show line number" to view source code with line numbers;

    Build the project

    The build will be invoked by any save action or the "Project/Rebuild" menu. At the end of the build, a binary fpt.exe will be output under i686 directory.

    Actually the build is invoking the "all" target of the Makefile at the root folder. You can change the behavior of build by simply modifying the Makefile.

    Run a program

    You can configure the program run by modify the settings. It is advised to use "External Tools" to run a compiled program. Debugging works not as quick as "ddd".

    An example scenario is to add a tool to remove gotos in fortran programs.

    In the "Resource" perspective, click at unittest/edh21082003.f, "Run" menu / "External tools" / "External tools..." In the dialog, "New" a program / name the program as FPT remove gotos In "Main" tab, enter "Location" as ${workspace_loc:/fpt-1.2/i686/fpt.exe}, "Working directory" as ${container_loc}, "Arguments" as "-b -H ${resource_name}$. In "Refresh" tab, choose "Refresh resources after running tool". In "Common" tab, assign "Display in favorite menu" as External tools. Click at "Run". The restructured code will appear as edh21082003-par.f. Next time to run the same program on edh22082003.f is as simple as click at the new external tool once.

    Commit your changes

    Once you made some change to the program and remember to commit the code into the CVS repository. 1) Right click at the modified code, click "Team" / "Commit". Sometimes it takes long time to commit a generate file, therefore it is suggested to use ".cvsignore" to avoid it. However, a change of .cvsignore seems take effect after itself is uploaded, therefore I wrote a small script to remove the unwanted local files before committing the project: clean.sh . 2) In the dialog enter a few words about the changes. 3) Remember to add "$Id$" and "$Log$" into the source code so it may be traced back for the reason of changes.

    AspectJ IDE installation

    Installation - From Live Update Site To install Start Eclipse, and from the Help menu choose "Software Updates" -> "Update Manager" In the "Feature Updates" view that opens, select "New -> Site Bookmark..." form the context menu of the "Sites to Visit" node. In the dialog that appears enter a name, "AJDT Update Site", and the URL: "http://download.eclipse.org/technology/ajdt/update". Click Finish Expand the AJDT Update Site node that appears, and click on "Eclipse AspectJ 1.1.3" node under "AspectJ" In the preview pane, click either "Install" for a new installation, or "Update Now" if updating. Step through the installation dialog that appears to complete installation. Follow the post-installation instructions in the welcome page that appears (we hope to automate/eliminate this step in a future release) Other update sites:
  • CDT/CppUnit http://download.eclipse.org/tools/cdt/updates/release
  • Antlr http://antlreclipse.sourceforge.net/updates