用于eclipse开发的plone插件
collective.eclipsescripts的Python项目详细描述
内容
Introduction
eclipsedescripts是一个用于plone开发的eclipse集成插件。 它旨在为新手开发人员提供开始使用plone的有效途径。
Features
从buildout安装创建eclipse工作区-src/文件夹结构中的所有python项目 转换为eclipse项目。您可以使用一个 命令。
设置适合plone/zope开发的eclipse首选项
- Tab stops to 8 spaces
- File associations: .pt, .dtml, .zcml, etc.
- Version control ignores (do not commit egg-info folders)
- Text encoding settings to UTF-8
会自动创建不同的用户界面运行快捷方式
- IDE compatible Zope launching script (retains console output by not making Zope to fork on start-up)
- Plone local instance
- Unit test runners for all projects
- Run buildout
- Open Zope debug shell
- Edit buildout.cfg
Prerequirements
在处理此脚本之前需要了解的内容
基本的plone开发和eclipse使用知识
- What is buildout and buildout folder structure
- How to use Eclipse IDE
Installation
note:目前我们不支持作为python egg或eclipse插件包安装。这正在解决中。
使用pydev和subclipse插件安装Aptana Studio。独立Aptana安装 建议使用,因为这是最快的入门方法-您不需要手动收集和安装插件。
- Standard Eclipse standalone installation seems to have some componenent version compatibility issues. Aptana is recommended way to install Eclipse for Python development.
安装Python Monkey并重新启动eclipse
将subclipse/subversive作为一个项目签出到eclipse工作区
- Repository URL: https://svn.plone.org/svn/collective
- Project path: collective.eclipsescripts/trunk
- Alternatively copy Python egg contents to script/ folders under some of your Eclipse projects
立即菜单scripts应出现在顶部菜单栏中
在python编辑器中打开脚本以查看它们所做的注释
通过选择然后从scriptsmenubar执行脚本
打开控制台以查看可能的脚本输出
- Choose menu Window -> Show View -> Console. Then choose Eclipse Monkey Console from alternative console views. Note: console might not be available until you have run one of the scripts.
Usage
创建plone 3构建-使用您最喜欢的构建集成工具来管理src/下的源代码签出。 例如,“开发者先生”http://pypi.python.org/pypi/mr.developer>;`
启动eclipse-switch workspace并选择buildout中的src/folder作为工作区位置
在首选项中配置Python2.4(对于plone 3.x)
设置工作区设置-选择scripts->;plone->;set plone preferences
选择scripts->;plone->;import src folder as workspace导入所有签出的项目 在src/as eclipse项目下。如果添加新项目,则可以运行此命令而不丢失 对项目进行手动更改。
- Plone instance and projects will have launchers created in Run configurations… menu
- Optionally, if you are using collective.recipe.omelette all Plone packages are added under PyDev builders and code autocompletion will work for the projects
如果要编辑buildout.cfg,请选择scripts->;plone->;edit buildout.cfg
How it works
Python Monkey exposeseclipse进程到python脚本环境 通过Jython run-time。 eclipse插件和java开发所能做的一切现在都可以用几行python代码来完成。 这使得为eclipse开发集成选项变得非常快速和肮脏。
另外,脚本不需要单独的eclipse项目。你可以保留你的剧本 在scripts顶层文件夹中的任何eclipse项目中。
Possible future features
- 作为真正的eclipse插件部署
- 粘贴器集成:直接从IDE添加视图、内容类型
- 部署集成