Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

class/method browser drop down list (box)

(1/4) > >>

killerbot:
As in Dev-Cpp and M$ DevStudio there exits in the toolbar menus a class/method selection.
In there you can select for the Current Project (or is it the current target) from the first drop down list :
 - global functions
 - struct
 - class
And then in the second drop down list you can select the methods of that struct/class/global level.
Upon this method selection an editor is opened (if that file containing the implementation is not open yet) and the cursor is positioned at the start of the implementation of that method (considering the method prototype line being part of the implementation).
Upto this point is what Dev-Cpp delivers.
M$ goes one step further : in the active editor, the drop down list will follow and adjust it's selection (which it shows in the drop down list) according to where the cursor is positioned in the current editor (file).
Certainly this latter functionality is also very interesting : if you are in the middle of a method (for example you got there by clicking on search results) you might have no idea in which method you are : one glance at the top : bingo.

So I am going to try to implement this in CB. All help is welcome, but first let's think this one trough.

The most easy part is probably the first part. I already debugged a minor part of the code which allows you to perform a "goto function" to fix the problem of the return type shown in the function list. This code starts it's parsing the moment the "goto function" command is issued, but only for the current file (active editor).

It is obvious we should extend this to include all files in the project (easy : loop over all the files), for every file we have such a set of functions then. So we can show it in the drop down list.
Help needed here : how do I add such drop down lists to the toolbar menus ??

This is a snapshot, now we enter the problem of adding newly typed in methods. When to upgrade the list (Yiannis can you tell me how you guys did it in dev-cpp ??) :
 - every now and then (what does that mean : fixed period) ?
 - at the moment the 'return' key has been hit ?
 - at the moment the file is saved ?
 - ... ?
Help needed here : how does a plug-in (migth become part of the code completion plug-in later, or maybe better from the start ??) get's informed of the keystrokes from the user (type characters or commands like save ... ) ?

Note to self : namespaces !!! CB does not parse inside the namespaces :-(  ??

Then for the "following" part : again the major question is : when to update.
These updates require parsing : how performance killing might this be (don't know the performance of the CB parsers), we want to keep CB fast and having a good responsiveness to the user.

What do you think ?

Lieven


PS : please only comment on this functionality, don't start discussing things like : oh oh I know another feature I'd like to see implemented ...

killerbot:
 :cry: :cry: :cry: so little feedback

takeshimiya:
I would like to see all of that.
But first, if the c++ parser of C::B is not improved (or replaced), that will make little sense.

rickg22:

--- Quote from: Takeshi Miya on December 15, 2005, 10:44:04 pm ---But first, if the c++ parser of C::B is not improved (or replaced)...

--- End quote ---

8) MUAHAHAHAHAHAHA!

*Goes back to his underground lab*

Michael:

--- Quote from: rickg22 on December 15, 2005, 10:50:29 pm ---
--- Quote from: Takeshi Miya on December 15, 2005, 10:44:04 pm ---But first, if the c++ parser of C::B is not improved (or replaced)...

--- End quote ---

8) MUAHAHAHAHAHAHA!

*Goes back to his underground lab*

--- End quote ---

Ehm, what about the parser proposition, I have done some time ago.... :D.

Michael

Navigation

[0] Message Index

[#] Next page

Go to full version