Plugin Development in IntelliJ IDEA

No one can create a tool that does everything you want it to do. That’s why so many IDE’s provide some public API for writing plugins. IntelliJ IDEA is also one of them.
But having an API is not all. How to start writing plugins for IntelliJ IDEA? What a plugin can and cannot add to the IDE?

We have tried to answer some of these questions in the new demo: GoogleSearch Plugin for IntelliJ IDEA. This demo explains the basics of plugin writing and publishing.
More experienced plugin developers can find answers in these two articles:
1.   The Basics of Plugin Development for IntelliJ IDEA by Alexey Efimov (for beginners)
2.   Developing Custom Language Plugins for IntelliJ IDEA 5.0 by Dmitry Jemerov (for more advanced developers)

Also IntelliJ IDEA tries to ease the plugin development by providing specific code generation, completion, etc. Just look what was done for 5.0 and 5.1 releases for Open API & Plugins.

But there is probably a lot of things that plugin developers want to know or want improve. As usual, we are open to your suggestions. Besides, if you have developed plugins for IntelliJ IDEA and want to share your knowledge with the others, contact us.

This entry was posted in Plugin Development, Tutorials. Bookmark the permalink.

One Response to Plugin Development in IntelliJ IDEA

  1. t800t8 says:

    I found that sometimes editor.getCaretModel().getOffset() doesn’t work well. It returns 0 while I put the cursor in the end of file so this plugin has IndexOutOfBoundsException

    No message
    java.lang.IndexOutOfBoundsException
    at java.nio.Buffer.checkIndex(Buffer.java:444)
    at java.nio.CharBuffer.charAt(CharBuffer.java:1195)
    at com.jetbrains.samplePlugin.GoogleSearch.GoogleSearchAction.getWordArCaret(GoogleSearchAction.java:49)
    at com.jetbrains.samplePlugin.GoogleSearch.GoogleSearchAction.actionPerformed(GoogleSearchAction.java:29)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.a(IdeKeyEventDispatcher.java:8)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.b(IdeKeyEventDispatcher.java:28)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:104)
    at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:88)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:167)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>