NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Incremental (Function) Search


Joined: 13 Feb 2006
Posts: 10
Reply with quote
I worked a lot with Borland Delphi and a good Delphi Coding Extension which had a superb incremental search function. And so it worked:

You pressed STRG+G to bring up the search window. Your cursor was already placed in the input form so that you could directly start typing. With each key you pressed the result list below was updated and showed the founded results (founded pattern + line). This list could also be limited to functions and variables for example. Using the arrow keys you can than simply select the desired entry and jump to this line by pressing ENTER. Especially if the result was limited to function names this feature was very useful as it allows you to jump to functions in a very fast way. Having the direct feedback of the results avoids to always input the full search as you can see how the results narrow down. Something like this (for example as extension to the simple GoTo Line Dialog) would be very beautiful to have in PHPEd and which would speed up code navigation enourmously.

What do you think?

BTW: Or how about a PLUGIN architecture which would allow 3rd pary developers (for example me) to create such a plugin? I guess the existing script functionality doesn't allow me to control the IDE as described?!
View user's profileFind all posts by thelephantSend private message


Joined: 08 Mar 2006
Posts: 63
Reply with quote
Seconded. Incremental search would be great. I haven't seen how it is implemented in Delphi, but in most other editors it is a very simple function that brings up an input field in the status bar or in a popup at the bottom of the widow where you can start typing and the corresponding text is immediately highlighted in the edit window. You usually go to the next instance by pressing the same key combination that started the search again. You should also be able to do a reverse search in the same way.
View user's profileFind all posts by svenaxSend private message


Joined: 13 Feb 2006
Posts: 10
Reply with quote
here I found a few screenshots of the nice Delphi IDE Enhancement I talked about:

http://www.gexperts.org/tour/procedure_list.html

This window pops-up and gives you fast access to your functions. I know that the Code Explorer shows you also all kinds of functions, but if you know exactly what you are searching for this is too slow as you definetly need the mouse to navigate through the explorer tree.
View user's profileFind all posts by thelephantSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8351
Reply with quote
Quote:
definetly need the mouse to navigate through the explorer tree

not exactly.
Context search works for code explorer tree too and you don't need mouse to switch to it, you can assign shortcuts for all dockable windows.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 13 Feb 2006
Posts: 10
Reply with quote
What do you mean with "context" search? The simple windows "jump to node" function so that when I press a i jump to the first node that begins with an a?

No, you can't switch to the code explorer that easy - if you use the shortcut (e.g. CTRL+E) the code explorer get's highlighted, but does not have the focus so that key presses will not work. You need to click with the mouse on the explorer to activate the keyboard. Furhtermore, you can not jump to a certain function (in the source code) by pressing ENTER when the desired code explorer node is selected -> You need the mouse again.

Concerning the incremental search as explained above I could imagine that this could be integrated to the code explorer so that the tree only shows matching results.

EDIT: I just took a look at the 4.5 eval and there is this new search field. Probably this search field could work a an incremental search so that it "filters" the results in the code explorer as you type?
View user's profileFind all posts by thelephantSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8351
Reply with quote
Did you miss Find Declaration feature? Smile
Try for example right click on a method call or class or function or variable and select Find Declaration in the popup.
If you're not satisfied with clicking, you can assign shortcut for this feature.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 13 Feb 2006
Posts: 10
Reply with quote
Yes - I detected the find declaration function and this is also really useful! But often you do not have a function call or variable right in your source code to which you want to jump.

Do you have Winamp 5 on your pc? (yeah I know this is no IDE but the technique I want to describe is the same Wink
Try the following: Put multiple songs in your playlist and press the J key (jump to file). Something like the appearing window (but for functions and not mp3's - although music during a hard programmers day is also a nice thing Razz) ) would be really helpfull.

Perhaps this window could search within all open PHP files so that you can use it also to jump to functions in other files. And the best: Jumping like this is a really fast way and can be done completely with the keyboard and even if I do not have a function call of the desired function nearby. I could image that this would be a nice addition to the GoTo Dialog so that you can use this incremental search OR the line numer to navigate through the source.
View user's profileFind all posts by thelephantSend private message


Joined: 09 Jun 2005
Posts: 16
Reply with quote
Hi

Can I add a vote for the GExperts "Procedure List" Ctrl + G Function, Its the one function that is incredibly useful for navigating around a file
The details of it can be found here http://www.gexperts.org/tour/

Thanks
Neven[/img]

_________________
NM
View user's profileFind all posts by NevenSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8351
Reply with quote
if you need to see "current file", just set appropriate mode in the Code Explorer. Its [Find] seems to be enough to find procedures, right?
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 09 Jun 2005
Posts: 16
Reply with quote
ddmitrie

Its not so much an issue of functionality but of immediacy, to go to the __constructor in a class file would be
Ctrl + g, type "__c", enter

Can this be done in Phped as it stands if so what would the the keystrokes be? Thanks

Neven

_________________
NM
View user's profileFind all posts by NevenSend private message


Joined: 11 May 2006
Posts: 20
Reply with quote
Can I vote for it a second time Wink

I share Neven's opinion. I don't like to jump between mouse and keyboard too often, especially as navigating through the code is one of the most important things you do . So making this as effectivly as possible is a great value! See also my statement right here: a-few-small-feature-ideas-t2146.html
View user's profileFind all posts by blueendSend private message


Joined: 09 Jun 2005
Posts: 16
Reply with quote
Hi

No response to my question?

_________________
NM
View user's profileFind all posts by NevenSend private message
Incremental (Function) Search
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 2  

  
  
 Reply to topic