如何使用结构搜索来查找给定类型的子类的构造函数调用?

Rya*_*yan 3 intellij-idea structural-search

我有一个名为"com.foo.BaseFoo"的抽象类

我想找到任何从BaseFoo扩展的东西上调用new()的人

我试过做一个搜索模板:

new $BaseFoo$()
Run Code Online (Sandbox Code Playgroud)

然后编辑变量,使其具有对象类型的表达式约束

com.foo.BaseFoo
Run Code Online (Sandbox Code Playgroud)

并单击"在类型层次结构中应用约束"但这不起作用.

Bas*_*ers 5

你快到了.使用如下模板:

new $BaseFoo$($argument$)
Run Code Online (Sandbox Code Playgroud)

其中$ BaseFoo $
Text/regexp:com\.foo\.BaseFoo
选中在类型层次结构中应用约束

和$参数$
最小计数:0最大计数:无限制