Structural Search question


I'd like to find classes that:
-directly or indirectly implement some specific Interface (for instance IFooSupport)
-do not have a specific class in their class hierarchy (eg are not a descendant
class of AbstractFooSupport)

My attempts so far:
-Template:
class $Class$ extends $BaseClass$ implements $Interface$ {}
Options:
-Class: target of search
-BaseClass: AbstractFooSupport & Apply within hierarchy & Invert condition
-Interface: IFooSupport & Apply within hierarchy

The results of the search, however, include direct subclasses of AbstractFooSupport.

Maybe I'm misunderstanding the options. My idea was that specifying AbstractFooSupport
& Apply within hierarchy & Invert condition for "BaseClass" would mean: "does
NOT extend a class that is AbstractFooSupport or a class that has AbstractFooSupport
as parent".


7 comments

Maxim,

I have created a JIRA issue as requested: IDEA-9399

Am I correct in thinking that I can use "Apply constraint within type hierarchy"
to search within the type hierarchy?
-All superclasses (up to and including Object) of a given class
-All descendant classes of a given class


0

Thank you.

Type hierarchy is traversed up (to supers) thus all superclasses (up to
and including Object) of a given class are checked with condition.
So one can find descendants of the class or superclasses depending on
target of search used.

You can also find something within hierarchy (there is special scope for
this)

Taras Tielkes wrote:

Maxim,
I have created a JIRA issue as requested: IDEA-9399

Am I correct in thinking that I can use "Apply constraint within type
hierarchy" to search within the type hierarchy?
-All superclasses (up to and including Object) of a given class
-All descendant classes of a given class



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Hello Maxim,

Type hierarchy is traversed up (to supers) thus all superclasses (up
to
and including Object) of a given class are checked with condition.
So one can find descendants of the class or superclasses depending on
target of search used.


If I understand correctly, for above scenario to work, I need to check "Apply
constraint withing type hierarchy", correct?

You can also find something within hierarchy (there is special scope
for this)


I don't understand, could you give a (small) example?

Taras


0

Hello Maxim,

Thanks for your explanation (which you sent to me instead of the group).
In trying this (in recent EAP builds), I experienced some problems: IDEA-9403

BTW, are there any enhancements to SSR in Demetra?


0

Thank you.

1. There new is Status field that reflects problems with
search/replacement patterns during edit.
2. There is support for searching/replacing xml/html

I expect significantly more features in next release.

Taras Tielkes wrote:

Hello Maxim,

Thanks for your explanation (which you sent to me instead of the group).
In trying this (in recent EAP builds), I experienced some problems:
IDEA-9403

BTW, are there any enhancements to SSR in Demetra?



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Hello Maxim,

1. There new is Status field that reflects problems with
search/replacement patterns during edit.


The "Status" label has an mnemonic assigned to it: it this to force a status
update (after correcting syntax)?


0

It navigates to search/replace pattern editor having problem (adequate
error reporting planned for next version)
Status is updated automatically on change.

Taras Tielkes wrote:

Hello Maxim,

>> 1. There new is Status field that reflects problems with
>> search/replacement patterns during edit.


The "Status" label has an mnemonic assigned to it: it this to force a
status update (after correcting syntax)?



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.