plugin.xml
中注册的可被转换为轻量服务的服务。
不打算重写的服务无需在 plugin.xml
文件中注册。
可以改用 @com.intellij.openapi.components.Service
注解来注解服务类。 对于项目级服务,请指定@Service(Service.Level.PROJECT)
。
要求:
final
。serviceInterface
。com.intellij.openapi.components.PersistentStateComponent
,则必须禁用漫游 (roamingType = RoamingType.DISABLED
)。
os
、client
、overrides
、id
、preload
、configurationSchemaKey
。同时报告在 plugin.xml
中注册的类已使用 @Service
注解的服务。
如需了解详情,请参阅 IntelliJ 平台插件 SDK 文档中的服务。
另请参阅 Plugin DevKit | 代码 | 服务可被转换为轻量服务
检查。
2023.2 最新变化