A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://plugins.jetbrains.com/docs/intellij/plugin-components.html below:

Components (Deprecated) | IntelliJ Platform Plugin SDK

Components (Deprecated)

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.

Migration

To migrate existing code from Components to modern APIs, see the following guidelines.

Manage State

To manage some state or logic that is only necessary when the user performs a specific operation, use a Service.

Persisting State

To 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.

Subscribing to Events

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.

Application Startup

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.

Project Open Project and Application Close

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