Using DependencyValidationManager to Get Required Classes
I want to be able to determine all the classes that are used by a file and/or package of files and then I want to determine what jars that are in the classpath the needed classes are in.
I was wondering if I could use DependencyValidationManager to do this or would there be something else?
Any help is appreciated.
--ekiM
Please sign in to leave a comment.
Hello Mike,
ForwardDependencyBuilder works in Analyze Dependency action. Seems that it
is your case.
DependnecyValidatorManager allows to retrieve user-defined scopes and configured
rules.
Thank you.
-
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Thanks Anna,
However I don't see ForwardDependencyBuilder class in the openapi? Where do I get this class and can I create a plugin using it?
--ekiM
Hello Mike,
You need to add idea.jar to your Idea JDK in order to find com.intellij.packageDependencies.ForwardDependenciesBuilder.
Hope it helps.
Thank you
-
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Okay I will try that. Just a question though, is this allowed as far as developing plugins that use idea.jar directly? Is there any example code using this class that I could look at?
Thanks
--ekiM
Hello Mike,
I do not think that we will change api here in next releases so it must be
quite safe.
I am afraid that there are no examples ... but your questions are always
welcome
Thank you
-
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"