wiki:ChimeraEclipse

Eclipse for Chimera Development

These notes used the Ubuntu 10.04 package for eclipse, which provided: Eclipse SDK 3.5.2 (Build id: M20100211-1343). See the eclipse site for other downloads.

Eclipse Plugins

The PyDev plugin was installed, using the Eclipse: Help > Install New Software utility, by adding the http://pydev.org/updates site.

For a tour of using PyDev with Eclipse, see Ron Smith (2004), Python development with Eclipse and Ant.

For a couple of useful vi emulations in eclipse, see viplugin, vrapper, and vimplugin. Another alternative is eclim.

Install the Mylyn plugin for task-focused programming, which can integrate with Trac. For an overview of why you can benefit from Mylyn, see the Mylyn 3.0 webcast (about 45 mins). Add the Mylyn plugin to eclipse, including all the 'connectors' (especially the Trac connector). Then add a 'new task repository' with the following settings:

For anonymous access, change the server protocol to http rather than https.

Add the Subversive or the Subclipse plugins for subversion access. See the FAQ for details on how to configure it for an svn+ssh access to the Chimera svn server (e.g., I had to change preferences to use SVNKit instead of the javaHL client).

To install the javaHL library for eclipse and subclipse on Ubuntu, try:

$ sudo apt-get install libsvn-java

Configure PyDev Preferences

Create a new workspace (e.g., Eclipse - File > Switch Workspace > Other) for the new Chimera workspace settings. Then use Window > Preferences to locate the PyDev panels to setup the "Interpreter - Python" to use the Chimera python2.7 interpreter (be sure to manually add $CHIMERA/share and $CHIMERA/lib to the "system PYTHONPATH" configuration). Then set some Chimera environment variables (the $PATH and $CHIMERA syntax did not work, so these environment settings use full paths; the paths must point to hard-links in the file system, Chimera doesn't work with symbolic-links). Finally, an optional addition is to create a VirtualEnv for Chimera and add the pylint package, then configure the pylint preferences. It should be configured now to enable importing Chimera modules and running Chimera.

Also see this neat step-by-step configuration. Note especially the section on creating a new project and selecting the language version (Chimera is using python 2.7, as of Sep 2010) and the interpreter (don't use the default, use the Chimera python install).

Click on these thumbnails for the larger views:

  • chimera-pydev-python2.7 : python2.7 configuration
  • chimera-pydev-env : environment configuration
  • chimera-pydev-pylint : pylint configuration
  • chimera-pydev-run : run configuration

Runtime debugging

Note: this does not address problems with debugging a Tkinter mainloop.

The PyDev plugin for eclipse has facilities for remote debugging of an active process. To use this facility, startup Chimera as usual and launch the IDLE shell. Startup eclipse and activate the PyDev debug perspective. Activate the PyDev [remote debugging server. Using a terminal or file browser, locate the pydevd.py file in your eclipse installation (somewhere in the eclipse plugins; e.g. in a linux terminal try: locate pydevd.py). Then, within IDLE, enter the following to enable remote debugging within the eclipse debug perspective:

#pydevd_path="<eclipse plugins path to file: pydevd.py>"
import sys
sys.path.append(pydevd_path)
import pydevd
pydevd.settrace()

In the eclipse console, try print "Hello there!" and see if it appears in the IDLE shell. If it does, your hooked into Chimera from eclipse and you have access to the object inspection features of the PyDev debugger.

Last modified 15 years ago Last modified on Jan 12, 2011, 1:58:27 PM

Attachments (4)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.