There is no way to replace/find in one go the 2 targets below:
--------------------------
To reproduce: try and replace
$ssn$ == null ? null : $ssn$.$nodeOrMore$
by
$ssn$.$nodeOrMore$
with as sole constraint that $ssn$ inherits from Serializable
Problem: only the 1st target is found.
public final class Foo
{
public static void main (String[] args) {
SuperSuperNode ssn = new SuperSuperNode ();
Node node = ssn == null ? null : ssn.node; <<-- target 1: IS FOUND
Node node2 = ssn == null ? null : ssn.supernode.node; <--- target 2: is NOT found
}
private static class Node {
}
public static class SuperNode {
public Node node;
}
public static class SuperSuperNode implements Serializable{
public SuperNode supernode;
public Node node;
}
}