aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2018-01-23 15:06:19 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2018-01-23 16:06:47 +0100
commit03aa0ebb6159dc2c4b0511282e4ed9a303109c55 (patch)
tree84de24be2cbfd3c824bee9de9d7be1a5d07d3c70 /sonar-plugin-api
parent34471db69adf3ca56fe4c17496c6c82ac6036c97 (diff)
downloadsonarqube-03aa0ebb6159dc2c4b0511282e4ed9a303109c55.tar.gz
sonarqube-03aa0ebb6159dc2c4b0511282e4ed9a303109c55.zip
SLCORE-167 Introduce a parameter to control SonarLint component lifecycle
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonarsource/api/sonarlint/SonarLintSide.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonarsource/api/sonarlint/SonarLintSide.java b/sonar-plugin-api/src/main/java/org/sonarsource/api/sonarlint/SonarLintSide.java
index 2922a23abd6..dff8698553e 100644
--- a/sonar-plugin-api/src/main/java/org/sonarsource/api/sonarlint/SonarLintSide.java
+++ b/sonar-plugin-api/src/main/java/org/sonarsource/api/sonarlint/SonarLintSide.java
@@ -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;
+
}