Suppose I have the following Java code:
public String foo() { // returns foo() String log = "foo() : Logging something!" return log; }
Can I search in Eclipse for foo() , found only in a string literal, but nowhere in the code? So, in the example here, Eclipse should find only the third event foo() , and not the first, which is the name of the function, and not the second, which is the comment.
Edit: Simple regular expressions will not work because they will find foo() in a string like
String temp = "literal" + foo() + "another literal"
But here foo() is the name of the function, not a string literal.
source share