Howto debug plugin for pre-existing project (Sonar plugin)
It has been my intent to fix bug SONARIDE-186 (http://jira.codehaus.org/browse/SONARIDE-186) for the Sonar Intellij Plugin. I've succesfully checked out the pre-existing code from here https://svn.codehaus.org/sonar-ide/trunk/ and compiled the code.
I tried to test the plugin by copying the resulting .jar into ~/Library/Application Support/IntelliJIdea10CE ( OSX 10.6 ). But when start Intellij I get an exception
[ 4593] ERROR - nSystem.impl.ActionManagerImpl - action specified by reference isn't registered (ID=Sonar.ShowMeasures) [Plugin: org.sonar.ide.idea]
com.intellij.diagnostic.PluginException: action specified by reference isn't registered (ID=Sonar.ShowMeasures) [Plugin: org.sonar.ide.idea]
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.reportActionError(ActionManagerImpl.java:915)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.processReferenceElement(ActionManagerImpl.java:833)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.processGroupElement(ActionManagerImpl.java:549)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.processActionsChildElement(ActionManagerImpl.java:863)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.registerPluginActions(ActionManagerImpl.java:206)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.<init>(ActionManagerImpl.java:137)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
I want to be able to use Intellij for debuging the plugin, but when I create a new run configuration of type 'Idea Plugin' the 'Choose classpath and jdk from module' drop down is empty. How do I get itellij to recognize the 'idea' module in the project is a 'idea plugin'.
Thanks,
Please sign in to leave a comment.
Hello Derrick,
The exception is a bug in the Sonar plugin; the plugin.xml references an
action that doesn't exist.
To use the IntelliJ plugin development features, instead of importing the
Maven project, you need to create a new IntelliJ project and add the idea/plugin.iml
module to it. You'll also need to create an IntelliJ IDEA SDK pointing to
your IntelliJ IDEA installation.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"