IntelliJ Idea advanced search for key word in the classes containing a certain word Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of IntelliJ Idea advanced search for key word in the classes containing a certain word without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I use IntelliJ Idea Ultimate 2017.3.

I use often Ctrl+Shift+F to find in path any text anwhere and Shift+Shift to find any class by name.

Is there a way to combine this search for a text inside a group of classes containing a certain word in its name?


Here is an example for clarity:

In a huge project, I want to find all classes which contains a word e.g. transformation as whatsoever (variable, method name, String…), but these classes must contain another word e.g. xml in its name. The results would be e.g.:

  • Interface XmlFile with a method void completeTransformation()
  • Class MyLittleXmlClass which works with a String variable with "transformation" value
  • Class MyBigXmlClass which implements XmlFile and has method void completeTransformation()
  • Class XmlDocument which has a variable named transformationVariable
  • etc.

Answer

You can use Find in path and use an additional file mask. The file mask also accepts asterisks as shown in the image below:
Find in Path with asterisk

We are here to answer your question about IntelliJ Idea advanced search for key word in the classes containing a certain word - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji