Dictionary.contains marked for removal; can JB provide a default implementation?

I just got notified from the IJ plugin verification process that I’m using a method that is scheduled for removal. It is the contains method on the Dictionary interface:

And I happen to provide an implementation for that interface, so of course I had to override it or get a compile error.

So I’m in a situation where I can’t just remove it because the parent interface still has it; once the parent removes it, then I’ll remove mine, but I’ll lose compatibility with older versions of the IDE.

If the JB platform team would be willing to provide a default implementation, then I think I’d be able to remove my implementation, remove the pending removal warning, and go on with my life?

Maybe:

@Nullable
@Deprecated(forRemoval = true)
default Boolean contains(@NotNull String word) {
   return words.contains(word.lowercase())
}

But why do you implement Dictionary at all?

To provide a few words relevant to the framework people are installing the plug-in for.

But it is not required, you can provide those much easier with BundledDictionaryProvider like this

class VueSpellcheckingDictionaryProvider : BundledDictionaryProvider {
  override fun getBundledDictionaries(): Array<String> = arrayOf("vue.dic")
}

plugin.xml

<spellchecker.bundledDictionaryProvider implementation="org.jetbrains.vuejs.spellchecker.VueSpellcheckingDictionaryProvider"/>

I guess I’ll look into how to create a dic file then. I assume it’s trivial.

That said, it still seems strange at a higher level to schedule an interface method for removal from any extension point without providing an easy migration solution (which a default implementation would provide) if possible.

Anyway I’ll look into migrating my code soon, thank you!

Yes, you are right, but at the same time this exact case barely have clients (couple) implementing it

Thanks again for your help. I have migrated over.

It may be unlikely that anyone else will want to see how I did this, given the fact you said there are only a couple clients implementing it, but my commit can be found here just in case: