Applied (modified version of) patch from #3049 to add PyDev support for

Eclipse projects.
This commit is contained in:
Brian Gerkey 2010-10-08 18:48:01 +00:00
parent 39f899f141
commit 2544bd8416
2 changed files with 27 additions and 0 deletions

View File

@ -49,6 +49,7 @@ eclipse-project:
mv .project .project-cmake
awk -f $(shell rospack find mk)/eclipse.awk .project-cmake > .project
rm .project-cmake
python $(shell rospack find mk)/make_pydev_project.py
include $(shell rospack find mk)/buildtest.mk

View File

@ -0,0 +1,26 @@
#!/usr/bin/python
import sys
import os
PKG = os.path.split(os.getcwd())[1]
print "Creating pydev project for package '%s'"%PKG
import roslib; roslib.load_manifest(PKG)
pathlist = "\n".join(["<path>%s</path>"%path for path in sys.path if os.path.exists(path)])
pydev_project= '''<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
<pydev_pathproperty name="org.python.pydev.PROJECT_EXTERNAL_SOURCE_PATH">
%s
</pydev_pathproperty>
</pydev_project>
'''%pathlist
print "Writing .pydevproject, adding %d modules"%len(sys.path)
f = open(".pydevproject","w")
f.write(pydev_project)
f.close()