2021-12-09 15:55:32 +01:00

6.9 KiB

This page lists commonly used API annotated with org.jetbrains.annotations.ApiStatus.Internal which indicates it's private API and must not be used outside of IntelliJ Platform itself:

ApiStatus.Internal Javadoc:

Indicates that the annotated element (class, method, field, etc.) must not be considered as a public API. It's made visible to allow usages in other packages of the declaring library, but it must not be used outside of that library. Such elements may be renamed, changed or removed in future versions.

Such violations are reported from Plugin Verifier and are highlighted in the IDE using dedicated inspection.

Each entry is mapped to its corresponding Replacement, pointing to recommended API.

The list is not complete and will be updated continuously. Please check corresponding code documentation when encountering API not listed below.

{type="tip"}

IntelliJ Platform

Internal API Replacement
Module.getModuleFile() See Doc
Module.getModuleFilePath() See Doc
Module.getModuleTypeName() See Doc
ModuleTypeManager.registerModuleType() Use com.intellij.moduleType extension point instead, ModuleType
PlatformUtils See Doc
DefaultPicoContainer Use extension points and services
ApplicationLoadListener See
AnAction.applyTextOverride()
FileTypeIndex.NAME Use static methods in FileTypeIndex directly
IElementType.getDebugName() Override/use toString()
IndexingDataKeys See Doc
IconLoader.LazyIcon Use com.intellij.openapi.util.IconLoader.createLazy()
IconLoader.CachedImageIcon Use methods exposed in com.intellij.openapi.util.IconLoader
ScrollBarPainter See Doc
PluginManager.getLogger() Use own logger
EdtDataContext See Doc
PathMacros.setMacro() Use com.intellij.pathMacroContributor extension point, PathMacroContributor
ProjectLibraryTable Use com.intellij.openapi.roots.libraries.LibraryTablesRegistrar.getLibraryTable() instead
CompactVirtualFileSet Use com.intellij.openapi.vfs.VfsUtilCore#createCompactVirtualFileSet()
BuildNumber.currentVersion() Use com.intellij.openapi.application.ApplicationInfo.getBuild()
UtilKt.targetPresentation() See Doc

Plugins

Database Plugin

Internal API Replacement
DbDataSource.getDelegate() For connection config use DbDataSource#getConnectionConfig(), for LocalDataSource use DbImplUtil#getMaybeLocalDataSource(DasDataSource)