Is there any way to search for a string in the project? Follow
Hi Community,
I want to search a string in the project. The string comes from a annotation value.
This annotation value is used as a field in a specific class and I need to find this class which uses the string as a field value.
For example:
@Path("/foo/bar")
public class RestClass {
...
}
public class RestClassTest {
private static final String PATH = "/foo/bar";
...
}
I think the Find in Path dialog uses this functionality but I just can't find how this can be done.
Markus
Please sign in to leave a comment.
PsiSearchHelper.processAllFilesWithWordInLiterals() is one possible way to do this.
Is it possible to use this the other way around to search for an annotation value?
Thank you Dmitry I use the StubIndex for searching the annotations and this works.