Plugin testing issues

Answered

I wrote a plugin that interacts with different languages, I want to test it. I use LightPlatformCodeInsightFixture4TestCase for this, but when I get the virtual file of my test java file, its type is plain text. Moreover, the available languages are reduced to a very small pool: json, xml and their extensions. However, when the plugin is launched in debug, there is no such problem, how can I fix it?

1
3 comments

Make sure you have setup correctly dependency on bundled Java plugin https://plugins.jetbrains.com/docs/intellij/idea.html#java

0

Wouldn't this only work for java? I would like all the languages that I have in idea to be available in the tests

0

Then you'll need to enable all language plugins in your test sandbox explicitly by adding them as dependencies https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension-plugins

0

Please sign in to leave a comment.