How to test plugin with dependencies

Answered

Hi all. I am developing plugin, that has org.intellij.groovy as dependency. When i run simlpe LightPlatformCodeInsightFixtureTestCase IT test, i get error, that contains following message:

java.lang.AssertionError: Problems found loading plugins:<p/>Plugin "null" was not loaded: required plugin "JetGroovy" not installed.<p/><br><a href="disable">Disable null</a><p/><a href="enable">Enable JetGroovy</a><p/><a href="edit">Open plugin manager</a>

Tests use same SDK, that uses plugin debug runner (in that mode plugin working properly). As well as, these tests was succesfull before i added groovy as dependency.

What kind of special setUp i have to do in LightPlatformCodeInsightFixtureTestCase to lead this test to working state?

 

1
8 comments

Did you add JARs from Groovy plugin to your IntelliJ Platform SDK?

0

Yeah, there was 3 jars: Groovy.jar, groovy-all.jar and groovy_rt.jar

Actually i need dependency only on GroovyFileType to enable syntax highlight for this language. Maybe getting this plugin as dependency is overkill and there is a simpler solution, that does not have this dependency problem?

0

Please post the full run console output both of debug and normal run config.

 

0

Where did you get plugin ID "JetGroovy" from? It is obsolete for long time.

You should have

  <depends>org.intellij.groovy</depends>

in your plugin.xml and "JetGroovy" should be highlighted red. Please make sure DevKit and its inspections are enabled.

 

Please double-check the JARs for Groovy plugin are taken from the same IDE version you're developing against.

0

I did not specify JetGroovy anywhere in my code. Jars, that i added to SDK was from there: https://plugins.jetbrains.com/plugin/1524?pr= 

All my depends:

<depends>com.intellij.modules.lang</depends>
<depends>org.intellij.groovy</depends>
0

Alright, that explains it. Please see last sentence in my previous reply.

0

Works like a charm! Thank you, Yann.

0

Please sign in to leave a comment.