Depending on scala plugin


i'm trying to write a plugin that depends on the scala plugin. admittedly i don't know picocontainer at all and the way the class loader of IDEA sandbox works. but this is my problem:

i started using GoToImplicitsAction to write my own action in my own plugin. i added scala-plugin.jar to my dependancies, so that i could use the API of that. however, when i do a match like this:

      val dataContext = e.getDataContext
      val file = LangDataKeys.PSI_FILE.getData( dataContext )
      file match {
         case _: ScalaFile => enable
         case x => disable


the result is that the match always fails. that is, the ScalaFile class provided at runtime seems to come from other class loader than the one i'm matching against. in fact, when i change the dependancy type of scala-plugin.jar from "compile" to "provided", i get a NoClassDefFoundError .... i guess i need to somehow bring the scala-plugin "in scope" when i access it from my plugin.

but how?

thanks, -sciss-

1 comment
Comment actions Permalink




Please sign in to leave a comment.