search only in current function

Questions and answers regarding the use of eclipse environment as seen in Servoy Developer

search only in current function

Postby stefanoni » Wed May 14, 2014 11:25 am

Is this possible, to search for something, but only in the actual function ?
I meen betwean the current Cursorposition until the last "}" endfunction-sign.


Screen Shot 05-14-14 at 11.19 AM.JPG
Screen Shot 05-14-14 at 11.19 AM.JPG (54.62 KiB) Viewed 595 times
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: search only in current function

Postby lopamudram » Wed May 14, 2014 2:45 pm

Hello Stefanoni,

Yes, this is possible. There are quite a few options which can search within current scope if you can select the word in that scope.

- Select or double click a word within a function, it will select (grey background) all the occurrences for the word in the function or scope.
- Select a word then press "Ctrl + Shift + G". Else right click on selection and select Search->References->Workspace.

Most of the time I need to search a element inside function to rename a variable or parameter, for which:
- Select the word then use shortcut "Shift + Alt + R". Else right click on selected word select refactor->rename.

Hope this helps.

Thanks,
Lopamudra
[email protected]
lopamudram
 
Posts: 20
Joined: Wed May 02, 2012 12:05 pm

Re: search only in current function

Postby stefanoni » Thu May 15, 2014 7:43 am

Thank you Lopamudra,

You showed me many possibilities. Maybe I should really try to change old habits and wishes.
:-)

My Idea was:
- CTRL + F (open search)
- type some searchstring
- ENTER ENTER ENTER lets me jump to all this occurrences,
but never out of the current function.

What I do now, I copy a view searchstrings (relevant var- / func-names )
to the very end of the function and then start working like described above.
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland


Return to Eclipse Environment

Who is online

Users browsing this forum: No registered users and 3 guests

cron