OpenAPI: How can I find dependencies for a Java class?

Hi,
I have a class foo.bar.A and would like to find all classes in the same package which are used by A.

So a possible result might be: Class foo.bar.A uses the classes foo.bar.C  and foo.bar.E .

Is that possible with the OpenAPI?

Thanks a lot,
Wallaby

1 comment
Comment actions Permalink

Hello wallaby.pouch,

I have a class foo.bar.A and would like to find all classes in the
same package which are used by A.
So a possible result might be: Class foo.bar.A uses the classes
foo.bar.C and foo.bar.E .

Is that possible with the OpenAPI?


Sure, but you'll have to implement it yourself. Essentially you'll need to
walk through all the PSI elements in foo.bar.A, get their references, resolve
them and check what class they resolve to.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.