structural search for fields of certain type in class hierarchy
Hi,
I'm trying to use structural search to find all fields that are some sort of Collection in all subclasses of Base.
So given:
class Foo extends Base {
List list;
}
class Bar extends Foo {
Set set;
}
I want both these fields to be returned from the search.
I've tried:
class $Class$ {
$FieldType$ $FieldName$
}
where: $Class$ is set to Base and 'Apply constraint within type hierarchy' is checked. $FieldType$ is set to Collection and 'Apply constraint within type hierarchy' is checked. $FieldName$ is set to nothing and 'This variable is target of the search' is checked.
Nothing is returned.
Regards,
Ittay
请先登录再写评论。
Use text of existing pattern for searching field, add extends $Base$ to class and apply Base constraint to Base variable
I tried adding 'extends $Base$' with constraint. No change. Can you explain what you mean by "Use text of existing pattern"?