mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
During the decoupling of ide.core and ide.core.impl modules from platform.ide and platofrm.ide.impl there were some incompatible changes that couldn't be avoided. The main reason for it was that there were dependency on the UI sepcific implementations in the API, which in general should be avoided.
16 KiB
16 KiB
Please see Incompatible API Changes on how to verify compatibility.
Changes from API marked with
org.jetbrains.annotations.ApiStatus
@Experimental
,@ScheduledForRemoval
, or@Internal
are not listed here, as incompatible changes are to be expected.
{type="note"}
Java 11 is required (blog post) when targeting 2020.3 and later only.
Please make sure to always upgrade to the latest version of
gradle-intellij-plugin
.
{type="note"}
2021.3
Changes in IntelliJ Platform 2021.3
com.intellij.ui.mac.MacMessages.showMessageDialog(String, String, String[], boolean, Window, int, int, DialogWrapper.DoNotAskOption) : int
method removed- Use
com.intellij.ui.mac.MacMessages.showMessageDialog(String, String, String[], boolean, Window, int, int, DoNotAskOption) : int
instead com.intellij.openapi.ui.MessageDialogBuilder.doNotAsk(DialogWrapper.DoNotAskOption)
method removed- Use
com.intellij.openapi.ui.MessageDialogBuilder.doNotAsk(DoNotAskOption)
instead com.intellij.ide.util.projectWizard.WizardContext.getWizard() : AbstractWizard
method removed- Use
ccom.intellij.ide.util.projectWizard.WizardContext.getUserData(AbstractWizard.KEY)
instead com.intellij.openapi.ui.TextComponentAccessor.TEXT_FIELD_WITH_HISTORY_WHOLE_TEXT : TextComponentAccessor
field removed- Use
com.intellij.openapi.ui.TextComponentAccessors.TEXT_FIELD_WITH_HISTORY_WHOLE_TEXT
instead com.intellij.execution.process.ColoredOutputTypeRegistry.getAnsiColorKey(int)
method removed- Use
com.intellij.execution.process.ColoredOutputTypeRegistryImpl.getAnsiColorKey(int)
instead com.intellij.openapi.fileEditor.impl.EditorTabPresentationUtil.getEditorTabTitle(Project, VirtualFile, EditorWindow)
method parameterEditorWindow
removed- This parameter never needed, but lead to code coupling
com.intellij.openapi.fileEditor.impl.EditorTabPresentationUtil.getUniqueEditorTabTitle(Project, VirtualFile, EditorWindow)
method parameterEditorWindow
removed- This parameter never needed, but lead to code coupling
com.intellij.openapi.fileEditor.impl.EditorTabTitleProvider.getEditorTabTitle(Project, VirtualFile, EditorWindow)
method parameterEditorWindow
removed- This parameter never needed, but lead to code coupling
2021.2
Changes in IntelliJ Platform 2021.2
com.intellij.openapi.editor.impl.event.DocumentEventImpl.translateLineViaDiff(int)
method removed- Use persistent range markers instead, see
com.intellij.openapi.editor.Document.createRangeMarker(int, int, boolean)
withsurviveOnExternalChange=true
. com.intellij.openapi.editor.impl.event.DocumentEventImpl.translateLineViaDiffStrict(int)
method removed- Use persistent range markers instead, see
com.intellij.openapi.editor.Document.createRangeMarker(int, int, boolean)
withsurviveOnExternalChange=true
. com.intellij.openapi.file.exclude.EnforcedPlainTextFileType
class removed- Use
com.intellij.openapi.fileTypes.PlainTextFileType
instead. com.intellij.openapi.updateSettings.impl.CheckForUpdateResult
class removed- Use
com.intellij.openapi.updateSettings.impl.PlatformUpdates
instead. com.intellij.openapi.updateSettings.impl.UpdateStrategy.checkForUpdates()
method return type changed fromcom.intellij.openapi.updateSettings.impl.CheckForUpdateResult
tocom.intellij.openapi.updateSettings.impl.PlatformUpdates
- Use
com.intellij.openapi.updateSettings.impl.PlatformUpdates
instead ofcom.intellij.openapi.updateSettings.impl.CheckForUpdateResult
. com.intellij.openapi.updateSettings.impl.pluginsAdvertisement.PluginsAdvertiser.Plugin
class removed- Use
com.intellij.ide.plugins.advertiser.PluginData
instead. com.intellij.ide.plugins.DisabledPluginsState.disablePlugin(PluginId)
method removed- Use either
com.intellij.ide.plugins.PluginManagerCore.disablePlugin(PluginId)
orcom.intellij.ide.plugins.PluginEnabler.disablePlugins(Collection)
instead. com.intellij.ide.plugins.PluginManagerMain.suggestToEnableInstalledDependantPlugins(PluginEnabler, List)
method parameter type changed fromcom.intellij.ide.plugins.PluginManagerMain.PluginEnabler
tocom.intellij.ide.plugins.PluginEnabler
com.intellij.ide.plugins.PluginManagerMain.PluginEnabler
has been renamed tocom.intellij.ide.plugins.PluginEnabler
.com.intellij.ssh.ui.unified.SshConfigConfigurable.Visibility
class removed- Use
com.intellij.ssh.ui.unified.SshConfigVisibility
instead. com.intellij.ssh.ui.unified.SshConfigComboBox.reload(PresentableId, SshConfigConfigurable.Visibility)
method parameter type changed fromcom.intellij.ssh.ui.unified.SshConfigConfigurable.Visibility
tocom.intellij.ssh.ui.unified.SshConfigVisibility
SshConfigConfigurable.Visibility
has been renamed toSshConfigVisibility
.com.intellij.ssh.ui.unified.SshConfigComboBox(Project, Disposable, SshConfigConfigurable.Visibility)
constructor parameter type changed fromcom.intellij.ssh.ui.unified.SshConfigConfigurable.Visibility
tocom.intellij.ssh.ui.unified.SshConfigVisibility
SshConfigConfigurable.Visibility
has been renamed toSshConfigVisibility
.org.jetbrains.uast.UAnnotated.getAnnotations()
method removed- Use
org.jetbrains.uast.UAnnotated.getUAnnotations()
instead. org.jetbrains.uast.UAnnotated.getUAnnotations()
marked abstract- Previously this circularly referenced
org.jetbrains.uast.UAnnotated.getAnnotations()
, which has been removed.
Performance Testing Plugin 2021.2
com.jetbrains.performancePlugin.CommandProvider.getCommands()
method return type changed fromjava.util.List
tojava.util.Map
- Use
java.util.List
instead ofjava.util.Map
.
Database Plugin 2021.2
com.intellij.database.dataSource.DatabaseCredentialsAuthProvider.UserWidget
class removed- Use
com.intellij.database.dataSource.DatabaseCredentialsAuthProviderUi.UserWidget
instead. com.intellij.database.actions.DdlActions.DeleteProvider1
class removed- Use
com.intellij.database.actions.DbDeleteProvider.getDeleteProvider()
instead. com.intellij.database.model.RawConnectionConfig.getEffectiveUrl(Project)
method removed- Use
com.intellij.database.model.RawConnectionConfig.getUrl()
instead. Or usecom.intellij.database.dataSource.DatabaseConnectionEstablisher.processInterceptors()
GitHub Plugin 2021.2
org.jetbrains.plugins.github.util.GithubAuthData
class removed- Use
org.jetbrains.plugins.github.authentication.GithubAuthenticationManager
instead. org.jetbrains.plugins.github.util.GithubAuthData$BasicAuth
class removed- Use
org.jetbrains.plugins.github.authentication.GithubAuthenticationManager
instead. org.jetbrains.plugins.github.util.GithubSettings.getAuthData(GithubAuthData)
method removed- Use
org.jetbrains.plugins.github.authentication.GithubAuthenticationManager
instead. org.jetbrains.plugins.github.util.GithubSettings.getLogin
method removed- Use
org.jetbrains.plugins.github.authentication.GithubAuthenticationManager
instead. org.jetbrains.plugins.github.util.GithubSettings.isAuthConfigured
method removed- Use
org.jetbrains.plugins.github.authentication.GithubAuthenticationManager
instead.
Spring Plugin 2021.2
icons.SpringApiIcons
class moved to packagecom.intellij.spring
- Use
com.intellij.spring.SpringApiIcons
instead. icons.SpringApiIcons.Gutter
class moved to packagecom.intellij.spring
- Use
com.intellij.spring.SpringApiIcons.Gutter
instead.
Python Plugin 2021.2.1
com.jetbrains.python.psi.types.PyTypedDictType.Companion.match(PyTypedDictType, PyDictLiteralExpression, TypeEvalContext)
method removed- As the result of the refactoring aimed at fixing https://youtrack.jetbrains.com/issue/PY-48799, for dict literals containing only string keys we infer PyTypedDictType now, so there's no need to match dict literals with TypedDicts. There's a new method for comparing the inferred TypedDicts with the given ones:
com.jetbrains.python.psi.types.PyTypedDictType.Companion.match(PyType, PyTypedDictType, TypeEvalContext)
.
2021.1
Changes in IntelliJ Platform 2021.1
com.intellij.util.io.PersistentHashMap.isCorrupted
method removed- The storage checks for corruption automatically, there is no need of any explicit additional checks.
com.intellij.lang.StdLanguages.JSPX
field removed- Add a dependency on the
com.intellij.jsp
plugin and replace the reference withcom.intellij.lang.jspx.JspxLanguageImpl.INSTANCE
com.intellij.lang.StdLanguages.JSP
field removed- Add a dependency on the
com.intellij.jsp
plugin and replace the reference withcom.intellij.lang.jsp.NewJspLanguage.getInstance()
com.intellij.ide.actions.searcheverywhere.SEResultsEqualityProvider.compareItems(alreadyFoundItem)
method parameter type changed fromSearchEverywhereFoundElementInfo
toList<SearchEverywhereFoundElementInfo>
- New API is more abstract which allows to review all already found items before making "deduplication" decision. Also consider implementing
com.intellij.ide.actions.searcheverywhere.AbstractEqualityProvider
instead ofcom.intellij.ide.actions.searcheverywhere.SEResultsEqualityProvider
. com.intellij.ide.actions.searcheverywhere.SEResultsEqualityProvider.SEEqualElementsActionType.SKIP
field removed- Enum class
SEEqualElementsActionType
was converted to sealed class with the same name. com.intellij.ide.actions.searcheverywhere.SEResultsEqualityProvider.SEEqualElementsActionType.DO_NOTHING
field removed- Enum class
SEEqualElementsActionType
was converted to sealed class with the same name. com.intellij.ide.actions.searcheverywhere.SEResultsEqualityProvider.SEEqualElementsActionType.Replace
field removed- Enum class
SEEqualElementsActionType
was converted to sealed class with the same name. org.sqlite.SQLiteConfig.setBusyTimeout(String)
method parameter type changed fromString
toint
- Please use updated sqlite-jdbc api.
com.intellij.usages.impl.rules.UsageTypeProvider.getUsageType
methodPsiElement
parameter marked@NotNull
- This may break source-compatibility with inheritors written in Kotlin if they declare parameter type as nullable.
com.jetbrains.performancePlugin.CommandProvider.getCommands(Project)
method parameterProject
removed- Project is now only accessible via
com.intellij.openapi.ui.playback.PlaybackContext.getProject()
since it may change during script execution. - JSON Widget suppressor EP
com.intellij.json.jsonWidgetSuppressor
- Override new method
JsonWidgetSuppressor.isCandidateForSuppress(VirtualFile, Project)
for quick check in EDT beforesuppressSwitcherWidget()
is called on background thread.
Changes in HTTP Client Plugin 2021.1
com.intellij.ws.rest.client
package removed- Replaced by
com.intellij.httpClient.execution
in HTTP Client plugin com.intellij.ws.actions
package removed- Replaced by
com.intellij.httpClient.actions
in HTTP Client plugin com.intellij.ws.converters
package removed- Replaced by
com.intellij.httpClient.converters
in HTTP Client plugin com.intellij.ws.http.request
package removed- Replaced by
com.intellij.httpClient.http.request
in HTTP Client plugin
Java UML Plugin 2021.1
- Rename of packages to
.java.
specific variants - A number of packages have been renamed:
com.intellij.uml.utils
becomescom.intellij.uml.java.utils
,com.intellij.uml.project
becomescom.intellij.uml.java.project
, andcom.intellij.uml.jigsaw
becomescom.intellij.uml.java.jigsaw
.
Kotlin Plugin 2021.1
org.jetbrains.kotlin.idea.refactoring.changeSignature.KotlinChangeInfo(KotlinMethodDescriptor, String, KotlinTypeInfo, Visibility, List, KotlinParameterInfo, PsiElement, Collection)
constructor parameter type changed fromorg.jetbrains.kotlin.descriptors.Visibility
toorg.jetbrains.kotlin.descriptors.DescriptorVisibility
Visibility
has been renamed toDescriptorVisibility
.
Go Plugin 2021.1
com.goide.sdk.combobox.GoSdkChooserCombo.getSdk
method moved to the superclass- Recompile the dependant code.