Eclipse - How to Setup Eclipse in a Shrew Checkout: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
Line 66: Line 66:


===Pointing the Workspace at Shew Using Existing Makefiles===
===Pointing the Workspace at Shew Using Existing Makefiles===
First, create a new workspace if you have an existing one.  You can use:
File > Switch Workspace > Other...
and just create a new directory for the workspace to make the new one.
Next, create a new Project in the workspace.  You will want to create a new Makefile Empty Project to avoid breaking the existing Makefile's!


==Building==
==Building==
==Debugging a Module==
==Debugging a Module==

Revision as of 19:17, 22 April 2010

Eclipse as an IDE for Shew

It can be useful to use an IDE when debugging and developing for Hyrax due to the graphical interface to gdb as well as the extensive searching and code indexing features that Eclipse provides. This document will go through the steps for getting Eclipse set up pointing into a Shrew checkout. We also explain how we set up debug configurations for debugging modules using the besstandalone program.

Downloading Eclipse

Eclipse may be found at http://eclipse.org/downloads/

Download the Eclipse for C/C++ Development (with Mylyn Integration).

If you also plan to do Java development, you can add these bundles in later using the Software Update.

Creating a Workspace In A Shrew Directory

We assume you have a shrew project checked out and built using the standard approach. If not, please follow the steps in the next section.

Getting a Debug Shrew Project

Go to the directory you want the shrew project and do a checkout. For example, to get the fully trunk shrew:

svn co http://scm.opendap.org/svn/trunk/shrew

Note that shrew uses svn externals, so make sure you know which versions you are getting so when you commit you are commiting to the right place!

To check the externals being used, get the property in the shrew directory you checked out:

svn propget svn:externals

which for the trunk shrew returns:

aries@chinchilla$ svn propget svn:externals
^/trunk/libdap src/libdap
^/trunk/bes src/bes
^/trunk/dap-server src/modules/dap-server
^/trunk/freeform_handler src/modules/freeform_handler
^/trunk/fileout_netcdf src/modules/fileout_netcdf
^/trunk/netcdf_handler src/modules/netcdf_handler
^/trunk/hdf4_handler src/modules/hdf4_handler
^/trunk/hdf5_handler src/modules/hdf5_handler
^/trunk/ncml_module src/modules/ncml_module
^/trunk/wcs_gateway_module src/modules/wcs_gateway_module
^/trunk/wcs_module src/modules/wcs_module
^/trunk/olfs src/olfs


Module Development/Debugging

If you plan to debug or develop modules for the BES, we suggest you use:

http://scm.opendap.org/svn/branch/shrew/module_dev_1.6

to start as this will be set to use the trunk versions of the modules but to use the fixed, release versions of libdap and the BES for Hyrax 1.6. This ensures that development doesn't use any new APIs from the libdap or bes trunk versions so that modules may be released incrementally and dynamically work with an existing Hyrax 1.6 installation with no other changes necessary.

Configuring a Debug Build

Since you likely plan to use the shrew project for debugging in Eclipse, you'll want to run the build_hyrax_debug script in order to make sure the configuration for all the subprojects is set up to perform debug builds (i.e. no optimization and full symbol tables). That way Eclipse will be able to find breakpoints and let you view variables in a running debug.

In a bash terminal in the top-level shrew directory, type:

source build_hyrax_debug

This will run autoconf on everything, then configure, then build it. If there are any missing dependencies, make sure to get them until everything builds. This will ensure that all the subprojects are configured properly so that the Eclipse Build command, which simply calls 'make', will succeed in compiling a debug version of the specified project.


Pointing the Workspace at Shew Using Existing Makefiles

First, create a new workspace if you have an existing one. You can use:

File > Switch Workspace > Other...

and just create a new directory for the workspace to make the new one.


Next, create a new Project in the workspace. You will want to create a new Makefile Empty Project to avoid breaking the existing Makefile's!

Building

Debugging a Module