Plugin development dependency to TextGenOutcomeResource
Hi,
I'm creating a new intellij plugin and i'm trying to get the generated code for a model.
But i'm getting "NoClassDefFoundError: jetbrains/mps/lang/core/plugin/TextGenOutcomeResource" and my plugin has the following dependencies:
- <depends>jetbrains.mps.core</depends>
- <depends>jetbrains.mps.java</depends>
- <depends>jetbrains.mps.build</depends>
Can you help me solving this problem?
Thanks
Please sign in to leave a comment.
Hi Raul
The dependency on jetbrains.mps.core is enough in terms of plugin dependencies. However, the class you're trying to use belongs to a language, namely jetbrains.mps.lang.core. To be able to use it, you should reference it from a class that also lives in a language (or a plugin solution, i.e. a module for which mps creates a classloader) and that language or solution must have a dependency on jetbrains.mps.lang.core.
It has to with classloaders. The code that you just write as part of your plugin is loaded by the plugin class loader. Languages and plugin solutions are loaded by their own classloaders. The latter will see classes from the former, but not vice versa.
Could you describe, what exactly you want to do?
Hi Daniil,
Thanks for the reply.
I'm trying to get the generated text of a root node, for that i'm trying to do the same of preview generated text functionality used in MPS. But i'm doing this using an intellij plugin.
The code i'm using is:
I hope this helps.
Thanks,
Raul