[pedevel] feature idea: function pop up window

  • From: Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>
  • To: Pe Develop <pedevel@xxxxxxxxxxxxx>
  • Date: Sun, 11 Apr 2004 16:10:06 +0200

Howdy,

I'm tempted to implement a new feature and would like to hear, whether I'm 
the only one who would find it useful.

Currently the function pop up menu is nice, but has its problems. One is, 
that one has to use the mouse to open it. This could probably be solved by 
introducing a key short cut that opens it, but that would leave you with a 
keyboard to operate a it, which is not exactly pleasant, in particular 
because it's content is generated.

The second problem is, that some files have a rather great number of 
functions -- just try PText.cpp for instance -- and not all items fit on 
the screen. This means scrolling, which I consider quite annoying.

My idea is pretty much inspired by the Eclipse pop up window that by 
default opens on Ctrl-O; with some changes, for there's not as much 
information available about the code. It would consist of a text field and 
a list containing the available functions. The text field contents would 
filter the listed functions. In Eclipse it's a `starts with' predicate, 
but, I think, due to the class/namespace name or `class '/`struct ' 
prefixes `contains' would make more sense here.

I'm not sure yet, whether or not the list should be sorted alphabetically, 
and if not, whether the separators should be included. Easier to implement 
would be the first option. :-)

The following changes to the sources would be necessary:
* add the window implementation itself
* add a short cut key slot -- haven't looked at it, but guess it wouldn't 
be hard
* adjust PDoc to open the window
* refactor CLanguageProxy a bit: Currently it creates BMenuItems for 
includes and functions, which is not that helpful. It should either create 
some sort of info structures, or instead of vectors a call back object 
should be provided on construction. I like the latter better. In either 
case CLangIntf::ScanForFunctions() and PText::ShowFunctionMenu() have to be 
adjusted accordingly.

The feature could also be implemented as an extension, but I it looks like 
those add-ons are intended to work on text only, not using any internal 
classes.

Opinions?

CU, Ingo

Other related posts: