TITLE OF PAPER: A multi-language code intelligence engine for code browsing support in a commercial IDE ALT TITLE: Code Intelligence in Komodo URL OF PRESENTATION: _URL_of_powerpoint_presentation_ PRESENTED BY: Trevor Mick REPRESENTING: ActiveState CONFERENCE: PyCON 2004 DATE: 20040324 LOCATION: _venue_and_room_in_venue_ -------------------------------------------------------------------------- REAL-TIME NOTES / ANNOTATIONS OF THE PAPER: {If you've contributed, add your name, e-mail & URL at the bottom} Code Browsing - code browser - autocomplete Goals - Code browser - Autocomplete - Little things to speed up the coding process - Call tips Database - SQLite - Multi-language issues - separate files and modules not needed for Python, but useful with other languages. - scanners for files (look for COM objects, Python classes, etc.) - store information about the program using an XML description format known as CIX. - language-agnostic - storable/distributable - pre-generated files for standard libs, binary packages, etc. Language engines - for "interesting" language-specific stuff - (Python) analyze source code using the compiler module --> AST - (PHP) examples of attributes on functions and classes, interfaces - (Perl) tough to parse -- Perl can do it; scintilla comes close - (Tcl) Tcl code can parse Tcl; used TclWrap to generate a standalone executable to do this. - (XSLT) missed this... Scheduler (multi-threaded code) - Asynchronous update of info must not interfere with editing. - Scheduler manages small pool of scanner threads that are scanning code. - Example: code browser updates when typing ceases briefly. - Uses the Queue module from the Python standard library -- modified queue that collapses multiple like events. Autocomplete/call tips - Type inferencing - Automatic triggering (language dependent) - Easy in Python, Perl (e.g. foo. in Python) - Tough in PHP, since it's all about builtins Solution: wait for three characters to be typed Future Possibilities - Open it to the community once it's stable - Debugging is very language-specific - DBTP is their debugging API (?), available as open source - Other language engines - Distributing CIX files for binary packages - User-specific data in the database, e.g. method frequency tracking. Visual Studio does this now. Questions Q: What would you like to see changed in Python to make this easier? A: Extract the real Python parser into an accessible piece. Q: Can this stuff be accessed separately from Komodo? A: Yes, it's pretty separable. Q: How do you deal with errors etc.? A: We don't update information until the code is syntactically correct. Q: How easy is it to write plugins (e.g. finding binding occurrences of your variables -- language agnostic)? A: No plugins yet. Maybe regex-based approach. Maybe open CIX spec and let users write (extend?) language engines. Q: (something about methods that are swapped) A: Ask me later. Q: How does XSLT fit into the Python, Perl, Tcl group? A: It's not exactly the same form as those languages, but some aspects of it can still be usefully inspected. (someone clarify?) Q: How many lines of JavaScript are there in Komodo (which is built on top of Mozilla)? A: We'll piecemeal convert our code into Python as Python scripting in Mozilla becomes available. -------------------------------------------------------------------------- REFERENCES: {as documents / sites are referenced add them below} komodo: http://www.activestate.com/Products/Komodo/ ms intellisense: http://tinyurl.com/32fgq scintilla: http://www.scintilla.org/ -------------------------------------------------------------------------- CONTRIBUTORS: {add your name, e-mail address and URL below} Abhay Saxena, ark3@email.com Bob Kuehne, rpk@blue-newt.com, http://www.blue-newt.com -------------------------------------------------------------------------- E-MAIL BOUNCEBACK: {add your e-mail address separated by commas } -------------------------------------------------------------------------- NOTES ON / KEY TO THIS TEMPLATE: A headline (like a field in a database) will be CAPITALISED This differentiates from the text that follows A variable that you can change will be surrounded by _underscores_ Spaces in variables are also replaced with under_scores This allows people to select the whole variable with a simple double-click A tool-tip is lower case and surrounded by {curly brackets / parentheses} These supply helpful contextual information. -------------------------------------------------------------------------- Copyright shared between all the participants unless otherwise stated...