Getting started writing plugins Follow
How does one get started writing plugins? The docs seem sparse, at best, and mostly from 2002-2003. I found the plugin dev kit, but it's for 4.5.4, and I want to build for Irida.
I also found the plugin ant script which is supposed to handle setting things up for you, but it doesn't look like it's been updated in a couple of years and the "Plugin" module type in Irida seems to handle a lot of this for you.
Is there a guide somewhere I should be reading to get started?
Please sign in to leave a comment.
Anyone? Any ideas?
I suggest you follow those steps :
0/ use Irida (the EAP)
(it will let you develop a plugin for 4.5 if you wish)
1/ install the DevKit SDK
- download and unzip the IDEA-XXX.dev.zip from
- copy the unzipped dir contents to IDEA_HOME, in the dir with the
/help/* --> /help/ , etc.. => it will install the javadoc and source for the plugin openAPI. 2/ define a plugin JDK (!! it's necessary to compile plugin projects) - IDE settings + (JDK & Global libraries) - select "Add IntelliJ IDEA SDK + point to your IDEA home - select a sandbox directory (can be anywhere) (choose a name like "sandbox-3211") note: later, you'll define one for IDEA 4.5 the same way) 3/ download the source of a plugin that : - is very simple - contains the whole DevKit project (=>]]> you can simply unzip + open
the project + run).
(You'll get an error, about the JDK: just choose the one you defined
in 2/ above, and recompile)
5/ create a plugin run config (to launch the plugin in a 2nd instance of
- Menu: Run.Edit Config.Plugin
- click on the
- name the config "launch 2nd instance"
6/ run the plugin config you've just defined
note 1: if you chose /Debug/ rather than /Run/, you'll be able to debug
the plugin, while it's running in the 2nd instance)
note 2: It's Hotswappeable => while the 2nd instance in running, you can
change (some) the code of the plugin, and recompile => hotswap => no
need to interrupt the 2nd instance to refresh.
note that the plugin sdk does not work on intellij installations that do
not contain a JRE (e.g. the .zip/.tar.gz distributions).
This is because the plugin SDK searches for the ]]>/jre and will
not find it.
Alain - is this issue known to you? Is there an override?
Alain Ravet wrote:
Thanks you VERY much! Exactly what I was looking for...
Sorry, I don't know.
I'm on Mac, so I don't have this problem (the JRE is preinstalled in a
Alain Ravet wrote:
>> note that the plugin sdk does not work on intellij installations that
>> do not contain a JRE (e.g. the .zip/.tar.gz distributions).
>> This is because the plugin SDK searches for the /jre and >> will not find it. >> Alain - is this issue known to you? Is there an override? >>]]>
perhaps someone from JB can comment on this?
JB, please make a screencast of this.
Arik Kfir wrote:
Bug report is here: http://www.jetbrains.net/jira/browse/IDEA-1640
I'm trying to get this going, and it seems to be set up ok, but when I go to run the plugin it says that tools.jar is not in the classpath and make sure the JAVA_HOME points at the JDK, not the JRE. I looked at the classpath it built from pointing the SDK JVM configuration at the home of the Idea 3316 install and it's got tools.jar in there, so I'm not sure what the problem is. Do I need to set the JAVA_HOME environment variable to point at my Idea 3316 directory?
This is a bug in 3316, and it's marked as fixed for the next released EAP
build. As a workaround, copy IDEA/jre/lib/tools.jar into IDEA/lib - this
works for me.