Structural Search power users

Can Structural Search do any of the following:
Tell me every interface in a project that has no more than 1 implementation?
Tell me every interface in a project that has no more than 1 direct implementation?
Tell me every interface in a project that has no more than 1 extending interface?
Tell me every interface in a project that has no more than 1 direct extending interface?
Tell me every interface in a project that has no more than 1 of either a direct implementation or a direct extending interface?

I see a reference to Using Structural Search & Replace in the help but it comes up blank for me.

Thanks,
Jon

2 comments
Comment actions Permalink

If structural search can't do this, anyone know of a tool that can?

Thanks,
Jon

0
Comment actions Permalink

Specify interface as pattern
interface $Class$ {}
for Class variable set (groovy) script constraint like:
com.intellij.psi.search.searches.ClassInheritorsSearch.search(__context__).findAll().size()
== 1

Jon Steelman wrote:

Can Structural Search do any of the following:
Tell me every interface in a project that has no more than 1 implementation?
Tell me every interface in a project that has no more than 1 direct implementation?
Tell me every interface in a project that has no more than 1 extending interface?
Tell me every interface in a project that has no more than 1 direct extending interface?
Tell me every interface in a project that has no more than 1 of either a direct implementation or a direct extending interface?

I see a reference to Using Structural Search & Replace in the help but it comes up blank for me.

Thanks,
Jon



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.