Loading java.lang.Class from a ClassPostProcessingCompiler?

Hey,

Is there any documentation for how to load user classes and
resources from a plugin (in particular, a compiler)? That is, how do I get a classloader that loads classes from the project's build directory?

I've tried the plugin's Project object's class loader, the plugin's class loader, the system class loader, and the thread's context class loader (which is the same as the plugin's Project object's class loader), to no avail.

-Patrick

1 comment
Comment actions Permalink

Hello Patrick,

Users' classes won't go into IDEA's JRE under any classloader actually. For quering users' classes we're using PSI (program structure interface) API instead whoes classes are located in com.intellij.psi package. This allows to get up to date information even if those classes aren't compiled or compiled version is out of date.

0

Please sign in to leave a comment.