Testing plugin that depends on javascript

Hi,

I'm trying to write formatter tests for my plugin that depends on javascript library, but somehow I can't get over the following exception:

ERROR: Problems found loading plugins: <br>Plugin "JavaScript Support" was not loaded: required plugin "com.intellij.css" not installed.<br>Plugin "Oxy template support" was not loaded: required plugin "com.intellij.css" not installed.<br><br><a href="disable">Disable not loaded plugins</a><br><a href="edit">Open plugin manager</a> java.lang.Throwable      at com.intellij.openapi.diagnostic.Logger.error(Logger.java:115)      at com.intellij.ide.plugins.PluginManagerCore.prepareLoadingPluginsErrorMessage(PluginManagerCore.java:480)      at com.intellij.ide.plugins.PluginManagerCore.initializePlugins(PluginManagerCore.java:1144)      at com.intellij.ide.plugins.PluginManagerCore.initPlugins(PluginManagerCore.java:1217)      at com.intellij.openapi.application.impl.ApplicationImpl.e(ApplicationImpl.java:346)      at com.intellij.openapi.application.impl.ApplicationImpl.<init>(ApplicationImpl.java:219)      at com.intellij.openapi.application.ex.ApplicationManagerEx.createApplication(ApplicationManagerEx.java:45)      at com.intellij.idea.CommandLineApplication.<init>(CommandLineApplication.java:45)      at com.intellij.idea.CommandLineApplication.<init>(CommandLineApplication.java:38)      at com.intellij.idea.IdeaTestApplication.<init>(IdeaTestApplication.java:35)      at com.intellij.idea.IdeaTestApplication.getInstance(IdeaTestApplication.java:50)      at com.intellij.testFramework.LightPlatformTestCase.initApplication(LightPlatformTestCase.java:163)      at com.intellij.testFramework.fixtures.impl.LightIdeaTestFixtureImpl.setUp(LightIdeaTestFixtureImpl.java:50)      at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl$19.run(CodeInsightTestFixtureImpl.java:1175)      at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2125)      at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.setUp(CodeInsightTestFixtureImpl.java:1171)      at com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase.setUp(LightCodeInsightFixtureTestCase.java:99)      at junit.framework.TestCase.runBare(TestCase.java:139)      at com.intellij.testFramework.UsefulTestCase.defaultRunBare(UsefulTestCase.java:335)      at com.intellij.testFramework.UsefulTestCase$3.run(UsefulTestCase.java:348)      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:302)      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738)      at java.awt.EventQueue.access$300(EventQueue.java:103)      at java.awt.EventQueue$3.run(EventQueue.java:699)      at java.awt.EventQueue$3.run(EventQueue.java:697)      at java.security.AccessController.doPrivileged(Native Method)      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)      at java.awt.EventQueue.dispatchEvent(EventQueue.java:708)      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)      at java.awt.EventDispatchThread.run(EventDispatchThread.java:91) java.lang.AssertionError: Problems found loading plugins: <br>Plugin "JavaScript Support" was not loaded: required plugin "com.intellij.css" not installed.<br>Plugin "Oxy template support" was not loaded: required plugin "com.intellij.css" not installed.<br><br><a href="disable">Disable not loaded plugins</a><br><a href="edit">Open plugin manager</a>      at com.intellij.testFramework.LoggedErrorProcessor.processError(LoggedErrorProcessor.java:56)      at com.intellij.testFramework.TestLogger.error(TestLogger.java:67)      at com.intellij.openapi.diagnostic.Logger.error(Logger.java:115)      at com.intellij.ide.plugins.PluginManagerCore.prepareLoadingPluginsErrorMessage(PluginManagerCore.java:480)      at com.intellij.ide.plugins.PluginManagerCore.initializePlugins(PluginManagerCore.java:1144)      at com.intellij.ide.plugins.PluginManagerCore.initPlugins(PluginManagerCore.java:1217)      at com.intellij.openapi.application.impl.ApplicationImpl.e(ApplicationImpl.java:346)      at com.intellij.openapi.application.impl.ApplicationImpl.<init>(ApplicationImpl.java:219)      at com.intellij.openapi.application.ex.ApplicationManagerEx.createApplication(ApplicationManagerEx.java:45)      at com.intellij.idea.CommandLineApplication.<init>(CommandLineApplication.java:45)      at com.intellij.idea.CommandLineApplication.<init>(CommandLineApplication.java:38)      at com.intellij.idea.IdeaTestApplication.<init>(IdeaTestApplication.java:35)      at com.intellij.idea.IdeaTestApplication.getInstance(IdeaTestApplication.java:50)      at com.intellij.testFramework.LightPlatformTestCase.initApplication(LightPlatformTestCase.java:163)      at com.intellij.testFramework.fixtures.impl.LightIdeaTestFixtureImpl.setUp(LightIdeaTestFixtureImpl.java:50)      at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl$19.run(CodeInsightTestFixtureImpl.java:1175)      at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2125)      at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.setUp(CodeInsightTestFixtureImpl.java:1171)      at com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase.setUp(LightCodeInsightFixtureTestCase.java:99)      at com.intellij.testFramework.UsefulTestCase.defaultRunBare(UsefulTestCase.java:335)      at com.intellij.testFramework.UsefulTestCase$3.run(UsefulTestCase.java:348)      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:302)      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738)      at java.awt.EventQueue.access$300(EventQueue.java:103)      at java.awt.EventQueue$3.run(EventQueue.java:699)      at java.awt.EventQueue$3.run(EventQueue.java:697)      at java.security.AccessController.doPrivileged(Native Method)      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)      at java.awt.EventQueue.dispatchEvent(EventQueue.java:708)      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)      at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)


Wherher I add javascript library jars or even ultimate install dir to classpath doesn't matter and the problem persists. If I remove the

 
<depends>JavaScript</depends>

from plugin.xml, the test fails because of missing javascript lib. Any help will be greatly appreciated.

3 comments
Comment actions Permalink
Plugin "JavaScript Support" was not loaded: required plugin "com.intellij.css" not installed.

JavaScript plugin depends on CSS-plugin (com.intellij.css), please add corresponding <depends> and CSS-plugin JARs.

0
Comment actions Permalink

Ok I got it, CSS plugin jars were missing in intellij jdk classpath, thanks.

0
Comment actions Permalink

Just for reference. On OS X the css jar is under:

/Applications/InjtelliJ IDEA.app/Contents/plugins/CSS/lib/css.jar
0

Please sign in to leave a comment.