I’ve been developing my plugin for a while now, and it feels like every change is a struggle because of lack of documentation. It feels like I’m missing something obvious. 99% of my code changes are trial and error based on classes I found via intellisense and reading decompiled code. There are no doc comments or explanations as to what any of the classes or extension points I come across do.
The documentation that does exist is either out of date or unclear, often using complicated examples (in Java, usually), and not explaining what the classes/methods actually do.
E.g. I recently implemented a stub tree for my language plugin using the guide here. I really struggled following the 9 steps because I had no context of what each class does; I understand it in hindsight, but there was a lot of trial and error to get here. The example for getKey
links to a 450 line file - should I be implementing that much in my stub? I can’t find the plugin.xml to see how this example fits together, and because it’s not a simple example, it’s difficult to find the relevant classes among all the other plugin files.
1 Like
Unfortunately this is how JetBrains IDE plugin development is. You can’t really rely on documentation, there usually isn’t any and if there is it either only touches the basic things that almost every plugin has to deal with, is outdated or irrelevant/complicated in a way that makes it.. not very useful…
If you’re not doing this already then clone the intellij community repository. It will make browsing the source code and looking for existing implementations of classes you might want to use easier.
But besides that it really is just trial and error, sometimes you might get lucky googling something and sometimes you might get an answer if you post here, but the rest you have to bruteforce by doing it wrong several times first.
EDIT: I almost forgot, you can also look for extension points other open source plugins use and see how they implemented them here
1 Like
I’ve been developing plugins for 10 years, and it is still like that
You need to learn how to work with this. But I find the documentation useful and always read new articles, I like it because previously, it was much harder to get started without it.