How to depend on the INI plugin?

Answered

Hey!

I'm building a plugin, and I'd like to provide support for a specific INI file. It can contain a defined set of
properties and values that can be easily checked by an annotator once the file has been parsed.

I'd like to avoid implementing all the parser and other language features. I'm already implementing another language,
and it is quite complex and time-consuming. I've noticed that there already is an INI plugin available.

I'm trying adding it as dependency to my plugin, but its versioning is quite problematic: there are a lot of releases with only narrow compatibility ranges. The plugin.xml dependency is straightforward, but I can't get the gradle dependency right. Is there a possibility to depend on it, without declaring the same (or narrower) compatibility range myself?

Another option would have been to copy the source code and modify it, but quickly reading the license, it does not seem allowed.

Last thought I had: would it be possible to have a file included in two languages at once? I.e. running my annotator (that depends only on PsiElement, not any specific implementation class) on files named "ig.ini", while the INI plugin enables all its features on the file at the same time (to provide lexing, syntax highlighting and more)? That would allow me to implement some features, while not having to add the plugin as a gradle dependency.

Thanks!

0
1 comment

Hi Quentin,

You don't need to specify the same compatibility range in your plugin. You just need to depend on the version compatible with the target IDE version, so the value of `intellij.version`. I assume you need to use PSI API, and it is usually stable, so your plugin should work correctly with other versions of the INI plugin. You should also always verify binary compatibility before publishing it to the marketplace.

0

Please sign in to leave a comment.