]> source.dussan.org Git - sonarqube.git/commitdiff
SLCORE-167 Introduce a parameter to control SonarLint component lifecycle
authorJulien HENRY <julien.henry@sonarsource.com>
Tue, 23 Jan 2018 14:06:19 +0000 (15:06 +0100)
committerJulien HENRY <julien.henry@sonarsource.com>
Tue, 23 Jan 2018 15:06:47 +0000 (16:06 +0100)
sonar-plugin-api/src/main/java/org/sonarsource/api/sonarlint/SonarLintSide.java

index 2922a23abd69a6e18e758dff95598b99665804bc..dff8698553e964557729ebc3895956006cb0cebc 100644 (file)
@@ -49,4 +49,21 @@ import java.lang.annotation.Target;
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.TYPE)
 public @interface SonarLintSide {
+
+  /**
+   * The component will be instantiated for each analysis (could be single or multiple files analysis).
+   */
+  String SINGLE_ANALYSIS = "SINGLE_ANALYSIS";
+
+  /**
+   * The component will be instantiated once and reused by all analyses, as long as the SonarLint engine is not restarted.
+   */
+  String MULTIPLE_ANALYSES = "MULTIPLE_ANALYSES";
+
+  /**
+   * Control the lifecycle of the component in the IoC container.
+   * @since 7.0
+   */
+  String lifespan() default SINGLE_ANALYSIS;
+
 }