[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[Dltk-dev] Teaching DLTK about third party APIs (for completion)
|
Hello everyone.
I have asked a few questions regarding this topic on the newsgroups
eclipse.technology.dltk, but the low traffic in comparison to this
mailing list seems to suggest that this is the place, for time the being.
The problem I am trying to solve is this:
I would like to have DLTK offer code completion for third party APIs,
and in part in a way that is language agnostic, because the APIs are
offered almost identically for Python, JavaScript and Tcl.
(These APIs are not implemented in any of these script languages. So the
situation is similar to different extensions in JScript/JavaScript
depending on whether you use it in Excel or WSH, or Adobe Indesign -
these "other" APIs are "just there".)
Approach #1:
I can achieve the desired completion functionality in DLTK by adding a
*.js file to a DLTK JavaScript project, given that the additional *.js
file contains all type and variable declarations, classes, their
methods, etc.
Approach #2:
I can also achieve the desired functionality by adding completion
proposal computers for each language, but I would have to implement
parsing, etc. myself then, which is what I would want to avoid.
But instead of going through completion proposal or adding an artifical
"interface declaration file" I would much rather feed the underlying
data structures directly with the functions, global variables, class,
methods, etc. myself. I tried stepping into the completion code as well
as the parsing triggered by AbstractASTFoldingStructureProvider, but
cannot make much sense of the code.
For now I would be happy with hacking DLTK/JavaScript so that it would
parse my "interface declaration file" (written in JavaScript) although
it doesn't appear in the list of project files, but I don't know where
in the code.
Ultimately I would like to feed directly into the respective DLTK data
structures to make my declarations without going through the extra step
of parsing an external file, but, here too, I don't know where in the
code that would be achieved.
Has teaching third party APIs to DLTK been given any thought yet? Has
anything been implemented that I could already use right away? How would
you like to see this implemented (if not done yet)?
Can any of you provide any pointers where to look in the code for either
of these approaches?
With best regards
Clemens Anhuth
--
www.froglogic.com - Squish - Multi-Platform GUI Testing