Re: [Pydev-code] PyVocabulary & new developers
Brought to you by:
fabioz
From: Aleks T. <a...@to...> - 2004-03-30 01:25:53
|
Hi, moving right along on the PyDictionary implementation. I've just checked in the latest bunch of changes to pydev. There are few notable changes: 1) PyVocabulary was called PyDictionary. Goodbye grammar school, hello college. The definitions dictionary (PyDictionary) is now associated with every PyEdit. Whenever parser completes, the definitions get updated. Every PyDictionary holds classes/methods/locals defined inside the containing PyItem. The implementation still lacks a few things: - locals are duplicated - no methods for traversal/query 2) I've also made Parser reparse immediately after every newline. This gives it a much better feel. 3) Also added for all the completion enthusiasts out there are PyContentAssistant & PyContentAssistantProvider. These are the shell classes that need to be implemented for code completion. Aleks Aleks Totic wrote: > Hi everyone, > we've got Dana & Bill as the official developers! Feel free to check in. > > On Friday I realized that I needed to fully understand bdb.py & pdb.py, > and that required lots of code navigation. Being bored with trying to > decipher what debugger APIs are, I took a look on what it would take to > implement cmd-click hyperlinks in pydev. It is one my favorite features > in the Java editor, and something I could really use right now. > > Java editor implements it in about 600 lines of code inside a > MouseListener. I think I can lift most of it. > > The other requirement for context navigation is a database of defined > symbols inside a file being edited. Right now I am working on > implementing this. Here are my design notes: > > ### DESIGN NOTES > To implement navigation/completion. > - Each editor needs a vocabulary. The vocabulary is hierarchical in > structure, and has items: > Top-level (file vocabulary) has: > classes > functions > globals? > Class vocabulary has: > documentation string > classes > methods (functions) > instance variables (inferred from self.) > Method/function vocabulary has: > documentation string > locals > classes > functions > > Each definition in the vocabulary describes: > - where is it defined (file, char span) > - character range where it is applicable > > Vocabulary usage: > Find an innermost vocabulary containing current selection. > Then quiz it for whatever is needed > > Questions: > can vocabularies be overlapping? That would make things hard. > ### |