When working with files in IntelliJ, we use a Virtual File System (VFS). If it wasn’t added when calling the action, then just add it manually.
#INTELLIJ INSTALL PLUGIN CODE#
If we open plugin.xml the following code should be added. We can then call the action called Register Project Component and it will register it for us in the plugin.xml file. When we hover over the class name it tells us that the component is not registered. Let’s create a class and implement the ProjectComponent interface. This component will be called when a project is opened and closed. However right now this does not have any logic, and we do not register anything to the IntelliJ platform.Īs this project will find project.dic files inside a project and register them as dictionaries in that project, we will have to register a Project level component. Right now our file looks like this: dk.lost_world.Dictionary Dictionary GitHub
We want our plugin to be available on all IntelliJ IDE’s so we set our dependencies to. You can find the file in src/main/resources/META-INF/plugin.xml. Let’s start by defining our plugin.xml file. In our adle file we can define some of the values from plugin.xml, and information like which version of IntelliJ we want to test our plugin on when building with gradle. Basically this file defines everything your plugin should do and is the root of your project. This includes the name, dependencies, what actions it should add or if it should extend something in IntelliJ. The plugin.xml file is a file used by IntelliJ which defines all the information about the plugin. Now that we have a project, we have to setup our plugin.xml file and adle. Project creation flow step 2 Project creation flow step 3 Project creation flow step 4 Setting up plugin.xml Then go through the rest of the project creation flow as normal - in this project I choose the following configuration. In here there is now an option called IntelliJ Platform Plugin which is the one we need.
We start by opening up preferences and check if Gradle and Plugin DevKit plugins are installed.Īfter installing the plugins and restarting the IDE, we go to the new projects flow and under Gradle. As this is a Java project, we will use IntelliJ IDEA as our IDE.Īccording to the development guide, the recommended way to create a project is by using Gradle. I will do it in Java as most users are familiar with that.
When creating plugins for IntelliJ, we have to option to do it in either Java or Kotlin. But it’s actually also a feature I have been missing, as when I develop a custom package with my own words in it, I hate that I have to add them each time in the project level dictionary. The project is just a sample to get you started on developing your own plugins. dic file is a simple dictionary where each line is a word in the dictionary. It will also search for the file in packages, so packages can add custom words to the dictionary. In this article I will cover how we can create a simple plugin for all of the IntelliJ IDEs so when you add a project.dic file, it will automatically add it as one of your dictionaries.
#INTELLIJ INSTALL PLUGIN HOW TO#
However sometimes when we use it, we find that a feature is missing, but we have no idea how to actually add that feature and eventually just live without it.
#INTELLIJ INSTALL PLUGIN ANDROID#
Most of us developers use IntelliJ platforms, either IDEA, PHPStorm, WebStorm, Android Studio, P圜harm and the list goes on and on. By Oliver Nybroe How to create an IntelliJ plugin - let’s build a simple dictionary finder Photo by Crew on Unsplash