diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2014-01-28 20:57:40 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2014-01-29 16:01:07 +0100 |
commit | 472ec163c6b9a69ee64597abea99392e776c1f9e (patch) | |
tree | 821810cf75500fe6423acf6dd8235ba64c821792 /sonar-plugin-api | |
parent | 55a3c42c91b46a02ea5fe98425f14a2892c956cf (diff) | |
download | sonarqube-472ec163c6b9a69ee64597abea99392e776c1f9e.tar.gz sonarqube-472ec163c6b9a69ee64597abea99392e776c1f9e.zip |
SONAR-926 Improve FileLineContextFactory to support InputFile
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/batch/Sensor.java | 14 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/measures/FileLinesContextFactory.java | 3 |
2 files changed, 10 insertions, 7 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/Sensor.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/Sensor.java index 989a4177cda..ded6dc9dcde 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/Sensor.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/Sensor.java @@ -28,24 +28,24 @@ import org.sonar.api.resources.Project; * generally used to add measure at the lowest level of the resource tree. A sensor can access and save measures on the whole tree of * resources. * </p> - * + * * <p> * For example the Cobertura Sensor parses Cobertura report and saves the first-level of measures on resources. * </p> - * + * * <p> * A particular attention should be given to resource exclusion. Sonar already manages exclusions at file level : if you try to save a * measure on a resource that is excluded in the settings, then Sonar will not save the measure. When handling a plugin or an external tool, * you should make sure that exclusions are passed if you are going to get back consolidated data. * </p> - * + * * @since 1.10 */ public interface Sensor extends BatchExtension, CheckProject { /** * Sensors that depend upon Squid must declare the following method : - * + * * <pre> * @DependsUpon * public String dependsUponSquidAnalysis() { @@ -57,10 +57,10 @@ public interface Sensor extends BatchExtension, CheckProject { /** * The method that is going to be run when the sensor is called - * - * @param project the project the sensor runs on + * + * @param module the module the sensor runs on * @param context the context */ - void analyse(Project project, SensorContext context); + void analyse(Project module, SensorContext context); } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/FileLinesContextFactory.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/FileLinesContextFactory.java index e86bbc9fe2f..d9908d4583b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/FileLinesContextFactory.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/FileLinesContextFactory.java @@ -22,6 +22,7 @@ package org.sonar.api.measures; import com.google.common.annotations.Beta; import org.sonar.api.BatchComponent; import org.sonar.api.resources.Resource; +import org.sonar.api.scan.filesystem.InputFile; /** * <p>This interface is not intended to be implemented by clients.</p> @@ -33,4 +34,6 @@ public interface FileLinesContextFactory extends BatchComponent { FileLinesContext createFor(Resource resource); + FileLinesContext createFor(InputFile inputFile); + } |