Incompatible Changes in IntelliJ Platform and Plugins API 2020.*
Please see Incompatible API Changes on how to verify compatibility.
2020.2
Changes in IntelliJ Platform 2020.2
com.intellij.psi.util.PsiTreeUtil.processElements(element, processor)method parameter type changed fromPsiElementProcessortoPsiElementProcessor<PsiElement>- This may break source-compatibility with clients that pass more specific processor. Passing more specific processor was illegal before as well because the
processElementspasses every descendantPsiElementto the processor regardless of its type. However, this worked with some poorly written clients, e.g.PsiElementProcessor.CollectFilteredElementsandPsiElementProcessor.FindFilteredElement(both deprecated now). To simplify the migration, a new three-argprocessElements(element, elementClass, processor)is introduced that actually filters by element class, so in most cases, the simplest migration would be to add a wanted element class as a second argument. However, it’s advised to useSyntaxTraverserAPI instead, which is more rich and flexible.
2020.1
Changes in IntelliJ Platform 2020.1
com.intellij.compiler.antpackage removed- ‘Generate Ant build’ functionality is removed from the IDE. Delete the code extending this or replace it with a dependency on the
generate-antplugin. org.jetbrains.jps.incremental.ModuleLevelBuilder.getCompilableFileExtensionsmarked abstract- Implement it in
ModuleLevelBuilder’s implementation. com.intellij.codeInsight.TargetElementUtilBaseclass removed- Use
com.intellij.codeInsight.TargetElementUtilinstead. com.intellij.psi.stubs.PrebuiltStubsProviderBaseclass now extendscom.intellij.index.PrebuiltIndexProviderand inherits its abstract methodgetIndexRoot()- Use
com.intellij.psi.stubs.PlatformPrebuiltStubsProviderBaseinstead. com.intellij.psi.PsiElementVisitor.visitElementmethodPsiElementparameter marked@NotNull- This may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitFilemethodPsiFileparameter marked@NotNull- This may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitBinaryFilemethodPsiBinaryFileparameter marked@NotNull- This may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitPlainTextFilemethodPsiPlainTextFileparameter marked@NotNull- This may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitErrorElementmethodPsiErrorElementparameter marked@NotNull- This may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitPlainTextmethodPsiPlainTextparameter marked@NotNull- This may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitDirectorymethodPsiDirectoryparameter marked@NotNull- This may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitCommentmethodPsiCommentparameter marked@NotNull- This may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitWhiteSpacemethodPsiWhiteSpaceparameter marked@NotNull- This may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitOuterLanguageElementmethodOuterLanguageElementparameter marked@NotNull- This may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.codeInspection.unused.ImplicitPropertyUsageProvider.isUsedmethodPropertyparameter marked@NotNull- This may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.lang.ReadOnlyASTNodeclass removed- Use
com.intellij.testFramework.ReadOnlyLightVirtualFile-based PSI instead. - Java code migrated to use
TYPE_USEnullability annotations - Due to some problems in Kotlin compiler existing Kotlin code might become incompilable in rare cases if a method written in Java returning an array and annotated as
@Nullableor@NotNullis used or overridden. com.intellij.navigation.ChooseByNameContributorEx.processNamesmethod parameter type changed fromProcessor<String>toProcessor<? extends String>- This may break source-compatibility with inheritors written in Kotlin.
com.intellij.navigation.ChooseByNameContributorEx.processElementsWithNamemethod parameter type changed fromProcessor<NavigationItem>toProcessor<? extends NavigationItem>- This may break source-compatibility with inheritors written in Kotlin.
- Images module functionality (package
org.intellij.images.*) extracted to plugin - The dependency must be declared explicitly now:
- Add
<depends>com.intellij.platform.images</depends>inplugin.xml - Add to
build.gradle:intellij { plugins = ['platform-images'] }
- Add
Changes in Python plugin 2020.1
com.jetbrains.python.psi.PyCallExpression.PyMarkedCalleeclass removed- Use
com.jetbrains.python.psi.types.PyCallableTypeinstead. com.jetbrains.python.psi.PyCallExpression.multiResolveCalleemethod return type changed fromList<PyMarkedCallee>toList<PyCallableType>- Use
com.jetbrains.python.psi.types.PyCallableTypeinstead ofcom.jetbrains.python.psi.PyCallExpression.PyMarkedCallee.
Last modified: 25 March 2020