Developing the Scala Plugin

I'm having trouble getting set up developing the Scala plugin; I'm current with 21914 of scala-intellij/, and using the supplied Scala.ipr at the top level.
1. I had to set up to work with my local SDK's (both scala and Java)
2. Project scala library is referring to \home\ilya\work directory, fixed to point to my local copy
3. Can't find: com.intellij.lang.ASTNode, downloaded plugin development kit and added to module dependencies

Now ScalaMainMethodProvider is referring to a missing com.intellij.codeInsight.runner.JavaMainMethodProvider

Any ideas where to find this?

Any other documentation on getting set up developing the Scala plugin?

Sam Reid

4 comments
Comment actions Permalink

Hello, Sam.

At first, make sure, that you've installed IDEA SDK (points to your IntelliJ IDEA folder) with underlying Java SDK. To develop you have to download last IDEA EAP (see http://jetbrains.net/confluence/display/IDEADEV/Diana+EAP). It contains missed classes you've mentioned.
Secondly, you have to attach to your IDEA SDK following jars: $IDEA_HOME/lib/idea.jar and $JAVA_HOME/lib/tools.jar. Withot them you will not be able to build plugin.
Unfortunatelly there is no any documentation about Scal plugin internals, but fell free to ask everything you want to know.

With best regards,
Ilya

0
Comment actions Permalink

Thanks, that fixed everything and I am able to compile the Scala.ipr project now.  Can you point me in the right direction for implementing something like ctrl-p parameter lookup?  Not exactly sure where to start.

Also, once I make changes to something in this project, how do I build the plugin so that it is usable in the IDE?  After doing so, how can I revert to previous versions of the plugin?

Thanks again,
Sam Reid

0
Comment actions Permalink

Sam,

The simplest way to build plugin is to click on plugin module in project view with right button and choose "prepare plugin for deployment". After that Scala.zip file will be created in plugin folder. You may place its content to your $IDEA_HOME/config/plugins and restart IDEA to get changes. To debug plugin you have to create "plugin" run/debug configuration - just chooe it from a list of possible configurations. This will allow you to run debug IDEA instance with plugin enabled.
To implement Ctrl-P just implement interface com.intellij.lang.parameterInfo.ParameterInfoHandler and register it in plugin.xml file as "com.intellij.codeInsight.parameterInfo" extension. About language plugins implementation see http://www.jetbrains.com/idea/plugins/developing_custom_language_plugins.html. It's a bit obsolete but explains how do language plugins for IntelliJ work. Also it will be usable to look at http://www.jetbrains.com/idea/plugins/plugin_developers.html

With best reagrds,
Ilya

0
Comment actions Permalink

I'll do Ctrl+P in one of next releseas. So you can do another feature which you want.

Best regards,
Alexander.

0

Please sign in to leave a comment.