It's impossible. Searching for an Eclipse file is unaware of comments, so you cannot easily exclude results in comments. (Semantic) Java search does not allow you to search for operators, only types, methods, etc. (The weakness of the search dialog box, allowing you to search for texts that are not or legal identifiers, is similar to text search, but it is not).
Thus, you can help yourself in finding files with regular expressions, which may work in most of your cases, but will not be 100% correct and depending on the style of comments and string literals in your source may not work.
Write a regular expression that looks for everything * except for "//", "/" or ("" at the beginning of a line or only after spaces). Especially the latter case can be problematic depending on where you violate lengthy mathematical terms. If you leave the operator as the last character on the previous line, this is not a problem if it is the first character on a new line. In this case, depending on the urgency of the search, you might consider reformatting your sources for the search. Reformatting everything in Eclipse is pretty simple.
source share