I'm writing a plugin for a custom language. I need to make sure that the plugin is only loaded for certain versions of the language so that it does not show false positive errors (and other things) for unsupported versions of the language.
I found some threads that say that a plugin cannot be disabled programmatically. I tried to circumvent this problem by checking the language in a startup activity (I can do this by analyzing the project's libraries), storing the result in a field and then making the functionality of instances like the annotator, completion provider, highlight visitor etc. depend on this field.
But this approach does not work for all cases. Is there any solution to this problem?