idea plugin develop ,how to load .class which opened in the idea project?

Answered

To develop the idea plug-in, you need to obtain the .class file of the open project A, obtain the class<?> object, and do follow-up operations.Throws classnot found:

this answer can not resolve problem

https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000615544-Intellij-Plugin-Load-class-object-from-source-project

UrlClassLoader urlClassLoader = UrlClassLoader.build().url(VfsUtilCore.virtualToIoFile(CompilerModuleExtension.getInstance(module).getCompilerOutputPath()).toURI().toURL()).get();

urlClassLoader.loadClass(psiclass.getqualifiedname())
0
1 comment

I'm sorry, but I don't understand the issue.

Please rephrase your question and provide more information. What feature are you trying to implement?

0

Please sign in to leave a comment.