duplicately def same class when i import plugin jar in "project structure > module"

see my screencast, there are exist two class org.jetbrains.plugins.ruby.ruby.lang.psi.impl.RFileImpl, their class name are same but their addresses are diff, It's because I import /home/roroco/.IntelliJIdea14/config/plugins/ruby/lib/ruby.jar in "project structure > module" and ruby plugin import ruby.jar too, It will make syntax doesn't work, for instance instanceof RFileImpl, and raise error: "Cannot cast object 'Ruby file' with class 'org.jetbrains.plugins.ruby.ruby.lang.psi.impl.RFileImpl' to class 'org.jetbrains.plugins.ruby.ruby.lang.psi.impl.RFileImpl"

I also upload my code



Attachment(s):
double-def-same-kls-in-plugin-jar.tgz
double-def-same-kls-in-plugin-jar.ogv.zip
3 comments
Comment actions Permalink

You need to add ruby.jar to the classpath of the IntelliJ IDEA SDK, not as a library to your plugin.


0
Comment actions Permalink

Idea SDK is for all projects, and ruby.jar is only for some project, I think import it as module library it's a more suitable way, I hope you can make it work.

0
Comment actions Permalink

You can create multiple SDKs and include the Ruby plugin in the one where you need to use Ruby. We don't plan to make any changes in IntelliJ IDEA to change this.

0

Please sign in to leave a comment.