diff --git a/fr.cnes.analysis.tools.analyzer/src/fr/cnes/analysis/tools/analyzer/datas/AbstractRule.java b/fr.cnes.analysis.tools.analyzer/src/fr/cnes/analysis/tools/analyzer/datas/AbstractRule.java index 0893408d..1135e794 100755 --- a/fr.cnes.analysis.tools.analyzer/src/fr/cnes/analysis/tools/analyzer/datas/AbstractRule.java +++ b/fr.cnes.analysis.tools.analyzer/src/fr/cnes/analysis/tools/analyzer/datas/AbstractRule.java @@ -22,35 +22,34 @@ public abstract class AbstractRule extends AbstractEvaluation { /** Analysed file. */ private File file; - /** List of violations found during analysis. **/ + /** List of {@link CheckResult} found during analysis. **/ private List checkResults; private CheckResult checkResult;// TODO à voir pour l'enlever /** - * Getter for the list of violations. + * Getter for the list of {@link CheckResult}. * - * @return the violations + * @return the {@link CheckResult}s */ public List getCheckResults() { return this.checkResults; } /** - * Setter for the list of violations. + * Setter for the list of {@link CheckResult}s. * * @param pCheckResults - * the violations to set + * the {@link CheckResult}s to set */ - public void setViolations(final List pCheckResults) { + public void setCheckResults(final List pCheckResults) { this.checkResults = pCheckResults; } /** * Run analysis for considering file and rule. * - * @return list of {@link fr.cnes.analysis.tools.analyzer.datas.Violation} - * found during analysis + * @return list of {@link CheckResult}s found during analysis * @throws IOException * IO problem occurred * @throws JFlexException @@ -59,7 +58,7 @@ public void setViolations(final List pCheckResults) { public abstract List run() throws IOException, JFlexException; /** - * Method to add a violation, knowing its location and line. + * Method to add a {@link CheckResult}, knowing its location and line. * * @param pLocation * the location @@ -86,7 +85,7 @@ protected void setError(final String pLocation, final String pMessage, final int } /** - * Method to add a violation, knowing its location and line. + * Method to add a {@link CheckResult}, knowing its location and line. * * @param pLocation * the location diff --git a/fr.cnes.analysis.tools.analyzer/src/fr/cnes/analysis/tools/analyzer/datas/CheckResult.java b/fr.cnes.analysis.tools.analyzer/src/fr/cnes/analysis/tools/analyzer/datas/CheckResult.java index 1060ad4e..867b8aeb 100644 --- a/fr.cnes.analysis.tools.analyzer/src/fr/cnes/analysis/tools/analyzer/datas/CheckResult.java +++ b/fr.cnes.analysis.tools.analyzer/src/fr/cnes/analysis/tools/analyzer/datas/CheckResult.java @@ -31,7 +31,7 @@ public class CheckResult { /** Check line. */ private Integer line; - /** Violation message. */ + /** {@link CheckResult} message. */ private String message; /** Metric value. */ diff --git a/fr.cnes.analysis.tools.analyzer/src/fr/cnes/analysis/tools/analyzer/datas/Checker.java b/fr.cnes.analysis.tools.analyzer/src/fr/cnes/analysis/tools/analyzer/datas/Checker.java index bc31688b..3f1188ef 100644 --- a/fr.cnes.analysis.tools.analyzer/src/fr/cnes/analysis/tools/analyzer/datas/Checker.java +++ b/fr.cnes.analysis.tools.analyzer/src/fr/cnes/analysis/tools/analyzer/datas/Checker.java @@ -22,13 +22,13 @@ public class Checker { private List checkResults = new LinkedList();; /** - * Method to add a violation, knowing its location and line. + * Method to add a {@link CheckResult}, knowing its location and line. * * @param pLocation * the location * * @param pMessage - * violation's message + * {@link CheckResult}'s message * @param pLine * the line * @throws JFlexException diff --git a/fr.cnes.analysis.tools.export.csv/src/fr/cnes/analysis/tools/export/csv/ExportCsv.java b/fr.cnes.analysis.tools.export.csv/src/fr/cnes/analysis/tools/export/csv/ExportCsv.java index 7878515f..6912386e 100644 --- a/fr.cnes.analysis.tools.export.csv/src/fr/cnes/analysis/tools/export/csv/ExportCsv.java +++ b/fr.cnes.analysis.tools.export.csv/src/fr/cnes/analysis/tools/export/csv/ExportCsv.java @@ -23,7 +23,7 @@ *

*

* This class is responsible of the export in the format CSV of - * {@link Violation} elements into a {@link File}. + * {@link CheckResult} elements into a {@link File}. *

* * @since 3.0 diff --git a/fr.cnes.analysis.tools.export.xml/src/fr/cnes/analysis/tools/export/xml/ExportXml.java b/fr.cnes.analysis.tools.export.xml/src/fr/cnes/analysis/tools/export/xml/ExportXml.java index efb44d5c..eb59e6ad 100644 --- a/fr.cnes.analysis.tools.export.xml/src/fr/cnes/analysis/tools/export/xml/ExportXml.java +++ b/fr.cnes.analysis.tools.export.xml/src/fr/cnes/analysis/tools/export/xml/ExportXml.java @@ -24,7 +24,7 @@ *

*

* This class is responsible of the export in the format XML of - * {@link Violation} elements into a {@link File}. + * {@link CheckResult} elements into a {@link File}. *

* * @since 3.0 @@ -91,7 +91,7 @@ public void export(List checkResults, File outputFile) throws IOExc document.getRootElement().addContent(analysisInformation); // -- - for (final CheckResult violation : checkResults) { + for (final CheckResult checkResult : checkResults) { attributes.clear(); // -- checkResults, File outputFile) throws IOExc // get // the filename. // -- - final String language = this.getFileExtension(violation.getFile().getAbsolutePath()); - final String fileName = violation.getFile().toString(); + final String language = this.getFileExtension(checkResult.getFile().getAbsolutePath()); + final String fileName = checkResult.getFile().toString(); // The analysisFile element is being added only and only if it's not // already in the XML document. boolean analysisFileMarked = false; @@ -122,13 +122,13 @@ public void export(List checkResults, File outputFile) throws IOExc Element result = null; Element analysisRule = null; int resultId = 1; - for (final CheckResult violation : checkResults) { + for (final CheckResult checkResult : checkResults) { boolean elementAlreadyExisting = false; Element existingElement = null; for (final Element element : document.getRootElement().getChildren("analysisRule")) { for (final Attribute attribute : element.getAttributes()) { if (attribute.getName().equals("analysisRuleId") - && attribute.getValue().equals(violation.getId())) { + && attribute.getValue().equals(checkResult.getId())) { elementAlreadyExisting = true; existingElement = element; } @@ -136,7 +136,7 @@ public void export(List checkResults, File outputFile) throws IOExc } if (!elementAlreadyExisting || existingElement == null) { analysisRule = new Element("analysisRule"); - analysisRule.setAttribute(new Attribute("analysisRuleId", violation.getName())); + analysisRule.setAttribute(new Attribute("analysisRuleId", checkResult.getName())); } else { analysisRule = existingElement; } @@ -148,22 +148,22 @@ public void export(List checkResults, File outputFile) throws IOExc resultAttributes.add(new Attribute("resultId", Integer.toString(resultId))); resultId++; - resultAttributes.add(new Attribute("fileName", violation.getFile().toString())); - resultAttributes.add(new Attribute("resultLine", violation.getLine().toString())); + resultAttributes.add(new Attribute("fileName", checkResult.getFile().toString())); + resultAttributes.add(new Attribute("resultLine", checkResult.getLine().toString())); /* * The location and message are defined in violations by only one * attribute (String) made this way: [Location -> Message], so we * split it to get the two exploitable strings. */ - resultAttributes.add(new Attribute("resultNamePlace", violation.getLocation())); + resultAttributes.add(new Attribute("resultNamePlace", checkResult.getLocation())); /* * The result message is defined by the XSD as a sequence of element * resultMessage (not an attribute). */ final Element resultMessage = new Element("resultMessage"); - resultMessage.addContent(violation.getMessage()); + resultMessage.addContent(checkResult.getMessage()); result.addContent(resultMessage); result.setAttributes(resultAttributes); diff --git a/fr.cnes.analysis.tools.export/src/fr/cnes/analysis/tools/export/Export.java b/fr.cnes.analysis.tools.export/src/fr/cnes/analysis/tools/export/Export.java index b14d26b6..dc99e9e1 100644 --- a/fr.cnes.analysis.tools.export/src/fr/cnes/analysis/tools/export/Export.java +++ b/fr.cnes.analysis.tools.export/src/fr/cnes/analysis/tools/export/Export.java @@ -75,10 +75,10 @@ private IConfigurationElement[] getContributions() { } /** - * This function export each {@link Violation} of the {@code violations} + * This function export each {@link CheckResult} of {@code checkResults} * parameter into the {@link File} parameter. * - * @param violations + * @param checkResults * to export. * @param outputFile * to use for the export. @@ -91,17 +91,17 @@ private IConfigurationElement[] getContributions() { * when the export failed due to a {@link java.io.File} * exception. */ - public void export(List violations, File outputFile) + public void export(List checkResults, File outputFile) throws NoContributorMatchingException, NoExtensionIndicatedException, IOException { IExport exporter = this .getExportClass(this.getExtensionFromFilePath(outputFile.getAbsolutePath())); - exporter.export(violations, outputFile); + exporter.export(checkResults, outputFile); } /** * @param inputFile * to realize the import on. - * @return the list of {@link Violation} extracted from the + * @return the list of {@link CheckResult} extracted from the * {@code inputFile}. * @throws NoExtensionIndicatedException * when the {@code inputFile} do not end with an extension. @@ -112,14 +112,14 @@ public void export(List violations, File outputFile) */ public List importResults(File inputFile) throws NoExtensionIndicatedException, NoContributorMatchingException { - List violations = null; + List checkResults = null; IImport importer = this .getImportClass(this.getExtensionFromFilePath(inputFile.getAbsolutePath())); - violations = importer.importResults(inputFile); - if (violations == null) { + checkResults = importer.importResults(inputFile); + if (checkResults == null) { throw new NoContributorMatchingException(); } - return violations; + return checkResults; } /** diff --git a/fr.cnes.analysis.tools.export/src/fr/cnes/analysis/tools/export/IExport.java b/fr.cnes.analysis.tools.export/src/fr/cnes/analysis/tools/export/IExport.java index 2dc07d70..f6e71e77 100644 --- a/fr.cnes.analysis.tools.export/src/fr/cnes/analysis/tools/export/IExport.java +++ b/fr.cnes.analysis.tools.export/src/fr/cnes/analysis/tools/export/IExport.java @@ -23,13 +23,13 @@ public interface IExport { /** - * This function exports {@link Violation} of {@code violations} into + * This function exports {@link CheckResult} of {@code checkResults} into * {@link File} indicated pending it's format. * * @param checkResults * to exports. * @param outputFile - * to write the violations. + * to write the {@link CheckResult}s. * @throws IOException * when a {@link java.io.File} exception occur while using * {@code outputFile}. diff --git a/fr.cnes.analysis.tools.export/src/fr/cnes/analysis/tools/export/IImport.java b/fr.cnes.analysis.tools.export/src/fr/cnes/analysis/tools/export/IImport.java index b6505083..71f78ef4 100644 --- a/fr.cnes.analysis.tools.export/src/fr/cnes/analysis/tools/export/IImport.java +++ b/fr.cnes.analysis.tools.export/src/fr/cnes/analysis/tools/export/IImport.java @@ -22,8 +22,8 @@ public interface IImport { /** * @param inputFile - * containing the {@link Violation} to import. - * @return the violations in a List of {@link Violation} data. + * containing the {@link CheckResult} to import. + * @return the checkReults in a List of {@link CheckResult} data. */ public List importResults(File inputFile);