Structural Search: find method calls

Hi

I'm trying to find all calls to JButton.setToolTipText(), but I don't want to find calls to JComponent.setToolTipText() in general.

So, if I have

JComponent c = new JButton();
JLabel l = new JLabel();
JButton b = new JButton();

I'd like to find b.setToolTipText() only.

How can I do this with Structural Search? Any help is very much appreciated!

--Etienne

0
2 comments
Avatar
Permanently deleted user

$a$.setToolTipText($b$)
$a$ expr type is JButton

etienne wrote:

Hi

I'm trying to find all calls to JButton.setToolTipText(), but I don't want to find calls to JComponent.setToolTipText() in general.

So, if I have

JComponent c = new JButton();
JLabel l = new JLabel();
JButton b = new JButton();

I'd like to find b.setToolTipText() only.

How can I do this with Structural Search? Any help is very much appreciated!

--Etienne



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

0

Great! Thanks very much for the quick solution!

--Etienne

0

Please sign in to leave a comment.