Note - this documentation is currently under development
Setting up your environment for IntelliJ plugin development is extremely easy; These steps should guide you through the process of getting started with IntelliJ Plugin Development. Be sure to fire any questions or issues our way!
####Download IntelliJ
If you haven't already, make sure you have installed either the Ultimate or Community Edition of IntelliJ.
The IntelliJ community edition sourcecode is available on GitHub. You will either need to git Clone or Download the sources
Add a new IntelliJ project SDK. Be sure to Update the sourcepath to include your downloaded IntelliJ sources.
####Setup Maven
This plugin currently makes use of Maven for dependency management. You should install this
Jetbrains do not currently host publicly up-to-date dependencies for IntelliJ, therefore you must install these yourself.
You will need to install all of IntelliJ's lib JARs contained within ${IDEA_INSTALL}/lib/*.jar
into your Maven repo. A shell script is available for this purpose, which is available here.
An example of executing this Shell script is as follows
# First argument is the path to your IntelliJ 12 install
# second argument is the build number. This plugin requires 129.173
./install.sh "C:/Program Files (x86)/JetBrains/IntelliJ IDEA 12.1.4" "129.173"
As plugin makes use of IntelliJ GUI forms, we require an additional compile step handle this.
Please follow the ideaui-designer-maven-plugin 12.x branch install instructions, which are available within the project's read-me file.
####Installing Developer Plugins
Add a new IntelliJ project SDK. Update the sourcepath to include your downloaded IntelliJ sources.
Developing a plugin for IntelliJ is 100% out of the box.
However the following are additional plugins which will make development work easier;
- Intellij plugin development with Maven - Allows for a Maven module to be picked up as an IntelliJ plugin
- Scala Support - Only required if you are updating the CodeGen module
- Grammar-Kit - Tooling for editing BNF grammars and parser generation
- JFlex - Enables JFlex support for lexical analysis
- PsiViewer - A very nice tool which allows view in a hierarchical manner the PSI Elements within a document.
Note If installing Grammar-Kit, one extra step is required; You must specify the paths of JFlex
and the Skeleton file
to point to the IntelliJ community edition sources. The JFlex settings are available under project settings - ctrl+alt+s
As this plugin makes use of Maven you should make sure you have installed the pre-requiste plugin 'Intellij plugin development with Maven', which will allow for IntelliJ to pickup your plugin module succesfully.
Select the Import Project option from the Quick Start Menu
Select the pom.xml file
After selecting through the options you will need to create new Intellij IDEA SDK
Note - You may find it useful to also download the IntelliJ community edition source code and update your SDK's sourcepath, as mentioned in the Pre-requisites section.
Once your project has loaded you will need to add a new Plugin Configuration
Here is an example of the Plugin Configuration used. You may find it useful to set specific JVM args, such as increasing Heap Size.
You will now be able to run the plugin with Run/Debug mode
IntelliJ also offers some great great plugin development resources
- Plugin Development
- Custom Language Support
- 200+ Open-source IntelliJ plugins
- Plugin Development Forum
Raise an issue if you think any steps are unclear, missing, or if you simply have any questions :)