wiki:Dev/Tools

Version 10 (modified by dmartinc, 3 years ago) (diff)

--

Development Tools

IDEs

Most people in the Indico team use Eclipse/PyDev?. There's also a small Emacs community.

Eclipse + PyDev?

Installation and setup

  1. Download Eclipse (JEE is the best option because it comes with Web Tools): http://www.eclipse.org/downloads/
  2. Install PyDev? http://pydev.org/updates by adding this URL in Eclipse>Help>Install New Software: link 'Available Software Sites' and Add... (pydev extensions are included into pydev since version 1.5). Note: if you are having problems under Ubuntu 9.10, such as some Eclipse buttons seeming unresponsive, or the Pydev packages not appearing after you add the pydev.org/updates site, check: http://mou.me.uk/2009/10/31/fixing-eclipse-in-ubuntu-9-10-karmic-koala/ )
  3. Check the boxes for pydev and next, next, next,....
  4. Open PyDev? perspective and Team Synchronize (CVS, Git, etc): Menu Window>Open perspective>Other...
  5. Go to window>preferences and:
    1. go to pydev options> Interpreter - Python > New... (interpreter) and locate/choose your python.exe or python (linux).
    2. change default encoding: go to General>Workspace> Text file encoding (other: utf-8). In this screen you can profit to select "Refresh automatically" which will avoid having to press F5 when adding new files from outside eclipse.
    3. In General > Workspace > New text file line delimiter, change to 'Other > Unix'.
    4. Go to General>Editors>Text Editors and check "Insert spaces for tabs" and "Show line numbers".
    5. Go to Javascript>Code style>Formatter: click new and give a name; in indentantion select "tab policy" as "spaces only".
    6. Go to XML>XML Files>Editor and choose "Indent using spaces" (size 4)
    7. Go to Web>HTML Files>Editor and choose "Indent using spaces" (size 4)
    8. Go to Web>CSS Files>Editor and choose "Indent using spaces" (size 4)
    9. Go to General>Editors>File associations. Add file type *.tpl and add associated editor "HTML Editor". Add file type *.wohl and add associated editor "XML Editor".
    10. Go to General>Editors>Spelling and uncheck "Enable spell checking".
    11. Press ok to close.
  6. Go to PyDev? perspective. Go to File>New>PyDev? project. Write a project name (e.g. "indicodev"), uncheck use default, select the root code folder of your indico (...../cds-indico/) (if you do not have it yet, check it out from the repository), choose the grammar version matching with your python version, uncheck "Create default src folder...." and click Finish.
  7. The whole project will be imported into Eclipse (Team Synch icons might take a while to show up).
  8. Go to project properties: PyDev? - PYTHONPATH and add the project source folders (code and tools) in order to be able to use F3 (jump to definition).
  9. add to .cvsignore all the files that you do not want to commit to CVS.

How to debug with Pydev

See http://pydev.org/manual_adv_remote_debugger.html

Shortcuts

  1. F3: go to definition
  2. ctrl+space: auto-suggest and auto-import if you have pydev extensions.
  3. ctrl+shift+R: open resource (quick search of resources)
  4. ctrl+H: search
  5. F5: udpate
  6. ctrl+F6: swicht between tabs
  7. Select name + F4: Hierarchy view.

And others: http://pydev.org/manual_adv_keybindings.html

Emacs

Git

Git is the version control system that is currently used by Indico. On a UNIX system, getting Git working should be fairly easy. If you're working on Windows, you can still run it (though with 50% awesomeness). See GitAndWindows.

Git4Eclipse

  • Go to Help > Software Updates > Available Software > Add site.
  • Add http://www.jgit.org/updates
  • Now in the tree you should see: http://www.jgit.org/updates
  • Check JUST the option: Eclipse Git Plugin - Release Build.
  • Click Install...and next and accept (license).
  • Restart Eclipse.
  • Clone your git repo (much easier from command line):
    • from Git bash, go to your working folder and do: git clone http://cdsware.cern.ch/repo/cds-indico.git
    • from Eclipse, go to File > New > Pydev Project. Write a project name (e.g. "indico.git"), uncheck use default, select the root code folder of your indico (...../cds-indico), choose the grammar version matching with your python version, uncheck "Create default src folder...." and click Finish.
    • From Pydev Package Explorer view. Right-click on your new project and then Team > Share Project...> Git > your indico.git project > select

TortoiseGit?

Get it at http://code.google.com/p/tortoisegit/downloads/list