Reputation: 5381
Is there a way to search only in java strings in Intellij IDEA ?
I have searched and could not found anything on this. I have to refactor hibernate HQL queries written as java strings. If IDE support search in strings it will be lot more easy to me.
Upvotes: 3
Views: 756
Reputation: 3313
Pressing CTRL + SHIFT + F gives you the possibility to search in "String literals only":
This also works with CTRL + F:
Additionally you can enable regular expression for some fancy searches.
Upvotes: 9
Reputation: 52185
Unless I am misunderstanding you, you could build a regular expression to search inside quotation marks: "<whatever you need to search for>"
, something like so: "from eg.Cat"
. If you want it slightly more generic, you could do: "from .+?"
Upvotes: 1