When writing new plugins, creating Components must be avoided. Any existing Components should be migrated to services, extensions, or listeners (see below).
Plugin Components are a legacy feature supported for compatibility with plugins created for older versions of the IntelliJ Platform. Plugins using Components don't support dynamic loading (the ability to install, update, and uninstall plugins without restarting the IDE).
Plugin Components are defined in the <application-components>
, <project-components>
, and <module-components>
sections in a Plugin Configuration File.
To migrate existing code from Components to modern APIs, see the following guidelines.
Manage StateTo manage some state or logic that is only necessary when the user performs a specific operation, use a Service.
Persisting StateTo store the state of your plugin at the application or project level, use a Service and implement the PersistentStateComponent
interface. See Persisting State of Components for details.
To subscribe to events, use a listener or create an extension for a dedicated extension point (for example, com.intellij.editorFactoryListener
) if one exists for the event to subscribe to.
Executing code on application startup should be avoided whenever possible because it slows down startup.
Plugin code should only be executed when projects are opened (see Project Open) or when the user invokes an action of a plugin. If this can't be avoided, add a listener subscribing to the AppLifecycleListener
topic. See also Running Tasks Once.
To execute code on project closing or application shutdown, implement the Disposable
interface in a Service and place the code in the dispose()
method. Alternatively, use Disposer.register()
passing a Project
or Application
service instance as the parent
argument (see Choosing a Disposable Parent).
06 May 2025
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4