Skip to content

Instantly share code, notes, and snippets.

@smac89
Last active May 10, 2020 07:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smac89/762eef2ed9fbf5158085f5a7efb2d76a to your computer and use it in GitHub Desktop.
Save smac89/762eef2ed9fbf5158085f5a7efb2d76a to your computer and use it in GitHub Desktop.
Structural search tips. #IntelliJ #idea

Find field references on an instance

In this example, we want to find places where one did:

someClass.someField

Where someClass is of the type fully.qualified.SomeClass

Find and replace field reference with method call Step 1:

screenshot from 2018-08-15 14-44-56

Step 2:

screenshot from 2018-08-15 15-17-03

Step 3:

screenshot from 2018-08-15 14-46-04

Step 4:

screenshot from 2018-08-15 14-54-23


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment