Structural Replace based intention

I've created a very simple structural replace intention for lazy initialization:

Search template:
$obj$ = new $object$();

Replacement template:
if ($obj$ == null) {
$obj$ = new $object$();
}

Unfortunately, the intention also occurs after applying the fix. How can I
prevent this?

Tom

1 comment

Tom wrote:

Unfortunately, the intention also occurs after applying the fix. How can
I prevent this?


Structural Search cannot do that (yet). See
http://www.intellij.net/forums/thread.jsp?forum=22&thread=194627#5041544

Sascha

0

Please sign in to leave a comment.