skaldesh
skaldesh

Reputation: 1530

Intellij Plugin listen for file changes

I would like to write an Intellij plugin for the GoLand IDE that allows me to automatically add documentation while I am typing the code.

Imagine this example:
I am declaring a new variable in my package:

var test

Now, when I enter a newline (or do something else, not entirely sure yet), I would like my plugin to detect this change and automatically add a comment, something like this:

// The test var TODO
var test

My problem is that I am totally new to developing plugins for Intellij and I have no clue how I can listen for file changes.

To be honest, I do not find the official documentation page for plugins by jetbrains very good. It just lists things you can potentially do, but never works with real examples...

Can somebody point me in the right direction? Maybe provide a good tutorial or an existing plugin whose source code I could study?

Upvotes: 2

Views: 511

Answers (1)

dlsniper
dlsniper

Reputation: 7477

I would like to write an Intellij plugin for the GoLand IDE that allows me to automatically add documentation while I am typing the code.

Not a solution but the upcoming 2018.1 release, now in EAP, allows to add midding documentation to exported identifiers via the quick fixes / intentions on the exported elements.

My problem is that I am totally new to developing plugins for Intellij and I have no clue how I can listen for file changes.

You don't need to listen for file changes, the IDE does not work like text editors by constantly saving files on disk then changing them.

I recommend visiting / asking questions on the SDK development forum.

Upvotes: 1

Related Questions