Getting a runtime ClassNotFoundException for com.intellij.psi.css.CssDeclaration

Hi there,

I'm fairly new to IDEA plugindevelopment, so I'm probably doing something very basic wrong here.

I am trying to implement a CompletionContributor that adds some extra completion results for certain custom CSS declarations.

In my CompletionContributor I'm using the interface com.intellij.psi.css.CssDeclaration (I'm casting the current PsiElement).

So, my problem is that this compiles fine, but @runtime, when my CompletionContributor gets invoked I get a
java.lang.ClassNotFoundException: com.intellij.psi.css.CssDeclaration error.

Frankly, I have no idea what I'm doing wrong, I'm hoping someone here can enlighten me.

Thanks very much in advance!


P.S. I'm using IntelliJ IDEA 12.1 Ultimate


Do I need to, perhaps, to add a <depends> element to my plugin.xml? If so, what is the ID of the CSS Support plugin? Where can I find these out?

Or does the <depends> element only make sure that the plugin can be installed when the CSS Support plugin is also installed?


Try adding <depends>com.intellij.css</depends>


Thanks a lot Ronnie, that solved my problem. Cheers.


Please sign in to leave a comment.