[Pydev-code] PyVocabulary & new developers
Brought to you by:
fabioz
From: Aleks T. <a...@to...> - 2004-03-29 19:43:15
|
Hi everyone, we've got Dana & Bill as the official developers! Feel free to=20 check in. On Friday I realized that I needed to fully understand bdb.py &=20 pdb.py, and that required lots of code navigation. Being bored=20 with trying to decipher what debugger APIs are, I took a look on=20 what it would take to implement cmd-click hyperlinks in pydev. It=20 is one my favorite features in the Java editor, and something I=20 could really use right now. Java editor implements it in about 600 lines of code inside a=20 MouseListener. I think I can lift most of it. The other requirement for context navigation is a database of=20 defined symbols inside a file being edited. Right now I am=20 working on implementing this. Here are my design notes: ### DESIGN NOTES To implement navigation/completion. - Each editor needs a vocabulary. The vocabulary is hierarchical=20 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. ### Dana, this sounds like it overlaps with your work a bit. Any=20 suggestions about what I am doing so that we do not conflict? Aleks Dana Moore wrote: > Aleks, > I am sneaking some time to work on autocompletion at the moment. > Might as well add me to the developers' list. > My SFid =3D=3D dana_virtual >=20 > Bill, > Thanks for getting something working. It prods me into keeping up with = the rest of the group. >=20 > Fabio,=20 > Thanks for the very comprehensive discussion of autocomplete requiremen= ts. > Although I had thought about imports, I had not even thought about the = situation of subclassing. Thanks for reminding us! > Right at the moment, I am just trying to hook Aleks parsed methods tree= and using that to try to completion for the current document. If I can g= et to that level of sophistication, then I will look at imports and subcl= assing. >=20 > Fabio,=20 > You said: > "Allied with simple text-completion, it would make for a really good=20 > environment for editing python (I've been using > the lunar-eclipse plug-in and it has already done python editing in=20 > eclipse almost unbeatable - maybe we could > try to get in contact with its authors and distribute it together with = > pydev - if it's ok with you, I'll get in touch > with its authors and integrate it in pydev...)" >=20 > When you say 'text completion' are you thinking about the kind of text = completion like scintilla does, where if you enter the word 'toto' in the= text, and some time later begin typing 'to', it offers a suggestion of '= toto'. You can then hit TAB or ENTER and it deposits the text for you? >=20 > OR > Do you mean autocompletion such as we are working one? >=20 > ALSO, > I would add to your list the kind of code generation that you get when = you enter 'if'-CTRL-SPaceBar in the Java Dev Toolkit. when you do that, t= he editor offers several kinds of if, if-else constructions. You choose o= ne and it deposits the code and positions the cursor in the right place. = I know how to do that and can finish it after we get further on with the = autocompletion work. >=20 >=20 > ALSO,=20 > Can you say more about the lunar-eclipse stuff. What can we use from it= ? >=20 > Regards,=20 >=20 >=20 >>-----Original Message----- >>From: Aleks Totic [mailto:a...@to...] >>Sent: Monday, March 29, 2004 12:57 PM >>To: pyd...@li... >>Cc: ww...@bb...; Dana Moore >>Subject: Re: [Pydev-code] Contribution: Launching from Run->Run... menu= >> >> >>Sounds good. I've had that running when I started working on the=20 >>debugger, but for the release I turned it off because I did not=20 >>have a real framework yet. Then I wanted to turn it back on, and=20 >>I forgot how. Thanks for doing this. >> >>I've been doing some more work on the debugger. I've checked in=20 >>my latest round of changes. Right now, the "Run..." option works=20 >>as it used to. The "Debug..." option launches the program under=20 >>jpydbg and you can't do anything with it. I hope to have some=20 >>better communication between jpydbg & pydev this week. >> >>I think that the context of the 2 panes can be unified, since I=20 >>started off that way. I'll look at your classes after the checkin=20 >>to see how it can be done. >> >>I'll add you to the developers. What's your slashdot id? >> >>Aleks >> >>Bill Wright wrote: >> >>>Hi Pydev guys. >>> >>>As I think Dana mentioned elsewhere, I've been working on running pyth= on >>>apps using the Run entry under the Eclipse Run menu. This=20 >> >>supplements the >> >>>current Run action and behaves more like a Java configuration. CTRL-F= 11 >>>runs the last config, etc. I've attached a picture of the config type= to >>>give you an idea what I'm talking about. On the left, there is a new = run >>>configuration called "Python" and I've made one run config called "Hel= lo >>>config" The tabbed pane looks a lot like the one on the=20 >> >>Python->Run context >> >>>menu, but is different code because it doesn't have the location conte= xt. >>>There is probably some refactoring that could unify the panels,=20 >> >>but I wanted >> >>>to do this initial cut without modifying other code. >>> >>>The code consists of two new java files and some additions to the debu= g >>>plugin's plugin.xml. What's the procedure for contributing? =20 >> >>I'd also like >> >>>to be added as a developer to pydev. >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=CCk > _______________________________________________ > Pydev-code mailing list > Pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-code >=20 >=20 |