how to find all while(iterator.hasNext) loops which remove elements?

my template looks like:

$TYPE$ $iterator$ = $getIter$; $statements$; while ($iterator$.hasNext()) {      $statements$;      $iterator$.remove();      $statements$; }



the problem is this only matches "flat code" like

while () {

....
iterator.remove();
....
}

if there is a switch/if/any block around the remove, it won't match. how can i tell idea to ignore the block depth?

1 comment
Comment actions Permalink

This is not currently possible

0

Please sign in to leave a comment.