Files
Yann Cébron 7bbd97677c [devkit] cleanup inspection descriptions
GitOrigin-RevId: d9bfdce9a581af49b9f743874a21d001dcc74403
2024-05-14 15:24:08 +00:00

31 lines
1.4 KiB
HTML

<html>
<body>
Reports services registered in <code>plugin.xml</code> that can be converted to light ones.
<p>
A service that is not intended for overriding is not required to be registered in the <code>plugin.xml</code> file.
Instead, annotate the service class with the <code>@com.intellij.openapi.components.Service</code> annotation. For
project-level services, specify <code>@Service(Service.Level.PROJECT)</code>.
<p>
Requirements:
<ul>
<li>IntelliJ Platform 2019.3 or newer.</li>
<li>Service class must be <code>final</code>.</li>
<li><code>serviceInterface</code> is not specified.</li>
<li>If the application-level service is a <code>com.intellij.openapi.components.PersistentStateComponent</code>,
roaming must be disabled (<code>roamingType = RoamingType.DISABLED</code>).
</li>
<li>None of these attributes is specified: <code>os</code>, <code>client</code>, <code>overrides</code>, <code>id</code>, <code>preload</code>,
<code>configurationSchemaKey</code>.</li>
</ul>
<p>Also reports services registered in <code>plugin.xml</code> whose classes are already annotated with <code>@Service</code>.
<p>
See <a href="https://plugins.jetbrains.com/docs/intellij/plugin-services.html">Services</a> in IntelliJ Platform Plugin SDK docs for more details.
</p>
<p>
See also the <code>Plugin DevKit | Code | A service can be converted to a light one</code> inspection.
</p>
<!-- tooltip end -->
<p><small>New in 2023.2</small>
</body>
</html>