Skip to content

Developing with Eclipse

ivmartel edited this page Jul 4, 2014 · 10 revisions

We recommend using Eclipse to develop CSnake. Eclipse has plugins for python development (PyDev) that ease the code writing. It also provides Git integration (EGit). Eclipse project settings are available from the source root folder. Before starting, please verify that you have all the prerequisites (see 'Run from source' on the Install And Run page).

Eclipse set up

  • First download Eclipse Classic from http://www.eclipse.org/downloads/,
  • Install the PyDev extensions by typing http://pydev.org/updates in the Help > Install New Software... (selecting only PyDev for Eclipse is sufficient),
  • Load your python interpreter in the preferences (search for python), the Auto Config usually works fine for me,
  • For Eclipse versions prior to Kepler (4.3), install the EGit extensions by typing http://download.eclipse.org/egit/updates in the Help > Install New Software... (selecting only Eclipse EGit is sufficient),

Download the code

  • First set up your SSH settings by adding your signature file in the preferences (search for SSH2),
  • Modify the Git Default Repository folder in the preferences (search for Git) to point to the folder where you want to do the checkout,
  • Under the git view, click on the Clone a Git Repository and add the clone to this view,
  • Paste the url given on the github front page, select the ssh protocol and click Next,
  • Choose a branch and click Next,
  • Verify the settings and click Finish.

You should now see the CSnake tree in the list of repositories. Under the root source folder, you will find a preferences.epf file that you can import. These settings allows us to edit files all the same way (spaces instead of tabs for example).

Set up the python project

  • You can now right click on the Working directory and choose Import Projects,
  • Choose the Import Existing Projects and click Next,
  • Select CSnake and click Finish.

If you go to the Pydev view, you should now see the CSnake project.

Running things

  • We provide at the source root level two *.launch files: CSnake.launch to run CSnake and CSnakeAllTests.launch to run all the tests. Right click on one and select Run As to run them,
  • Tests can also be launched individually when either right clicking on one and select Run As then Python unit-test or press CTRL-F9 when a test is opened.

Back to the Developer Guide.

Clone this wiki locally