I'm developing QGIS plugins using PyDev in Aptana Studio 3 and I would like to know if it's possible to make it aware of the QGIS API and add some "intellisense" functionnalities when programming. For example, I would like to see the available methods of an object when typing the dot "." after it...
UPDATE: I also see this message:
module not in pythonpath
When Hovering any QGIS object in code... Is it supposed to show me something more usefull?
Thanks a lot
Etienne
Answer
You can for Aptana Studio (and I guess PyDev is the same):
I start Aptana with this script:
@ECHO OFF
set OSGEO4W_ROOT=C:\OSGeo4W
set PATH=%OSGEO4W_ROOT%\bin;%OSGEO4W_ROOT%\apps\qgis-dev\bin;%PATH%
SET PYTHONHOME=%OSGEO4W_ROOT%\apps\Python27
set PYTHONPATH=%OSGEO4W_ROOT%\apps\qgis-dev\python
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT%\apps\qgis-dev\
call "C:\Program Files (x86)\Aptana Studio 3\studio3.bat" %*
In order for it to find my OSGeo4W Python, PyQt4, pyqgis libs.
QGIS Dev (soon to be 2.0) ships with pregenerated API files that Aptana use (See image 1):
This is what my PYTHONPATH screen looks like:
No comments:
Post a Comment