Developing Plone with Eclipse
This tutorial gives a comprehensive view and advanced tips how to set-up Eclipse and utilize advanced functionality to gain ultimate Plone development productivity with IDE.
- Introduction Plone and its product ecosystem have a massive codebase with thousands of Python, HTML, CSS and Javascript files. Doing developing work in this kind of environment will be cumbersome. Plone developer can make one's life more joyful and productive by using state of the art IDE, Eclipse, with its plentiful plug-ins.
- Setting up Python Instructions for setting up Python interpreter for development work with Eclipse.
- Setting up Eclipse and plug-ins Getting and installing Eclipse and relevant plug-ins for Plone development.
- Setting up the web browser Installing few plug-ins for Firefox makes your web and Plone development easier.
- Eclipse workspace and creating projects Eclipse organizes files to a workspace and projects. Getting everything out of them needs little planning.
- Creating Plone instance Plone instance should be set up in a way that Eclipse and PyDev can find all related Python files and their dependencies. This way we can take advantage of code completion, debug, inspect and other advanced IDE features.
- Creating a new development project and managing it with Subclipse Currently Subclipse expects the project root to be a Subversion branch (trunk) and all project files should belong to this branch. If you want to manage your project files Subclipse and have all Plone Python files accessible in Eclipse, you need to create two separate projects.
- Setting up PYTHONPATH in Eclipse project PyDev uses PYTHONPATH to find Python source files in autocompletion and debugging. You need to set up paths correctly to get everything out from the IDE.
- Creating a Plone site One Zope instance can host several Plone sites. When Plone is set up using buildout it has not any sites created. You need to create one yourself.
- PyDev perspective and Project explorer How to navigate in your Eclipse project
- Running Plone When you are doing development, you need to restart Plone often to make file changes effective. This can easiest be accomplished by launching Plone directly from Eclipse. Alternatively you can use plone.reload product to make Plone reload only the changed files.
- Debugging Plone How to step-through Plone code in Eclipse debugger
- Running unit tests You can run unit tests for your product directly from Eclipse.
- Searching multiple files With large Python codebase, like Plone, you often need to search all the files to find a specific function or definition. Eclipse's internal search function is very flexible and valuable tool here.
- Eclipse shortcuts Eclipse keyboard and menu shortcuts boost your productivity. Here are some useful ones.
- Running buildout and other external commands from IDE If you need to run buildout often, it's recommended to make a shortcut for it.
- Plone specific syntax highlighting How to enable syntax highlighting for Plone specific files. This covers TAL and .dtml.css files.
- The future Some suggestions for the future development.
- IDE compatible launcher script idelauncher.py is a Zope start up script which does not fork or set signal handlers. This should prevent various problems when Zope is run as a child process under an IDE.
All content on one page (useful for printing, presentation mode etc.)
