This document contains some resources that I have found in helping me understand how a PyCharm plugin for PyTA can be created. It also includes links to some resources I believe would be helpful for people to get on board with developing PyCharm plugins using Kotlin.

Resources for Kotlin

Plugin Concepts

Here I describe (mostly in my own words) the different parts that can make up a plugin. At the end of each description, I also include a link to the official documentation and some extra resources you can refer to, to learn more (or my explanation is unclear 😅)

Action

Allows Plugins to add custom buttons/toolbars to the IntelliJ IDEA platform that can be clicked and used by the user to interact with your plugin. Actions must first be registered, that is, information regarding them must be provided in the plugin.xml file. See here for more info.

Extensions

Allow for a way to extend the functionality of the Platform that is not as easy as adding a button on a toolbar or a new toolbar instead. They need to be added to the plugin.xml file as well, under the <extensions> tag. For more info, check this page. A list of over 1000 Extension Points available for IntelliJ Platforms, which are available here.

Services

I think the official documentation doesn't do a good enough job explaining this, so this is my interpretation. I'll link to an example at the end which shows a small demo of how an Application Level Service can be used, which I think makes the purpose of this more clear.

So, in IntelliJ, there are different Components (Application, Project, Module), each of which have a "getService()" method, which takes as an argument an implementation of the Service (in this case, the Application Level Service). This implementation will contain custom code with methods we can invoke to make the service perform some work. Then after retrieving the Service object, we can call methods to perform our logic. Like everything, Services should be registered, which can either be done in the plugin.xml file, or through the @Service annotation on the class.

I think one thing that differentiates these Services from just using a Plain Old Java Class (POJO) is this: "The IntelliJ Platform ensures that only one instance of a service is loaded even though it is called several times."

Some resources:

Listeners