Structural search - find all instantiations of a class incl. sbuclasses

Hi

I'd like to find all instantiations of a class and its subclasses.

Example:
Find all lines where a subclass of JComponent is instantiated, e.g. new JTable(), new JTextField(), etc.

Is the structural search the right thing for this? If so, how whould the query look like?

--Etienne

0
7 comments
Avatar
Permanently deleted user

new $classname$($params$)

where $classname$ is bound to javax.swing.JComponent with "apply constraint
within type hierarchy" checkbox on,
$params$ only define occurences count: min 0, max: 10000


-


Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"

Hi

I'd like to find all instantiations of a class and its subclasses.

Example:
Find all lines where a subclass of JComponent is instantiated, e.g.
new JTable(), new JTextField(), etc.
Is the structural search the right thing for this? If so, how whould
the query look like?

--Etienne




0

Awesome!
Thanks for your quick and helpful response!

--Etienne

0
Avatar
Permanently deleted user

Maxim Shafirov wrote:

occurences count: min 0, max: 10000


There really should be an "unlimited" max count. This 1000 looks a bit
like a "hack" :)

BoD

0
Avatar
Permanently deleted user

What about leaving max empty?

Tom

0
Avatar
Permanently deleted user

Hi,

Seems fine idea for any occurence field (default still 1 though).

Thomas Singer (MoTJ) wrote:

What about leaving max empty?

Tom



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

0
Avatar
Permanently deleted user

Then there need to be a check box that disable the textfield (like the
one for "Maximum matches".)
It doesn't change anything, it's just a GUI maturity thing...

BoD

Thomas Singer (MoTJ) wrote:

What about leaving max empty?

Tom

0
Avatar
Permanently deleted user

Hi,

3247

BoD wrote:

Then there need to be a check box that disable the textfield (like the
one for "Maximum matches".)



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

0

Please sign in to leave a comment.