0

Maybe I do not understand IntelliJs structural search not.

I want to find all occurences which match the following example pattern:

Map<String, String> mapper = new HashMap<>()

My not working approach was

Map<$a$,$b$> $c$ = new HashMap<>()

Does structural search find it and how?

1 Answers1

2

Using a pattern like the following works for me:

$map$<$a$,$b$> $c$ = new $hashmap$<>();

$map$ text/regexp: java\.util\.Map
$hashmap$ text/regexp: java\.util\.HashMap

I'm not sure why your pattern didn't work. It is probably a bug.

Bas Leijdekkers
  • 23,709
  • 4
  • 70
  • 68