tags:

views:

80

answers:

4

How to search a partifular function in a particular project in eclipse EG : If i want to search a function with name xyz how ro i do it?

+2  A: 

Use "Java Search" in the search menu or move the caret on the function name in the source and press Ctrl+Shift+G (-> search for reference in Workspace).

[EDIT] If you don't know in which class the function is, then use the text search (which is called "File search"). Enter the name in the search field and then limit the search to "*.java" files.

Aaron Digulla
i dont know if the function is present.So i cant select the function and then press those keys.I want a way by which i can type the functin name in text box
akp
@akp: You can do just that, but if you do, you need to type the *full* name in (class name and all).
Donal Fellows
+1  A: 

If you don't know where the method is located, use text search with a root of your whole project, working set or even the whole workspace if you've really got no idea where it might be; SearchFile… brings up a dialog which lets you enter exactly what you are looking for. You'll have to sort through all the things it finds (using the Search window) to identify the real match from among the false positives, but that's better than nothing.

Donal Fellows
A: 

You can write some code that uses that function and then use the [Ctrl] + [Click] trick to go to its implementations.

Tomasz Kowalczyk
A: 

Check out nWire for Java. It has a quick search feature: start typing and it will instantly show results which include types, interfaces, methods, fields and other artifacts. It has a lot more features.

zvikico