From 3c874b82f4dfbaeeb2b8413112b58acbc167d1f5 Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Wed, 31 Jul 2024 10:38:47 +0200 Subject: [PATCH] plugin_services.md: Workaround for "constructor" section title causing a TOC issue --- topics/basics/plugin_structure/plugin_extensions.md | 2 +- topics/basics/plugin_structure/plugin_services.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/topics/basics/plugin_structure/plugin_extensions.md b/topics/basics/plugin_structure/plugin_extensions.md index a1d264bba..de106ab3d 100644 --- a/topics/basics/plugin_structure/plugin_extensions.md +++ b/topics/basics/plugin_structure/plugin_extensions.md @@ -77,7 +77,7 @@ and one extension to access the `another.plugin.myExtensionPoint` extension poin Please note the following important points: - Extension implementation must be stateless. Use explicit [](plugin_services.md) for managing (runtime) data. -- Avoid any initialization in the constructor, see also notes for [Services](plugin_services.md#constructor). +- Avoid any initialization in the constructor, see also notes for [Services](plugin_services.md#ctor). - Do not perform any static initialization. Use inspection Plugin DevKit | Code | Static initialization in extension point implementations (2023.3). - An extension implementation must not be registered as [Service](plugin_services.md) additionally. Use inspection Plugin DevKit | Code | Extension registered as service/component (2023.3). diff --git a/topics/basics/plugin_structure/plugin_services.md b/topics/basics/plugin_structure/plugin_services.md index 2afcf0be2..575c90b76 100644 --- a/topics/basics/plugin_structure/plugin_services.md +++ b/topics/basics/plugin_structure/plugin_services.md @@ -29,6 +29,7 @@ For the latter two, a separate instance of the service is created for each insta {id="moduleServiceNote"} #### Constructor +{#ctor} To improve startup performance, avoid any heavy initializations in the constructor. @@ -59,7 +60,7 @@ The service instance will be created in scope according to the caller (see [](#r * None of these attributes is required: `os`, `client`, `overrides`, `id`, `preload`. * Service class must be `final`. -* [Constructor injection](#constructor) of dependency services is not supported. +* [Constructor injection](#ctor) of dependency services is not supported. * If application-level service is a [PersistentStateComponent](persisting_state_of_components.md), roaming must be disabled (`roamingType = RoamingType.DISABLED`). Use these inspections to verify these and highlight services that can be converted (2023.3):