Wednesday, 14 October 2015

How to add QGIS Python API Intellisense support in Aptana Studio3/Pydev



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?


enter image description here


Thanks a lot


Etienne



Answer




You can for Aptana Studio (and I guess PyDev is the same):


enter image description here


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):


enter image description here


This is what my PYTHONPATH screen looks like:


enter image description here


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...