Incompatible Changes in IntelliJ Platform and Plugins API 2020.*
Please see Verifying Plugin Compatibility on how to use Plugin Verifier and IDE inspections to check such problems.
Early Access Program (EAP) releases of upcoming versions are available here.
2020.3
IntelliJ Platform 2020.3
com.intellij.openapi.application.NonBlockingReadAction.finishOnUiThreadmethod parameter type changed fromConsumer<T>toConsumer<? super T>This may break source-compatibility with inheritors written in Kotlin.
com.intellij.openapi.diagnostic.ErrorReportSubmitter.submitmethod parameter type changed fromConsumer<SubmittedReportInfo>toConsumer<? super SubmittedReportInfo>This may break source-compatibility with inheritors written in Kotlin.
com.intellij.execution.ui.ConsoleView.attachToProcessmethodProcessHandlerparameter marked@NotNullThis may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.util.indexing.FileContentImpl(VirtualFile, byte[])constructor removedConstructors of
FileContentImplwere replaced with factory methods, useFileContentImpl#createByContent(VirtualFile, byte[]).com.intellij.spellchecker.quickfixes.ChangeTo(String)constructor removedReplaced with
ChangeTo(String, PsiElement, TextRange).com.intellij.spellchecker.tokenizer.SpellcheckingStrategy.getDefaultRegularFixes(boolean, String, PsiElement)method removedReplaced with
SpellcheckingStrategy.getDefaultRegularFixes(boolean, String, PsiElement, TextRange).com.intellij.psi.stubs.IStubElementType.createStubmethod parameter type changed fromStubElementtoStubElement<?>This may break source-compatibility with inheritors written in Kotlin.
com.intellij.execution.application.ApplicationConfiguration.isSwingInspectorEnabled()method removedThe Swing Inspector functionality has been removed from the product.
com.intellij.execution.application.ApplicationConfiguration.setSwingInspectorEnabled(boolean)method removedThe Swing Inspector functionality has been removed from the product.
show.swing.inspectorproperty removed from resource bundlemessages.ExecutionBundleThe Swing Inspector functionality has been removed from the product.
show.swing.inspector.disabledproperty removed from resource bundlemessages.ExecutionBundleThe Swing Inspector functionality has been removed from the product.
Java Plugin 2020.3
- The PSI structure of multi-dimensional arrays in Java source files changed (see
com.intellij.psi.PsiTypeElement) Now the children are flattened: brackets for all the dimensions are direct children of the
PsiTypeElementthat represent the multi-dimensional array. This change doesn't break source or binary compatibility but may produce behavioral changes in the code that traverses the tree of Java source files.- The
com.intellij.psi.PsiAnnotation.getOwnermethod now returnsPsiTypeinstead ofPsiTypeElementfor type annotations in Java source files This change supports identifying whether a type annotation is attached to an inner class or a particular dimension of a multi-dimensional array. This change doesn't break source or binary compatibility but may produce behavioral changes for callers.
PhpStorm and PHP Plugin 2020.3
- Added PHP 8 support
Python Plugin 2020.3
- All parameters in
com.jetbrains.python.psi.PyElementVisitormarked@NotNull This may break source-compatibility with inheritors written in Kotlin.
com.jetbrains.python.parsing.ParsingContext(SyntaxTreeBuilder, LanguageLevel, StatementParsing.FUTURE)method parameterStatementParsing.FUTUREremovedIt is no longer used in parsing.
com.jetbrains.python.parsing.StatementParsing(ParsingContext, StatementParsing.FUTURE)method parameterStatementParsing.FUTUREremovedIt is no longer used in parsing.
com.jetbrains.python.parsing.StatementParsing.FUTUREclass removedUse
com.jetbrains.python.psi.FutureFeatureinstead.com.jetbrains.python.sdk.PythonSdkUpdater.updateOrShowError(Sdk, SdkModificator, Project, Component)method parameterSdkModificatorremovedIt was not processed carefully, it should be enough to pass editable SDK instead.
python.sdk.interpreter.field.is.emptyproperty removed from resource bundlemessages.PyBundleUse
python.sdk.field.is.emptyfrommessages.PySdkBundleinstead.base.interpreterproperty removed from resource bundlemessages.PyBundleUse
python.venv.base.labelfrommessages.PySdkBundleinstead.interpreterproperty removed from resource bundlemessages.PyBundleUse
python.interpreter.labelfrommessages.PySdkBundleinstead.com.jetbrains.python.psi.LanguageLevel.hasWithStatement()method removedIt is
truefor all supported python versions.
CLion/AppCode 2020.3
- Required changes in project setup
When targeting 2020.3, please see this migration guide.
2020.2
IntelliJ Platform 2020.2
- Support for JavaFX deprecated
Plugins should migrate to JCEF. Alternatively, add an explicit dependency on JavaFX Runtime for Plugins.
com.intellij.psi.util.PsiTreeUtil.processElements(element, processor)method parameter type changed fromPsiElementProcessortoPsiElementProcessor<PsiElement>This may break source-compatibility with clients that pass a more specific processor. Passing a more specific processor was illegal before 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 filters by element class. 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.com.maddyhome.idea.copyright.util.FileTypeUtil.getFileTypeByName(String)method removedThis was an internal utility method not intended for use in plugins. Use
FileTypeManager.getInstance().findFileTypeByName()instead.javassistpackage removedJavassist library was removed, bundle it with your plugin instead.
com.intellij.compiler.backwardRefs.LanguageCompilerRefAdapter.INSTANCESfield removedThis field leaked instances of plugin's extensions on plugin unloading. Use
com.intellij.compiler.backwardRefs.LanguageCompilerRefAdapter#EP_NAME.getExtensionList()directly instead.groovy.util.AntBuilderclass removedAdd
org.codehaus.groovy:groovy-antdependency.groovy.util.GroovyTestCaseclass removedAdd
org.codehaus.groovy:groovy-testdependency.groovy.util.GroovyTestSuiteclass removedAdd
org.codehaus.groovy:groovy-testdependency.groovy.json.internalpackage removedUse classes from
org.apache.groovy.json.internalpackage.com.intellij.openapi.externalSystem.service.execution.TaskCompletionProvider(Project, ProjectSystemId, TextAccessor, Options)constructor parameter type changed fromgroovyjarjarcommonscli.Optionstoorg.apache.commons.cli.OptionsUpdate inheritors accordingly.
org.jetbrains.plugins.gradle.service.execution.cmd.GradleCommandLineOptionsProvider.getSupportedOptions()method return type changed fromgroovyjarjarcommonscli.Optionstoorg.apache.commons.cli.OptionsUpdate call sites accordingly.
com.intellij.openapi.editor.markup.MarkupModel.addLineHighlighter(TextAttributesKey, int, int)abstract method addedUse it instead of
MarkupModel.addLineHighlighter(int, int, TextAttributes).com.intellij.openapi.editor.markup.MarkupModel.addRangeHighlighter(TextAttributesKey, int, int, int, HighlighterTargetArea)abstract method addedUse it instead of
MarkupModel.addRangeHighlighter(int, int, int, TextAttributes, HighlighterTargetArea).com.intellij.codeInsight.daemon.LineMarkerProvider.getLineMarkerInfomethod return type changed fromLineMarkerInfotoLineMarkerInfo<?>This may break source-compatibility with inheritors written in Kotlin.
com.intellij.codeInsight.daemon.LineMarkerProvider.collectSlowLineMarkersmethod parameter type changed fromList<PsiElement>toList<? extends PsiElement>This may break source-compatibility with inheritors written in Kotlin.
com.intellij.codeInsight.daemon.LineMarkerProvider.collectSlowLineMarkersmethod parameter type changed fromList<PsiElement>toCollection<? super LineMarkerInfo<?>>This may break source-compatibility with inheritors written in Kotlin.
com.intellij.util.indexing.FileBasedIndex.FileTypeSpecificInputFilter.registerFileTypesUsedForIndexingmethod parameter type changed fromConsumer<FileType>toConsumer<? super FileType>This may break source-compatibility with inheritors written in Kotlin.
com.intellij.psi.impl.include.FileIncludeProvider.registerFileTypesUsedForIndexingmethod parameter type changed fromConsumer<FileType>toConsumer<? super FileType>This may break source-compatibility with inheritors written in Kotlin.
com.intellij.codeInsight.highlighting.HighlightUsagesHandlerBase.selectTargetsmethod parameter type changed fromList<T>toList<? extends T>This may break source-compatibility with inheritors written in Kotlin.
com.intellij.codeInsight.highlighting.HighlightUsagesHandlerBase.selectTargetsmethod parameter type changed fromConsumer<List<? extends T>>toConsumer<? super List<? extends T>>This may break source-compatibility with inheritors written in Kotlin.
com.intellij.codeInsight.highlighting.HighlightUsagesHandlerBase.computeUsagesmethod parameter type changed fromList<T>toList<? extends T>This may break source-compatibility with inheritors written in Kotlin.
com.intellij.pom.java.LanguageLevel.JDK_13_PREVIEWfield removedPlease remove the plugin code supporting Java 13 language level features. IntelliJ IDEA supports preview features of the latest Java release and one upcoming release (if available).
VCS
com.intellij.diff.util.DiffUserDataKeysEx.REVISION_INFOfield removedUse
com.intellij.diff.DiffVcsDataKeys.REVISION_INFOinstead.com.intellij.codeInsight.actions.FormatChangedTextUtil.getChangedElements(Project, Change[], Function)method removedUse
com.intellij.codeInsight.actions.VcsFacadeImpl.getVcsInstance().getChangedElements(...)instead.
GitHub Plugin 2020.2
org.jetbrains.plugins.github.util.LazyCancellableBackgroundProcessValue(ProgressManager)constructor removedRequired for more tight control of task scheduling. Use
org.jetbrains.plugins.github.util.LazyCancellableBackgroundProcessValue.Companion#create(ProgressManager, (ProgressIndicator) -> T)instead of subclassing.org.jetbrains.plugins.github.util.LazyCancellableBackgroundProcessValue.compute(ProgressIndicator)method return type changed fromTtoCompletableFuture<T>Required for more tight control of task scheduling. Use
org.jetbrains.plugins.github.util.LazyCancellableBackgroundProcessValue.Companion#create(ProgressManager, (ProgressIndicator) -> T)instead of subclassing.org.jetbrains.plugins.github.pullrequest.ui.GHCompletableFutureLoadingModel()constructor removedModel was made disposable and it is now required to pass parent disposable in constructor.
org.jetbrains.plugins.github.util.GithubGitHelper.getPossibleRemoteUrlCoordinates()method removedUse
org.jetbrains.plugins.github.util.GHProjectRepositoriesManager.getKnownRepositories()instead.
Groovy Plugin 2020.2
org.jetbrains.plugins.groovy.formatter.AlignmentProvider.addPairmethod parameter type changed fromBooleantobooleanPlease adjust/recompile the code.
Java EE Plugins 2020.2
- Java EE plugins split
Plugin
com.intellij.javaeeJava EE: EJB, JPA, Servlets has been split to:com.inteellij.javaeeJava EE Platform - main plugin other JavaEE/Jakarta plugins depend oncom.intellij.javaee.app.servers.integrationJava EE: Application Servers Integrationcom.intellij.javaee.ejbJava EE: Enterprise Java Beans (EJB)com.intellij.javaee.jpaJava EE: JPAcom.intellij.javaee.webJava EE: Web/Servlets
JavaScript Plugin 2020.2
com.intellij.lang.javascript.linter.jslintpackage removedJSLint functionality has been unbundled and moved to a separate plugin. Issue
PhpStorm and PHP Plugin 2020.2
- Added Union Types Support
Kotlin Plugin 1.4
org.jetbrains.kotlin.idea.core.formatter.KotlinCodeStyleSettings.PACKAGES_TO_USE_STAR_IMPORTSfield type changed fromPackageEntryTabletoKotlinPackageEntryTableThis change was required to implement import layout order for Kotlin.
KotlinPackageEntryTablecan be used in the same manner asPackageEntryTable.
Python Plugin 2020.2
com.jetbrains.python.PythonDialectsTokenSetProvider.INSTANCEfield removedPythonDialectsTokenSetProviderbecame an application service, usePythonDialectsTokenSetProvider.getInstance()instead.com.jetbrains.python.psi.PyUtil.getLanguageLevelForVirtualFile(Project, VirtualFile)method removedUse
PythonLanguageLevelPusher.getLanguageLevelForVirtualFile(Project, VirtualFile)instead.
2020.1
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 abstractImplement it in
ModuleLevelBuilder's implementation.com.intellij.codeInsight.TargetElementUtilBaseclass removedUse
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@NotNullThis may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitFilemethodPsiFileparameter marked@NotNullThis may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitBinaryFilemethodPsiBinaryFileparameter marked@NotNullThis may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitPlainTextFilemethodPsiPlainTextFileparameter marked@NotNullThis may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitErrorElementmethodPsiErrorElementparameter marked@NotNullThis may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitPlainTextmethodPsiPlainTextparameter marked@NotNullThis may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitDirectorymethodPsiDirectoryparameter marked@NotNullThis may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitCommentmethodPsiCommentparameter marked@NotNullThis may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitWhiteSpacemethodPsiWhiteSpaceparameter marked@NotNullThis may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.psi.PsiElementVisitor.visitOuterLanguageElementmethodOuterLanguageElementparameter marked@NotNullThis may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.codeInspection.unused.ImplicitPropertyUsageProvider.isUsedmethodPropertyparameter marked@NotNullThis may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.intellij.lang.ReadOnlyASTNodeclass removedUse
com.intellij.testFramework.ReadOnlyLightVirtualFile-based PSI instead.- Java code migrated to use
TYPE_USEnullability annotations In rare cases existing Kotlin code might become uncompilable due to some problems in the Kotlin compiler: if a method is used or overridden, and is written in Java, and returns an array annotated as
@Nullableor@NotNull.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 by the
<depends>element:Add
<depends>com.intellij.platform.images</depends>in plugin.xmlAdd to build.gradle:
intellij { plugins = ['platform-images'] }If your plugin depends on other plugins using
com.intellij.platform.images(e.g., CSS), please make sure to usegradle-intellij-plugin>=0.4.19
Python Plugin 2020.1
com.jetbrains.python.psi.PyCallExpression.PyMarkedCalleeclass removedUse
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.