]> source.dussan.org Git - sonarqube.git/commitdiff
Upgrade copyright headers
authorsimonbrandhof <simon.brandhof@gmail.com>
Fri, 4 Feb 2011 09:42:21 +0000 (10:42 +0100)
committersimonbrandhof <simon.brandhof@gmail.com>
Fri, 4 Feb 2011 09:42:21 +0000 (10:42 +0100)
1867 files changed:
copyright.txt
plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleAuditListener.java
plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleConfiguration.java
plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleConstants.java
plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleExecutor.java
plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstylePlugin.java
plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleProfileExporter.java
plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleProfileImporter.java
plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleRuleRepository.java
plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSensor.java
plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSeverityUtils.java
plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleVersion.java
plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/SonarWayProfile.java
plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/SonarWayWithFindbugsProfile.java
plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/SunConventionsProfile.java
plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleConfigurationTest.java
plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleExecutorTest.java
plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstylePluginTest.java
plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleProfileExporterTest.java
plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleProfileImporterTest.java
plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleRuleRepositoryTest.java
plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleSeverityUtilsTest.java
plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleVersionTest.java
plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SonarWayProfileTest.java
plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SonarWayWithFindbugsProfileTest.java
plugins/sonar-checkstyle-plugin/src/test/java/org/sonar/plugins/checkstyle/SunConventionsProfileTest.java
plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverConstants.java
plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverMavenPluginHandler.java
plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverPlugin.java
plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/CloverSensor.java
plugins/sonar-clover-plugin/src/main/java/org/sonar/plugins/clover/XmlReportParser.java
plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverMavenPluginHandlerTest.java
plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverPluginTest.java
plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/CloverSensorTest.java
plugins/sonar-clover-plugin/src/test/java/org/sonar/plugins/clover/XmlReportParserTest.java
plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaMavenPluginHandler.java
plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaPlugin.java
plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/CoberturaSensor.java
plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/api/AbstractCoberturaParser.java
plugins/sonar-cobertura-plugin/src/main/java/org/sonar/plugins/cobertura/api/CoberturaUtils.java
plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaMavenPluginHandlerTest.java
plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaPluginTest.java
plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaSensorTest.java
plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/api/CoberturaUtilsTest.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/Clouds.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/Calculator.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/GwtClouds.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/model/CloudElement.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/model/Color.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/widget/ClassCloudsWidget.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/clouds/client/widget/TabWidget.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/coverageviewer/CoverageViewerDefinition.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/coverageviewer/client/CoveragePanel.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/coverageviewer/client/CoverageViewer.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/defaultsourceviewer/DefaultSourceViewer.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/defaultsourceviewer/client/GwtDefaultSourceViewer.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/duplicationsviewer/DuplicationsViewerDefinition.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/duplicationsviewer/client/DuplicationsPanel.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/duplicationsviewer/client/DuplicationsViewer.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/Hotspots.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/GwtHotspots.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/I18nConstants.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/AbstractHotspot.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MetricHotspot.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostBadlyDesignedFiles.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostViolatedResources.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostViolatedRules.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/TestsViewerDefinition.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsPanel.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/testdetailsviewer/client/TestsViewer.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/GwtPageSelector.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/I18nConstants.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/PageDef.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/PagePanel.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/ui/pageselector/client/PageSelector.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/ViolationsViewerDefinition.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/I18nConstants.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsPanel.java
plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/violationsviewer/client/ViolationsViewer.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/batch/ExcludedResourceFilter.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/charts/DistributionAreaChart.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/charts/DistributionBarChart.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/charts/XradarChart.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/colorizers/JavaColorizerFormat.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/metrics/UserManagedMetrics.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/security/ApplyProjectRolesDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/security/RoleManager.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AbstractCoverageDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AlertUtils.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AsynchronousMeasuresSensor.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/BranchCoverageDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CheckAlertThresholds.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CommentDensityDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/CoverageDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/DirectoriesDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/FilesDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/GenerateAlertEvents.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/LineCoverageDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ProfileSensor.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ProjectLinksSensor.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/UncoveredComplexityDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/UnitTestDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/VersionEventsSensor.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ViolationsDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ViolationsDensityDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/WeightedViolationsDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/NewViolationsDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TendencyAnalyser.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TendencyDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersister.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/ViolationPersisterDecorator.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/AlertsWidget.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CodeCoverageWidget.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CommentsDuplicationsWidget.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/ComplexityWidget.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CustomMeasuresWidget.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/DescriptionWidget.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/EventsWidget.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/RulesWidget.java
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/SizeWidget.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/CorePluginTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/batch/ExcludedResourceFilterTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionAreaChartTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionBarChartTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/XradarChartTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/metrics/UserManagedMetricsTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/security/ApplyProjectRolesDecoratorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/security/RoleManagerTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/AlertUtilsTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/BranchCoverageDecoratorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CheckAlertThresholdsTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CommentDensityDecoratorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageDecoratorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/DirectoriesDecoratorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/GenerateAlertEventsTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/LineCoverageDecoratorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProfileSensorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProjectLinksSensorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/UncoveredComplexityDecoratorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/UnitTestDecoratorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/VersionEventsSensorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationsDecoratorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationsDensityDecoratorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/WeightedViolationsDecoratorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/NewViolationsDecoratorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyAnalyserTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyDecoratorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersisterTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TimeMachineConfigurationTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/VariationDecoratorTest.java
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest.java
plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdAnalyser.java
plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdException.java
plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdPlugin.java
plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdSensor.java
plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/JavaCpdMapping.java
plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/decorators/DuplicationDensityDecorator.java
plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/decorators/SumDuplicationsDecorator.java
plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdAnalyserTest.java
plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdPluginTest.java
plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/CpdSensorTest.java
plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/decorators/DuplicationDensityDecoratorTest.java
plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/decorators/SumDuplicationsDecoratorTest.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DbCleanerPlugin.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/DbCleanerConstants.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/PeriodCleaner.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/Purge.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/PurgeContext.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/api/PurgeUtils.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/DefaultPeriodCleaner.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepLastSnapshotFilter.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepLibrarySnapshotFilter.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepOneSnapshotByPeriodBetweenTwoDatesFilter.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/KeepSnapshotsBetweenTwoDatesFilter.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/PeriodPurge.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/Periods.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/SQLRequests.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/period/SnapshotFilter.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResources.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDependencies.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLast.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResources.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeEntities.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeEventOrphans.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeOrphanResources.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgePropertyOrphans.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeResourceRoles.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasures.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessed.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublons.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/runner/DefaultPurgeContext.java
plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/runner/PurgeRunner.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DbCleanerPluginTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/Utils.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/DefaultPeriodCleanerTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepLastSnapshotFilterTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepLibrarySnapshotFilterTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepOneSnapshotByPeriodBetweenTwoDatesFilterTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/KeepSnapshotsBetweenTwoDatesFilterTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/period/PeriodsTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDeletedResourcesTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDependenciesTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDeprecatedLastTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeEventOrphansTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeOrphanResourcesTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgePropertyOrphansTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeResourceRolesTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasuresTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest.java
plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/runner/PurgeRunnerTest.java
plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest/sharedFixture.xml
plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest/unflagLastDoublons-result.xml
plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/UnflagLastDoublonsTest/unflagLastDoublons.xml
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/DesignPlugin.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/DsmSerializer.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/FileTangleIndexDecorator.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/MavenDependenciesSensor.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/PackageTangleIndexDecorator.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/ProjectDsmDecorator.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/SuspectLcom4DensityDecorator.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/batch/TangleIndexDecorator.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/GwtDependenciesTab.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/Data.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/DependenciesTab.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/DependenciesTable.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/Header.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/client/I18nConstants.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/lcom4/GwtLcom4Tab.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/lcom4/client/Data.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/lcom4/client/Lcom4Tab.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/GwtLibrariesPage.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/Filters.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/I18nConstants.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/KeywordFilter.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/LibrariesPage.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/Library.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/libraries/client/ProjectPanel.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/GwtDesignPage.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DependencyInfo.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DesignPage.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/Dsm.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/DsmData.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/page/client/I18nConstants.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/widgets/ChidamberKemererWidget.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/widgets/FileDesignWidget.java
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/widgets/PackageDesignWidget.java
plugins/sonar-design-plugin/src/test/java/org/sonar/plugins/design/batch/DsmSerializerTest.java
plugins/sonar-design-plugin/src/test/java/org/sonar/plugins/design/batch/MavenDependenciesSensorTest.java
plugins/sonar-design-plugin/src/test/java/org/sonar/plugins/design/batch/SuspectLcom4DensityDecoratorTest.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsAntConverter.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsCategory.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsConstants.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsExecutor.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsLevelUtils.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsPlugin.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsProfileExporter.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsProfileImporter.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsRuleRepository.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsSensor.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsVersion.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsXmlReportParser.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/SonarWayWithFindbugsProfile.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/Bug.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/ClassFilter.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/FieldFilter.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/FindBugsFilter.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/LocalFilter.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/Match.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/MethodFilter.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/OrFilter.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/PackageFilter.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/xml/Priority.java
plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FakeRuleFinder.java
plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsAntConverterTest.java
plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsConfigurationTest.java
plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsExecutorTest.java
plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsProfileExporterTest.java
plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsProfileImporterTest.java
plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsRuleRepositoryTest.java
plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsSensorTest.java
plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsTests.java
plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsVersionTest.java
plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsXmlReportParserTest.java
plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/SonarWayWithFindbugsProfileTest.java
plugins/sonar-googleanalytics-plugin/src/main/java/org/sonar/plugins/googleanalytics/GoogleAnalyticsPlugin.java
plugins/sonar-googleanalytics-plugin/src/main/java/org/sonar/plugins/googleanalytics/GoogleAnalyticsWebFooter.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdConfiguration.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdConstants.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdExecutor.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdLevelUtils.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdPlugin.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdProfileExporter.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdProfileImporter.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdRuleRepository.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdSensor.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdVersion.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdViolationsXmlParser.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/SonarWayProfile.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/SonarWayWithFindbugsProfile.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/SunConventionsProfile.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdProperty.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdRule.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdRuleset.java
plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdConfigurationTest.java
plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdExecutorTest.java
plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdProfileExporterTest.java
plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdProfileImporterTest.java
plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdRuleRepositoryTest.java
plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdVersionTest.java
plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdViolationsXmlParserTest.java
plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/SonarWayProfileTest.java
plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/SonarWayWithFindbugsProfileTest.java
plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/SunConventionsProfileTest.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/PatternUtils.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/CheckstyleAuditListener.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/CheckstyleSquidBridge.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/JavaAstScanner.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/BreakCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/ContinueCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/JavaAstCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/check/UndocumentedApiCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/AccessorVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/AnonymousInnerClassVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/AstUtils.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/BlankLinesVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/BranchVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/ClassVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/CommentVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/ComplexityVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/EndAtLineVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/FileVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/JavaAstVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/LinesOfCodeVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/LinesVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/MethodVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/PackageVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/PublicApiVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/StatementVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/ast/visitor/SuppressWarningsAnnotationUtils.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/BytecodeScanner.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/BytecodeVisitorNotifier.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/ClassworldsClassLoader.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/VirtualMethodsLinker.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmAccessFlags.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClass.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClassProvider.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClassProviderImpl.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmClassVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmEdge.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmField.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmMethod.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmMethodVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmResource.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmSignature.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmSignatureVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/asm/AsmType.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/ArchitectureCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/BytecodeCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/CallToDeprecatedMethodCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/SerializableContract.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedPrivateMethodCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedProtectedMethodCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/AccessorVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/BytecodeVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/DITVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/DependenciesVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/LCOM4Visitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/NOCVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/visitor/RFCVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/recognizer/JavaFootprint.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/JvmJavaType.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/MethodSignature.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/MethodSignaturePrinter.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/MethodSignatureScanner.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/Parameter.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/ParameterSignaturePrinter.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/signature/ParameterSignatureScanner.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/JavaSquidConfiguration.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/SquidScanner.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/SquidVisitorNotifier.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/ClassComplexityCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/DITCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/MethodComplexityCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/NoSonarCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/SquidCheck.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/visitor/SquidVisitor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/JavaSourceImporter.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidConstants.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidExecutor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidPlugin.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidPluginProperties.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidRuleRepository.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidSearchProxy.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/SquidSensor.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/Bridge.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/BridgeFactory.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChecksBridge.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChidamberKemererBridge.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ChidamberKemererDistributionBridge.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ClassComplexityDistributionBridge.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/CopyBasicMeasuresBridge.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DependencyIndex.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DesignBridge.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/DsmSerializer.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/FunctionComplexityDistributionBridge.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/Lcom4BlocksBridge.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/NoSonarFilterLoader.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/PackagesBridge.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/PublicUndocumentedApiBridge.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/ResourceIndex.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/RobertCMartinBridge.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/bridges/SquidBrigeException.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/ClassComplexityDistributionBuilder.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/ClassesDecorator.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/FunctionComplexityDistributionBuilder.java
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/plugins/squid/decorators/FunctionsDecorator.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/PatternUtilsTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/JavaAstScannerTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/SquidTestUtils.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/check/BreakCheckTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/check/ContinueCheckTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/check/UndocumentedApiCheckTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/AccessorVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/AnonymousInnerClassVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/BlankLinesVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/BrancheVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/ClassVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/CommentVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/ComplexityVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/EndAtLineVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/FileVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/HeaderCommentVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/LinesOfCodeVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/LinesVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/MethodVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/PublicApiVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/ast/visitor/StatementVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/BytecodeVisitorsTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/ClassworldsClassLoaderTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/VirtualMethodsLinkerTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassProviderImplTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassProviderTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmClassVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmFieldTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmFieldVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmMethodTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmMethodVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmSignatureTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmSignatureVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/asm/AsmTypeTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/ArchitectureCheckTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/CallToDeprecatedMethodCheckTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/SerializableContractTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/UnusedPrivateMethodCheckTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/check/UnusedProtectedMethodCheckTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/visitor/AccessorVisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/bytecode/visitor/LCOM4VisitorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/recognizer/JavaFootprintTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/MethodSignaturePrinterTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/MethodSignatureScannerTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/ParameterSignaturePrinterTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/ParameterSignatureScannerTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/signature/ParameterTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/ClassComplexityCheckTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/DITCheckTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/MethodComplexityCheckTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/NoSonarCheckTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/JavaSourceImporterTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidExecutorTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidPluginTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidSearchProxyTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/SquidTestUtils.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/BridgeFactoryTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/BridgeTestCase.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/ChidamberKemererBridgeTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/DesignBridgeTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/DsmSerializerTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/Lcom4BlocksBridgeTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/PublicUndocumentedApiBridgeTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/bridges/RobertCMartinBridgeTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/decorators/ClassComplexityDistributionBuilderTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/plugins/squid/decorators/FunctionComplexityDistributionBuilderTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/squid/SquidTest.java
plugins/sonar-squid-java-plugin/src/test/java/org/sonar/squid/SquidUserGuideTest.java
plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/SurefirePlugin.java
plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/SurefireSensor.java
plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/TestCaseDetails.java
plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/TestSuiteParser.java
plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/TestSuiteReport.java
plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/api/AbstractSurefireParser.java
plugins/sonar-surefire-plugin/src/main/java/org/sonar/plugins/surefire/api/SurefireUtils.java
plugins/sonar-surefire-plugin/src/test/java/org/sonar/plugins/surefire/SurefireSensorTest.java
plugins/sonar-surefire-plugin/src/test/java/org/sonar/plugins/surefire/api/SurefireUtilsTest.java
sonar-application/src/main/assembly/war/build-war.bat
sonar-application/src/main/assembly/war/build-war.sh
sonar-application/src/main/assembly/war/build.xml
sonar-application/src/main/java/org/sonar/application/JettyEmbedder.java
sonar-application/src/main/java/org/sonar/application/StartServer.java
sonar-application/src/test/java/org/sonar/application/JettyEmbedderTest.java
sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BootstrapClassLoader.java
sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BootstrapException.java
sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/Bootstrapper.java
sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BootstrapperIOUtils.java
sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/package-info.java
sonar-batch-bootstrapper/src/test/java/org/sonar/batch/bootstrapper/BootstrapClassLoaderTest.java
sonar-batch-bootstrapper/src/test/java/org/sonar/batch/bootstrapper/BootstrapperTest.java
sonar-batch/src/main/java/org/sonar/batch/AbstractMavenPluginExecutor.java
sonar-batch/src/main/java/org/sonar/batch/Batch.java
sonar-batch/src/main/java/org/sonar/batch/CheckProfileProvider.java
sonar-batch/src/main/java/org/sonar/batch/DecoratorsSelector.java
sonar-batch/src/main/java/org/sonar/batch/DefaultDecoratorContext.java
sonar-batch/src/main/java/org/sonar/batch/DefaultResourceCreationLock.java
sonar-batch/src/main/java/org/sonar/batch/DefaultSensorContext.java
sonar-batch/src/main/java/org/sonar/batch/DefaultTimeMachine.java
sonar-batch/src/main/java/org/sonar/batch/FakeMavenPluginExecutor.java
sonar-batch/src/main/java/org/sonar/batch/FormulaDecorator.java
sonar-batch/src/main/java/org/sonar/batch/InMemoryPomCreator.java
sonar-batch/src/main/java/org/sonar/batch/MavenPluginExecutor.java
sonar-batch/src/main/java/org/sonar/batch/MavenProjectBuilder.java
sonar-batch/src/main/java/org/sonar/batch/MavenReactor.java
sonar-batch/src/main/java/org/sonar/batch/ProfileProvider.java
sonar-batch/src/main/java/org/sonar/batch/ProjectBatch.java
sonar-batch/src/main/java/org/sonar/batch/ProjectConfiguration.java
sonar-batch/src/main/java/org/sonar/batch/ProjectTree.java
sonar-batch/src/main/java/org/sonar/batch/ResourceDatabaseConfiguration.java
sonar-batch/src/main/java/org/sonar/batch/ResourceFilters.java
sonar-batch/src/main/java/org/sonar/batch/ServerMetadata.java
sonar-batch/src/main/java/org/sonar/batch/ViolationFilters.java
sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchPluginRepository.java
sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapClassLoader.java
sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionDownloader.java
sonar-batch/src/main/java/org/sonar/batch/bootstrap/TempDirectories.java
sonar-batch/src/main/java/org/sonar/batch/bootstrapper/ProjectDefinition.java
sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Reactor.java
sonar-batch/src/main/java/org/sonar/batch/components/PastMeasuresLoader.java
sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshot.java
sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinder.java
sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByDate.java
sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByDays.java
sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysis.java
sonar-batch/src/main/java/org/sonar/batch/components/PastSnapshotFinderByVersion.java
sonar-batch/src/main/java/org/sonar/batch/components/PastViolationsLoader.java
sonar-batch/src/main/java/org/sonar/batch/components/TimeMachineConfiguration.java
sonar-batch/src/main/java/org/sonar/batch/index/Bucket.java
sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java
sonar-batch/src/main/java/org/sonar/batch/index/DefaultPersistenceManager.java
sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java
sonar-batch/src/main/java/org/sonar/batch/index/DependencyPersister.java
sonar-batch/src/main/java/org/sonar/batch/index/EventPersister.java
sonar-batch/src/main/java/org/sonar/batch/index/LinkPersister.java
sonar-batch/src/main/java/org/sonar/batch/index/MeasurePersister.java
sonar-batch/src/main/java/org/sonar/batch/index/PersistenceManager.java
sonar-batch/src/main/java/org/sonar/batch/index/ResourceNotIndexedException.java
sonar-batch/src/main/java/org/sonar/batch/index/ResourceNotPersistedException.java
sonar-batch/src/main/java/org/sonar/batch/index/ResourcePersister.java
sonar-batch/src/main/java/org/sonar/batch/index/SourcePersister.java
sonar-batch/src/main/java/org/sonar/batch/index/ViolationPersister.java
sonar-batch/src/main/java/org/sonar/batch/phases/DecoratorsExecutor.java
sonar-batch/src/main/java/org/sonar/batch/phases/MavenPhaseExecutor.java
sonar-batch/src/main/java/org/sonar/batch/phases/MavenPluginsConfigurator.java
sonar-batch/src/main/java/org/sonar/batch/phases/Phases.java
sonar-batch/src/main/java/org/sonar/batch/phases/PostJobsExecutor.java
sonar-batch/src/main/java/org/sonar/batch/phases/SensorsExecutor.java
sonar-batch/src/main/java/org/sonar/batch/phases/UpdateStatusJob.java
sonar-batch/src/test/java/org/sonar/batch/AbstractMavenPluginExecutorTest.java
sonar-batch/src/test/java/org/sonar/batch/BatchTest.java
sonar-batch/src/test/java/org/sonar/batch/DecoratorsSelectorTest.java
sonar-batch/src/test/java/org/sonar/batch/DefaultResourceCreationLockTest.java
sonar-batch/src/test/java/org/sonar/batch/DefaultSensorContextTest.java
sonar-batch/src/test/java/org/sonar/batch/FormulaDecoratorTest.java
sonar-batch/src/test/java/org/sonar/batch/InMemoryPomCreatorTest.java
sonar-batch/src/test/java/org/sonar/batch/MavenProjectBuilderTest.java
sonar-batch/src/test/java/org/sonar/batch/ProfileProviderTest.java
sonar-batch/src/test/java/org/sonar/batch/ProjectConfigurationTest.java
sonar-batch/src/test/java/org/sonar/batch/ProjectTreeTest.java
sonar-batch/src/test/java/org/sonar/batch/ServerMetadataTest.java
sonar-batch/src/test/java/org/sonar/batch/ViolationFiltersTest.java
sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchPluginRepositoryTest.java
sonar-batch/src/test/java/org/sonar/batch/bootstrap/BootstrapClassLoaderTest.java
sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionDownloaderTest.java
sonar-batch/src/test/java/org/sonar/batch/bootstrap/TempDirectoriesTest.java
sonar-batch/src/test/java/org/sonar/batch/components/PastMeasuresLoaderTest.java
sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDateTest.java
sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByDaysTest.java
sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest.java
sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderByVersionTest.java
sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotFinderTest.java
sonar-batch/src/test/java/org/sonar/batch/components/PastSnapshotTest.java
sonar-batch/src/test/java/org/sonar/batch/components/PastViolationsLoaderTest.java
sonar-batch/src/test/java/org/sonar/batch/index/BucketTest.java
sonar-batch/src/test/java/org/sonar/batch/index/DefaultIndexTest.java
sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java
sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java
sonar-batch/src/test/java/org/sonar/batch/index/SourcePersisterTest.java
sonar-batch/src/test/java/org/sonar/batch/index/ViolationPersisterTest.java
sonar-batch/src/test/java/org/sonar/batch/phases/DecoratorsExecutorTest.java
sonar-batch/src/test/java/org/sonar/batch/phases/MavenPhaseExecutorTest.java
sonar-batch/src/test/java/org/sonar/batch/phases/MavenPluginsConfiguratorTest.java
sonar-batch/src/test/java/org/sonar/batch/phases/PhasesTest.java
sonar-batch/src/test/java/org/sonar/batch/phases/PostJobsExecutorTest.java
sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java
sonar-channel/src/main/java/org/sonar/channel/Channel.java
sonar-channel/src/main/java/org/sonar/channel/ChannelCodeReaderFilter.java
sonar-channel/src/main/java/org/sonar/channel/ChannelDispatcher.java
sonar-channel/src/main/java/org/sonar/channel/ChannelException.java
sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java
sonar-channel/src/main/java/org/sonar/channel/CodeReader.java
sonar-channel/src/main/java/org/sonar/channel/CodeReaderConfiguration.java
sonar-channel/src/main/java/org/sonar/channel/CodeReaderFilter.java
sonar-channel/src/main/java/org/sonar/channel/EndMatcher.java
sonar-channel/src/test/java/org/sonar/channel/CodeBufferTest.java
sonar-channel/src/test/java/org/sonar/channel/CodeReaderTest.java
sonar-check-api/src/main/java/org/sonar/check/AnnotationIntrospector.java
sonar-check-api/src/main/java/org/sonar/check/BelongsToProfile.java
sonar-check-api/src/main/java/org/sonar/check/BelongsToProfiles.java
sonar-check-api/src/main/java/org/sonar/check/Cardinality.java
sonar-check-api/src/main/java/org/sonar/check/Check.java
sonar-check-api/src/main/java/org/sonar/check/CheckProperty.java
sonar-check-api/src/main/java/org/sonar/check/IsoCategory.java
sonar-check-api/src/main/java/org/sonar/check/Message.java
sonar-check-api/src/main/java/org/sonar/check/Priority.java
sonar-check-api/src/main/java/org/sonar/check/Rule.java
sonar-check-api/src/main/java/org/sonar/check/RuleProperty.java
sonar-check-api/src/test/java/org/sonar/check/AnnotationIntrospectorTest.java
sonar-check-api/src/test/java/org/sonar/check/CheckTest.java
sonar-check-api/src/test/java/org/sonar/check/FakeCheck.java
sonar-colorizer/src/main/java/org/sonar/colorizer/CDocTokenizer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/CodeColorizer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/CppDocTokenizer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/GroovyKeywords.java
sonar-colorizer/src/main/java/org/sonar/colorizer/GroovyTokenizers.java
sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlCodeBuilder.java
sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlDecorator.java
sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlOptions.java
sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlRenderer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/InlineDocTokenizer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/JavaAnnotationTokenizer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/JavaConstantTokenizer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/JavaKeywords.java
sonar-colorizer/src/main/java/org/sonar/colorizer/JavaTokenizers.java
sonar-colorizer/src/main/java/org/sonar/colorizer/JavadocTokenizer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/KeywordsTokenizer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/LiteralTokenizer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/MultilinesDocTokenizer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/NotThreadSafeTokenizer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/RegexpTokenizer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/Renderer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/StringTokenizer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/SynhtaxHighlightingException.java
sonar-colorizer/src/main/java/org/sonar/colorizer/Tokenizer.java
sonar-colorizer/src/main/java/org/sonar/colorizer/TokenizerDispatcher.java
sonar-colorizer/src/test/java/org/sonar/colorizer/CDocTokenizerTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizerTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/CodeColorizerTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/CppTokenizerTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlCodeBuilderTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlDecoratorTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlRendererTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/JavaAnnotationTokenizerTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/JavaConstantTokenizerTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/JavaKeywordsTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/JavaTokenizersTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/JavadocTokenizerTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/KeywordsTokenizerTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/LiteralTokenizerTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/MultilinesDocTokenizerTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/RegexpTokenizerTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/SyntaxHighlighterTestingHarness.java
sonar-colorizer/src/test/java/org/sonar/colorizer/TokenizerDispatcherTest.java
sonar-colorizer/src/test/java/org/sonar/colorizer/UserGuideTest.java
sonar-core-maven-plugin/src/main/java/org/sonar/maven2/BatchMojo.java
sonar-core-maven-plugin/src/main/java/org/sonar/maven2/Maven2PluginExecutor.java
sonar-core/src/main/java/org/sonar/api/database/configuration/DatabaseConfiguration.java
sonar-core/src/main/java/org/sonar/api/database/configuration/Property.java
sonar-core/src/main/java/org/sonar/api/database/configuration/ResourceDatabaseConfiguration.java
sonar-core/src/main/java/org/sonar/core/classloaders/ClassLoadersCollection.java
sonar-core/src/main/java/org/sonar/core/classloaders/ResourcesClassLoader.java
sonar-core/src/main/java/org/sonar/core/components/CacheMetricFinder.java
sonar-core/src/main/java/org/sonar/core/components/CacheRuleFinder.java
sonar-core/src/main/java/org/sonar/core/components/DefaultMetricFinder.java
sonar-core/src/main/java/org/sonar/core/components/DefaultModelFinder.java
sonar-core/src/main/java/org/sonar/core/components/DefaultRuleFinder.java
sonar-core/src/main/java/org/sonar/core/plugin/AbstractPluginRepository.java
sonar-core/src/main/java/org/sonar/core/plugin/JpaPlugin.java
sonar-core/src/main/java/org/sonar/core/plugin/JpaPluginDao.java
sonar-core/src/main/java/org/sonar/core/plugin/JpaPluginFile.java
sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresDao.java
sonar-core/src/main/java/org/sonar/jpa/dao/AsyncMeasuresService.java
sonar-core/src/main/java/org/sonar/jpa/dao/BaseDao.java
sonar-core/src/main/java/org/sonar/jpa/dao/DaoFacade.java
sonar-core/src/main/java/org/sonar/jpa/dao/MeasuresDao.java
sonar-core/src/main/java/org/sonar/jpa/dao/ProfilesDao.java
sonar-core/src/main/java/org/sonar/jpa/dao/RulesDao.java
sonar-core/src/main/java/org/sonar/jpa/dialect/Derby.java
sonar-core/src/main/java/org/sonar/jpa/dialect/Dialect.java
sonar-core/src/main/java/org/sonar/jpa/dialect/DialectRepository.java
sonar-core/src/main/java/org/sonar/jpa/dialect/HsqlDb.java
sonar-core/src/main/java/org/sonar/jpa/dialect/MsSql.java
sonar-core/src/main/java/org/sonar/jpa/dialect/MySql.java
sonar-core/src/main/java/org/sonar/jpa/dialect/Oracle.java
sonar-core/src/main/java/org/sonar/jpa/dialect/OracleSequenceGenerator.java
sonar-core/src/main/java/org/sonar/jpa/dialect/PostgreSQLSequenceGenerator.java
sonar-core/src/main/java/org/sonar/jpa/dialect/PostgreSql.java
sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java
sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseBatch.java
sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java
sonar-core/src/main/java/org/sonar/jpa/session/DatabaseBatch.java
sonar-core/src/main/java/org/sonar/jpa/session/DatabaseConnector.java
sonar-core/src/main/java/org/sonar/jpa/session/DatabaseException.java
sonar-core/src/main/java/org/sonar/jpa/session/DatabaseSessionFactory.java
sonar-core/src/main/java/org/sonar/jpa/session/DatabaseSessionProvider.java
sonar-core/src/main/java/org/sonar/jpa/session/DriverDatabaseConnector.java
sonar-core/src/main/java/org/sonar/jpa/session/JpaDatabaseSession.java
sonar-core/src/main/java/org/sonar/jpa/session/MemoryDatabaseConnector.java
sonar-core/src/main/java/org/sonar/jpa/session/ThreadLocalDatabaseSessionFactory.java
sonar-core/src/test/java/org/sonar/api/database/configuration/DatabaseConfigurationTest.java
sonar-core/src/test/java/org/sonar/api/database/configuration/ResourceDatabaseConfigurationTest.java
sonar-core/src/test/java/org/sonar/core/classloaders/ClassLoadersCollectionTest.java
sonar-core/src/test/java/org/sonar/core/classloaders/ResourcesClassLoaderTest.java
sonar-core/src/test/java/org/sonar/core/components/CacheMetricFinderTest.java
sonar-core/src/test/java/org/sonar/core/components/CacheRuleFinderTest.java
sonar-core/src/test/java/org/sonar/core/components/DefaultMetricFinderTest.java
sonar-core/src/test/java/org/sonar/core/components/DefaultModelFinderTest.java
sonar-core/src/test/java/org/sonar/core/components/DefaultRuleFinderTest.java
sonar-core/src/test/java/org/sonar/core/components/ModelTest.java
sonar-core/src/test/java/org/sonar/core/plugin/AbstractPluginRepositoryTest.java
sonar-core/src/test/java/org/sonar/core/plugin/JpaPluginDaoTest.java
sonar-core/src/test/java/org/sonar/core/plugin/JpaPluginTest.java
sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresDaoTest.java
sonar-core/src/test/java/org/sonar/jpa/dao/AsyncMeasuresServiceTest.java
sonar-core/src/test/java/org/sonar/jpa/dao/MeasuresDaoTest.java
sonar-core/src/test/java/org/sonar/jpa/dao/ProfilesDaoTest.java
sonar-core/src/test/java/org/sonar/jpa/dao/RulesDaoTest.java
sonar-core/src/test/java/org/sonar/jpa/dialect/DerbyTest.java
sonar-core/src/test/java/org/sonar/jpa/dialect/DialectRepositoryTest.java
sonar-core/src/test/java/org/sonar/jpa/dialect/HsqlDbTest.java
sonar-core/src/test/java/org/sonar/jpa/dialect/MsSqlTest.java
sonar-core/src/test/java/org/sonar/jpa/dialect/MySqlTest.java
sonar-core/src/test/java/org/sonar/jpa/dialect/OracleSequenceGeneratorTest.java
sonar-core/src/test/java/org/sonar/jpa/dialect/OracleTest.java
sonar-core/src/test/java/org/sonar/jpa/dialect/PostgreSQLSequenceGeneratorTest.java
sonar-core/src/test/java/org/sonar/jpa/dialect/PostgreSqlTest.java
sonar-core/src/test/java/org/sonar/jpa/entity/PropertyTest.java
sonar-core/src/test/java/org/sonar/jpa/entity/SchemaMigrationTest.java
sonar-core/src/test/java/org/sonar/jpa/session/AbstractDatabaseConnectorTest.java
sonar-core/src/test/java/org/sonar/jpa/session/DatabaseSessionTest.java
sonar-core/src/test/java/org/sonar/jpa/session/DriverDatabaseConnectorTest.java
sonar-core/src/test/java/org/sonar/jpa/session/ThreadLocalDatabaseSessionFactoryTest.java
sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java
sonar-deprecated/src/main/java/org/sonar/api/batch/AbstractPurge.java
sonar-deprecated/src/main/java/org/sonar/api/batch/AbstractViolationsStaxParser.java
sonar-deprecated/src/main/java/org/sonar/api/batch/GeneratesViolations.java
sonar-deprecated/src/main/java/org/sonar/api/batch/Purge.java
sonar-deprecated/src/main/java/org/sonar/api/batch/PurgeContext.java
sonar-deprecated/src/main/java/org/sonar/api/batch/SquidSearch.java
sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/AnnotationCheckerFactory.java
sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/CheckerFactory.java
sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/MessageDispatcher.java
sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/UnvalidCheckerException.java
sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactory.java
sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/Check.java
sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfile.java
sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfileProvider.java
sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshaller.java
sonar-deprecated/src/main/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactory.java
sonar-deprecated/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplate.java
sonar-deprecated/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplateProperty.java
sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplate.java
sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateFactory.java
sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateProperty.java
sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepositories.java
sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepository.java
sonar-deprecated/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplate.java
sonar-deprecated/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplateProperty.java
sonar-deprecated/src/main/java/org/sonar/api/checks/templates/XmlCheckTemplateFactory.java
sonar-deprecated/src/main/java/org/sonar/api/database/daos/MeasuresDao.java
sonar-deprecated/src/main/java/org/sonar/api/rules/AbstractImportableRulesRepository.java
sonar-deprecated/src/main/java/org/sonar/api/rules/AbstractRulesRepository.java
sonar-deprecated/src/main/java/org/sonar/api/rules/ConfigurationExportable.java
sonar-deprecated/src/main/java/org/sonar/api/rules/ConfigurationImportable.java
sonar-deprecated/src/main/java/org/sonar/api/rules/DefaultRulesManager.java
sonar-deprecated/src/main/java/org/sonar/api/rules/RulePriorityMapper.java
sonar-deprecated/src/main/java/org/sonar/api/rules/RulesManager.java
sonar-deprecated/src/main/java/org/sonar/api/rules/RulesRepository.java
sonar-deprecated/src/main/java/org/sonar/api/rules/StandardProfileXmlParser.java
sonar-deprecated/src/main/java/org/sonar/api/rules/StandardRulesXmlParser.java
sonar-deprecated/src/main/java/org/sonar/api/rules/xml/Profile.java
sonar-deprecated/src/main/java/org/sonar/api/rules/xml/Property.java
sonar-deprecated/src/main/java/org/sonar/api/rules/xml/Rule.java
sonar-deprecated/src/main/java/org/sonar/core/purge/AbstractPurge.java
sonar-deprecated/src/test/java/org/sonar/api/batch/AbstractViolationsStaxParserTest.java
sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/AnnotationCheckerFactoryTest.java
sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckWithUnsupportedPropertyType.java
sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithIntegerProperty.java
sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithPrimitiveProperties.java
sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithStringProperty.java
sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithoutProperties.java
sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactoryTest.java
sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckProfileTest.java
sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest.java
sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckTest.java
sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckOne.java
sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckTwo.java
sonar-deprecated/src/test/java/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.java
sonar-deprecated/src/test/java/org/sonar/api/checks/samples/DetailedAnnotatedCheck.java
sonar-deprecated/src/test/java/org/sonar/api/checks/samples/I18nCheckWithAlternativeBundle.java
sonar-deprecated/src/test/java/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale.java
sonar-deprecated/src/test/java/org/sonar/api/checks/samples/SimpleAnnotatedCheck.java
sonar-deprecated/src/test/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactoryTest.java
sonar-deprecated/src/test/java/org/sonar/api/checks/templates/BundleCheckTemplateTest.java
sonar-deprecated/src/test/java/org/sonar/api/checks/templates/CheckTemplateRepositoriesTest.java
sonar-deprecated/src/test/java/org/sonar/api/checks/templates/DefaultCheckTemplateTest.java
sonar-deprecated/src/test/java/org/sonar/api/rules/StandardProfileXmlParserTest.java
sonar-deprecated/src/test/java/org/sonar/api/rules/StandardRulesXmlParserTest.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AbstractLanguage.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AnyLanguage.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AnyTokenizer.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/CPDListener.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/CPDNullListener.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/FileFinder.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/FileReporter.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Language.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/ReportException.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/TokenEntry.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Tokenizer.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Tokens.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/CPPParserConstants.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/CPPParserTokenManager.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/ParseException.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/SimpleCharStream.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/Token.java
sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/cppast/TokenMgrError.java
sonar-duplications/src/main/java/net/sourceforge/pmd/util/FileFinder.java
sonar-duplications/src/main/java/net/sourceforge/pmd/util/StringUtil.java
sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/AbstractCompoundFilter.java
sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/AbstractDelegateFilter.java
sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/AndFilter.java
sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/DirectoryFilter.java
sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/FileExtensionFilter.java
sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/Filter.java
sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/Filters.java
sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/NotFilter.java
sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/OrFilter.java
sonar-duplications/src/main/java/net/sourceforge/pmd/util/filter/RegexStringFilter.java
sonar-duplications/src/main/java/org/sonar/duplications/cpd/CPD.java
sonar-duplications/src/main/java/org/sonar/duplications/cpd/CodeLoaderWithoutCache.java
sonar-duplications/src/main/java/org/sonar/duplications/cpd/FileCodeLoaderWithoutCache.java
sonar-duplications/src/main/java/org/sonar/duplications/cpd/Match.java
sonar-duplications/src/main/java/org/sonar/duplications/cpd/MatchAlgorithm.java
sonar-duplications/src/main/java/org/sonar/duplications/cpd/MatchCollector.java
sonar-duplications/src/test/java/org/sonar/duplications/cpd/CPDTest.java
sonar-graph/src/main/java/org/sonar/graph/Cycle.java
sonar-graph/src/main/java/org/sonar/graph/CycleDetector.java
sonar-graph/src/main/java/org/sonar/graph/DirectedGraph.java
sonar-graph/src/main/java/org/sonar/graph/DirectedGraphAccessor.java
sonar-graph/src/main/java/org/sonar/graph/Dsm.java
sonar-graph/src/main/java/org/sonar/graph/DsmCell.java
sonar-graph/src/main/java/org/sonar/graph/DsmManualSorter.java
sonar-graph/src/main/java/org/sonar/graph/DsmPrinter.java
sonar-graph/src/main/java/org/sonar/graph/DsmScanner.java
sonar-graph/src/main/java/org/sonar/graph/DsmTopologicalSorter.java
sonar-graph/src/main/java/org/sonar/graph/Edge.java
sonar-graph/src/main/java/org/sonar/graph/EdgeFactory.java
sonar-graph/src/main/java/org/sonar/graph/FeedbackCycle.java
sonar-graph/src/main/java/org/sonar/graph/FeedbackEdge.java
sonar-graph/src/main/java/org/sonar/graph/IncrementalCyclesAndFESSolver.java
sonar-graph/src/main/java/org/sonar/graph/MinimumFeedbackEdgeSetSolver.java
sonar-graph/src/main/java/org/sonar/graph/StringEdge.java
sonar-graph/src/main/java/org/sonar/graph/StringEdgeFactory.java
sonar-graph/src/test/java/org/sonar/graph/CycleDetectorTest.java
sonar-graph/src/test/java/org/sonar/graph/CycleTest.java
sonar-graph/src/test/java/org/sonar/graph/DirectedGraphTest.java
sonar-graph/src/test/java/org/sonar/graph/DsmCellTest.java
sonar-graph/src/test/java/org/sonar/graph/DsmManualSorterTest.java
sonar-graph/src/test/java/org/sonar/graph/DsmPrinterTest.java
sonar-graph/src/test/java/org/sonar/graph/DsmScannerTest.java
sonar-graph/src/test/java/org/sonar/graph/DsmTest.java
sonar-graph/src/test/java/org/sonar/graph/DsmTopologicalSorterTest.java
sonar-graph/src/test/java/org/sonar/graph/FeedbackCycleTest.java
sonar-graph/src/test/java/org/sonar/graph/FeedbackEdgeTest.java
sonar-graph/src/test/java/org/sonar/graph/IncrementalCyclesAndFESSolverTest.java
sonar-graph/src/test/java/org/sonar/graph/MinimumFeedbackEdgeSetSolverTest.java
sonar-graph/src/test/java/org/sonar/graph/StringPrintWriter.java
sonar-gwt-api/src/main/java/org/sonar/gwt/Configuration.java
sonar-gwt-api/src/main/java/org/sonar/gwt/JsonUtils.java
sonar-gwt-api/src/main/java/org/sonar/gwt/Links.java
sonar-gwt-api/src/main/java/org/sonar/gwt/Metrics.java
sonar-gwt-api/src/main/java/org/sonar/gwt/Utils.java
sonar-gwt-api/src/main/java/org/sonar/gwt/ui/DefaultSourcePanel.java
sonar-gwt-api/src/main/java/org/sonar/gwt/ui/ExpandCollapseLink.java
sonar-gwt-api/src/main/java/org/sonar/gwt/ui/Icons.java
sonar-gwt-api/src/main/java/org/sonar/gwt/ui/Loading.java
sonar-gwt-api/src/main/java/org/sonar/gwt/ui/Page.java
sonar-gwt-api/src/main/java/org/sonar/gwt/ui/SourcePanel.java
sonar-gwt-api/src/main/java/org/sonar/gwt/ui/ViewerHeader.java
sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/AbstractCallback.java
sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/AbstractListCallback.java
sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/Callback.java
sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/GwtUtils.java
sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/ListCallback.java
sonar-gwt-api/src/main/java/org/sonar/wsclient/gwt/Sonar.java
sonar-java-api/src/main/java/org/sonar/java/api/JavaClass.java
sonar-java-api/src/main/java/org/sonar/java/api/JavaMethod.java
sonar-java-api/src/main/java/org/sonar/java/api/JavaUtils.java
sonar-java-api/src/test/java/org/sonar/java/api/JavaClassTest.java
sonar-java-api/src/test/java/org/sonar/java/api/JavaMethodTest.java
sonar-java-api/src/test/java/org/sonar/java/api/JavaUtilsTest.java
sonar-maven-plugin/src/main/java/org/sonar/maven/Maven2PluginExecutor.java
sonar-maven-plugin/src/main/java/org/sonar/maven/SonarMojo.java
sonar-maven3-plugin/src/main/java/org/sonar/maven3/Maven3PluginExecutor.java
sonar-maven3-plugin/src/main/java/org/sonar/maven3/SonarMojo.java
sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java
sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java
sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
sonar-plugin-api/src/main/java/org/sonar/api/Extension.java
sonar-plugin-api/src/main/java/org/sonar/api/ExtensionProvider.java
sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java
sonar-plugin-api/src/main/java/org/sonar/api/Plugins.java
sonar-plugin-api/src/main/java/org/sonar/api/Properties.java
sonar-plugin-api/src/main/java/org/sonar/api/Property.java
sonar-plugin-api/src/main/java/org/sonar/api/ServerComponent.java
sonar-plugin-api/src/main/java/org/sonar/api/ServerExtension.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractCoverageExtension.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractCpdMapping.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractDirectoriesDecorator.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractDivisionDecorator.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFileComplexityDecorator.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFilesDecorator.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFunctionComplexityDecorator.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractFunctionComplexityDistributionDecorator.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractSourceImporter.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractSumChildrenDecorator.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/BatchExtensionDictionnary.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/BuildBreaker.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/CheckProject.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/CpdMapping.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/Decorator.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/DecoratorBarriers.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/DecoratorContext.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/DefaultFormulaContext.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/DefaultFormulaData.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/DependedUpon.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/DependsUpon.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/Event.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/FileFilter.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/Phase.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/PostJob.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/ProjectClasspath.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/ResourceCreationLock.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/ResourceFilter.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/Sensor.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/SensorContext.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/SonarIndex.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/SquidUtils.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/SupportedEnvironment.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/TimeMachine.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/TimeMachineQuery.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/DependsUponCustomRules.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/DependsUponMavenPlugin.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenPlugin.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenPluginHandler.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenSurefireUtils.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenUtils.java
sonar-plugin-api/src/main/java/org/sonar/api/charts/AbstractChart.java
sonar-plugin-api/src/main/java/org/sonar/api/charts/Chart.java
sonar-plugin-api/src/main/java/org/sonar/api/charts/ChartParameters.java
sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java
sonar-plugin-api/src/main/java/org/sonar/api/checks/CheckFactory.java
sonar-plugin-api/src/main/java/org/sonar/api/checks/NoSonarFilter.java
sonar-plugin-api/src/main/java/org/sonar/api/database/BaseIdentifiable.java
sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseProperties.java
sonar-plugin-api/src/main/java/org/sonar/api/database/DatabaseSession.java
sonar-plugin-api/src/main/java/org/sonar/api/database/model/AsyncMeasureSnapshot.java
sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureData.java
sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureModel.java
sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java
sonar-plugin-api/src/main/java/org/sonar/api/database/model/RuleFailureModel.java
sonar-plugin-api/src/main/java/org/sonar/api/database/model/Snapshot.java
sonar-plugin-api/src/main/java/org/sonar/api/database/model/SnapshotSource.java
sonar-plugin-api/src/main/java/org/sonar/api/database/model/User.java
sonar-plugin-api/src/main/java/org/sonar/api/design/Dependency.java
sonar-plugin-api/src/main/java/org/sonar/api/design/DependencyDto.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/AverageComplexityFormula.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/CountDistributionBuilder.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/Formula.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/FormulaContext.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/FormulaData.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/MeanAggregationFormula.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/Measure.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasureBuilder.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasureUtils.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilter.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/MeasuresFilters.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/MetricFinder.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/Metrics.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/PersistenceMode.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/PropertiesBuilder.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/RangeDistributionBuilder.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/RuleMeasure.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildDistributionFormula.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/SumChildValuesFormula.java
sonar-plugin-api/src/main/java/org/sonar/api/measures/WeightedMeanAggregationFormula.java
sonar-plugin-api/src/main/java/org/sonar/api/platform/Environment.java
sonar-plugin-api/src/main/java/org/sonar/api/platform/PluginRepository.java
sonar-plugin-api/src/main/java/org/sonar/api/platform/Server.java
sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerFileSystem.java
sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerStartHandler.java
sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerStopHandler.java
sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerUpgradeStatus.java
sonar-plugin-api/src/main/java/org/sonar/api/profiles/Alert.java
sonar-plugin-api/src/main/java/org/sonar/api/profiles/AnnotationProfileParser.java
sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileDefinition.java
sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileExporter.java
sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileImporter.java
sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java
sonar-plugin-api/src/main/java/org/sonar/api/profiles/XMLProfileParser.java
sonar-plugin-api/src/main/java/org/sonar/api/profiles/XMLProfileSerializer.java
sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/Characteristic.java
sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/CharacteristicProperty.java
sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/Model.java
sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/ModelDefinition.java
sonar-plugin-api/src/main/java/org/sonar/api/qualitymodel/ModelFinder.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/AbstractLanguage.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/BlockUnit.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/DefaultProjectFileSystem.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/Directory.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/DuplicatedSourceException.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/File.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/InputFile.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/Java.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/JavaFile.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/JavaPackage.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/Language.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/Library.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectFileSystem.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectLink.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectUtils.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/Qualifiers.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/Resource.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/ResourceUtils.java
sonar-plugin-api/src/main/java/org/sonar/api/resources/Scopes.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRuleParam.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/AnnotationRuleParser.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/Iso9126RulesCategories.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleAnnotationUtils.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleFinder.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleParam.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/RulePriority.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleQuery.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleRepository.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleUtils.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/RulesCategory.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/Violation.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/ViolationFilter.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/XMLRuleParser.java
sonar-plugin-api/src/main/java/org/sonar/api/security/GroupRole.java
sonar-plugin-api/src/main/java/org/sonar/api/security/LoginPasswordAuthenticator.java
sonar-plugin-api/src/main/java/org/sonar/api/security/UserRole.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/AnnotationUtils.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpDownloader.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/IocContainer.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValue.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValueFormat.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/LocalizedMessages.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/Logs.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/ManifestUtils.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/ParsingUtils.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/ServerHttpClient.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/SonarException.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/StaxParser.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/TempFileUtils.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/TimeProfiler.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/ValidationMessages.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/WildcardPattern.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/XmlParserException.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/XpathParser.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/ZipUtils.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/dag/CyclicDependenciesException.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/dag/DirectAcyclicGraph.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/dag/Node.java
sonar-plugin-api/src/main/java/org/sonar/api/web/AbstractDashboardWidget.java
sonar-plugin-api/src/main/java/org/sonar/api/web/AbstractRubyTemplate.java
sonar-plugin-api/src/main/java/org/sonar/api/web/CodeColorizerFormat.java
sonar-plugin-api/src/main/java/org/sonar/api/web/DefaultTab.java
sonar-plugin-api/src/main/java/org/sonar/api/web/Description.java
sonar-plugin-api/src/main/java/org/sonar/api/web/Footer.java
sonar-plugin-api/src/main/java/org/sonar/api/web/GwtExtension.java
sonar-plugin-api/src/main/java/org/sonar/api/web/GwtPage.java
sonar-plugin-api/src/main/java/org/sonar/api/web/NavigationSection.java
sonar-plugin-api/src/main/java/org/sonar/api/web/Page.java
sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceLanguage.java
sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceQualifier.java
sonar-plugin-api/src/main/java/org/sonar/api/web/ResourceScope.java
sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsPage.java
sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWebservice.java
sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWidget.java
sonar-plugin-api/src/main/java/org/sonar/api/web/Section.java
sonar-plugin-api/src/main/java/org/sonar/api/web/UserRole.java
sonar-plugin-api/src/main/java/org/sonar/api/web/View.java
sonar-plugin-api/src/main/java/org/sonar/api/web/Webservice.java
sonar-plugin-api/src/main/java/org/sonar/api/web/Widget.java
sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetCategory.java
sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetLayout.java
sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetLayoutType.java
sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperties.java
sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java
sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetPropertyType.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/AbstractPage.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/AbstractViewer.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/ResourceDictionary.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/Utils.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/AbstractResourceQuery.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/BaseQueryCallback.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/FileSource.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/JSONHandlerDispatcher.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/JsonUtils.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Measure.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/MetricsQuery.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Properties.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/PropertiesQuery.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Property.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Query.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/QueryCallBack.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Resource.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Resources.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/ResourcesQuery.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/ResponsePOJO.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Rule.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/SequentialQueries.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/SourcesQuery.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Violation.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/Violations.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/ViolationsQuery.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/VoidResponse.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/webservices/WSMetrics.java
sonar-plugin-api/src/main/java/org/sonar/api/web/gwt/client/widgets/LoadingLabel.java
sonar-plugin-api/src/test/java/org/sonar/api/BaseModelTestCase.java
sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractCoverageExtensionTest.java
sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractDivisionDecoratorTest.java
sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractFileComplexityDecoratorTest.java
sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractFunctionComplexityDecoratorTest.java
sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractSourceImporterTest.java
sonar-plugin-api/src/test/java/org/sonar/api/batch/AbstractSumChildrenDecoratorTest.java
sonar-plugin-api/src/test/java/org/sonar/api/batch/BatchExtensionDictionnaryTest.java
sonar-plugin-api/src/test/java/org/sonar/api/batch/DefaultFormulaDataTest.java
sonar-plugin-api/src/test/java/org/sonar/api/batch/SquidUtilsTest.java
sonar-plugin-api/src/test/java/org/sonar/api/batch/TimeMachineQueryTest.java
sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenPluginTest.java
sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenSurefireUtilsTest.java
sonar-plugin-api/src/test/java/org/sonar/api/batch/maven/MavenUtilsTest.java
sonar-plugin-api/src/test/java/org/sonar/api/charts/AbstractChartTest.java
sonar-plugin-api/src/test/java/org/sonar/api/charts/ChartParametersTest.java
sonar-plugin-api/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java
sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithIntegerProperty.java
sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithKey.java
sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithOverriddenPropertyKey.java
sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithPrimitiveProperties.java
sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithStringProperty.java
sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithUnsupportedPropertyType.java
sonar-plugin-api/src/test/java/org/sonar/api/checks/CheckWithoutProperties.java
sonar-plugin-api/src/test/java/org/sonar/api/checks/NoSonarFilterTest.java
sonar-plugin-api/src/test/java/org/sonar/api/database/model/RuleFailureModelTest.java
sonar-plugin-api/src/test/java/org/sonar/api/database/model/SnapshotTest.java
sonar-plugin-api/src/test/java/org/sonar/api/design/DependencyTest.java
sonar-plugin-api/src/test/java/org/sonar/api/measures/AverageComplexityFormulaTest.java
sonar-plugin-api/src/test/java/org/sonar/api/measures/CountDistributionBuilderTest.java
sonar-plugin-api/src/test/java/org/sonar/api/measures/MeanAggregationFormulaTest.java
sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasureTest.java
sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasureUtilsTest.java
sonar-plugin-api/src/test/java/org/sonar/api/measures/MeasuresFiltersTest.java
sonar-plugin-api/src/test/java/org/sonar/api/measures/PersistenceModeTest.java
sonar-plugin-api/src/test/java/org/sonar/api/measures/PropertiesBuilderTest.java
sonar-plugin-api/src/test/java/org/sonar/api/measures/RangeDistributionBuilderTest.java
sonar-plugin-api/src/test/java/org/sonar/api/measures/RuleMeasureTest.java
sonar-plugin-api/src/test/java/org/sonar/api/measures/SumChildDistributionFormulaTest.java
sonar-plugin-api/src/test/java/org/sonar/api/measures/SumChildValuesFormulaTest.java
sonar-plugin-api/src/test/java/org/sonar/api/platform/EnvironmentTest.java
sonar-plugin-api/src/test/java/org/sonar/api/profiles/AnnotationProfileParserTest.java
sonar-plugin-api/src/test/java/org/sonar/api/profiles/ProfileExporterTest.java
sonar-plugin-api/src/test/java/org/sonar/api/profiles/ProfileImporterTest.java
sonar-plugin-api/src/test/java/org/sonar/api/profiles/RulesProfileTest.java
sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileParserTest.java
sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileSerializerTest.java
sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/CharacteristicPropertyTest.java
sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/CharacteristicTest.java
sonar-plugin-api/src/test/java/org/sonar/api/qualitymodel/ModelTest.java
sonar-plugin-api/src/test/java/org/sonar/api/resources/AbstractLanguageTest.java
sonar-plugin-api/src/test/java/org/sonar/api/resources/CoreMetricsTest.java
sonar-plugin-api/src/test/java/org/sonar/api/resources/DefaultProjectFileSystemTest.java
sonar-plugin-api/src/test/java/org/sonar/api/resources/DirectoryTest.java
sonar-plugin-api/src/test/java/org/sonar/api/resources/FileTest.java
sonar-plugin-api/src/test/java/org/sonar/api/resources/JavaFileTest.java
sonar-plugin-api/src/test/java/org/sonar/api/resources/JavaPackageTest.java
sonar-plugin-api/src/test/java/org/sonar/api/resources/LanguagesTest.java
sonar-plugin-api/src/test/java/org/sonar/api/resources/LibraryTest.java
sonar-plugin-api/src/test/java/org/sonar/api/resources/ProjectLinkTest.java
sonar-plugin-api/src/test/java/org/sonar/api/resources/ProjectTest.java
sonar-plugin-api/src/test/java/org/sonar/api/resources/QualifiersTest.java
sonar-plugin-api/src/test/java/org/sonar/api/resources/ResourceUtilsTest.java
sonar-plugin-api/src/test/java/org/sonar/api/resources/ScopesTest.java
sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotatedCheck.java
sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotatedCheckWithParameters.java
sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotationRuleParserTest.java
sonar-plugin-api/src/test/java/org/sonar/api/rules/DeprecatedAnnotatedCheck.java
sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleAnnotationUtilsTest.java
sonar-plugin-api/src/test/java/org/sonar/api/rules/RulePriorityTest.java
sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java
sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleUtilsTest.java
sonar-plugin-api/src/test/java/org/sonar/api/rules/XMLRuleParserTest.java
sonar-plugin-api/src/test/java/org/sonar/api/security/GroupRoleTest.java
sonar-plugin-api/src/test/java/org/sonar/api/test/IsMeasure.java
sonar-plugin-api/src/test/java/org/sonar/api/test/IsResource.java
sonar-plugin-api/src/test/java/org/sonar/api/test/IsRuleMeasure.java
sonar-plugin-api/src/test/java/org/sonar/api/test/IsViolation.java
sonar-plugin-api/src/test/java/org/sonar/api/test/MavenTestUtils.java
sonar-plugin-api/src/test/java/org/sonar/api/test/ProjectTestBuilder.java
sonar-plugin-api/src/test/java/org/sonar/api/test/SimpleProjectFileSystem.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/AnnotationUtilsTest.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/FakeServlet.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/IocContainerTest.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/KeyValueFormatTest.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/LocalizedMessagesTest.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/ManifestUtilsTest.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/ParsingUtilsTest.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/RedirectServlet.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/ServerHttpClientTest.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/StaxParserTest.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/TempFileUtilsTest.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/TimeProfilerTest.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/XpathParserTest.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/ZipUtilsTest.java
sonar-plugin-api/src/test/java/org/sonar/api/utils/dag/DirectAcyclicGraphTest.java
sonar-plugin-api/src/test/java/org/sonar/api/web/AbstractRubyTemplateTest.java
sonar-plugin-api/src/test/java/org/sonar/api/web/CodeColorizerFormatTest.java
sonar-server/src/main/java/org/sonar/server/charts/ChartFactory.java
sonar-server/src/main/java/org/sonar/server/charts/ChartsServlet.java
sonar-server/src/main/java/org/sonar/server/charts/deprecated/BarChart.java
sonar-server/src/main/java/org/sonar/server/charts/deprecated/BaseChart.java
sonar-server/src/main/java/org/sonar/server/charts/deprecated/BaseChartWeb.java
sonar-server/src/main/java/org/sonar/server/charts/deprecated/CustomBarChart.java
sonar-server/src/main/java/org/sonar/server/charts/deprecated/CustomBarRenderer.java
sonar-server/src/main/java/org/sonar/server/charts/deprecated/DeprecatedChart.java
sonar-server/src/main/java/org/sonar/server/charts/deprecated/PieChart.java
sonar-server/src/main/java/org/sonar/server/charts/deprecated/SparkLinesChart.java
sonar-server/src/main/java/org/sonar/server/charts/jruby/TrendsChart.java
sonar-server/src/main/java/org/sonar/server/configuration/Backup.java
sonar-server/src/main/java/org/sonar/server/configuration/Backupable.java
sonar-server/src/main/java/org/sonar/server/configuration/ConfigurationException.java
sonar-server/src/main/java/org/sonar/server/configuration/ConfigurationFactory.java
sonar-server/src/main/java/org/sonar/server/configuration/ConfigurationLogger.java
sonar-server/src/main/java/org/sonar/server/configuration/CoreConfiguration.java
sonar-server/src/main/java/org/sonar/server/configuration/MetricsBackup.java
sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java
sonar-server/src/main/java/org/sonar/server/configuration/ProfilesManager.java
sonar-server/src/main/java/org/sonar/server/configuration/PropertiesBackup.java
sonar-server/src/main/java/org/sonar/server/configuration/RulesBackup.java
sonar-server/src/main/java/org/sonar/server/configuration/SonarConfig.java
sonar-server/src/main/java/org/sonar/server/database/EmbeddedDatabase.java
sonar-server/src/main/java/org/sonar/server/database/EmbeddedDatabaseFactory.java
sonar-server/src/main/java/org/sonar/server/database/JndiDatabaseConnector.java
sonar-server/src/main/java/org/sonar/server/database/JndiException.java
sonar-server/src/main/java/org/sonar/server/database/UniqueDatasourceFactory.java
sonar-server/src/main/java/org/sonar/server/filters/DateCriterion.java
sonar-server/src/main/java/org/sonar/server/filters/Filter.java
sonar-server/src/main/java/org/sonar/server/filters/FilterExecutor.java
sonar-server/src/main/java/org/sonar/server/filters/FilterResult.java
sonar-server/src/main/java/org/sonar/server/filters/MeasureCriterion.java
sonar-server/src/main/java/org/sonar/server/mavendeployer/Artifact.java
sonar-server/src/main/java/org/sonar/server/mavendeployer/MavenRepository.java
sonar-server/src/main/java/org/sonar/server/mavendeployer/Mojo.java
sonar-server/src/main/java/org/sonar/server/platform/DefaultServerFileSystem.java
sonar-server/src/main/java/org/sonar/server/platform/DefaultServerUpgradeStatus.java
sonar-server/src/main/java/org/sonar/server/platform/Platform.java
sonar-server/src/main/java/org/sonar/server/platform/PlatformLifecycleListener.java
sonar-server/src/main/java/org/sonar/server/platform/ServerImpl.java
sonar-server/src/main/java/org/sonar/server/platform/ServerLifecycleNotifier.java
sonar-server/src/main/java/org/sonar/server/platform/ServerStartException.java
sonar-server/src/main/java/org/sonar/server/plugins/BatchResourcesServlet.java
sonar-server/src/main/java/org/sonar/server/plugins/PluginClassLoaders.java
sonar-server/src/main/java/org/sonar/server/plugins/PluginDeployer.java
sonar-server/src/main/java/org/sonar/server/plugins/PluginDownloader.java
sonar-server/src/main/java/org/sonar/server/plugins/PluginMetadata.java
sonar-server/src/main/java/org/sonar/server/plugins/PluginUpdate.java
sonar-server/src/main/java/org/sonar/server/plugins/ServerPluginRepository.java
sonar-server/src/main/java/org/sonar/server/plugins/SonarUpdate.java
sonar-server/src/main/java/org/sonar/server/plugins/StaticResourcesServlet.java
sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterClient.java
sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterMatrix.java
sonar-server/src/main/java/org/sonar/server/plugins/UpdateCenterMatrixFactory.java
sonar-server/src/main/java/org/sonar/server/qualitymodel/DefaultModelManager.java
sonar-server/src/main/java/org/sonar/server/qualitymodel/ModelManager.java
sonar-server/src/main/java/org/sonar/server/rules/DeprecatedProfileExporters.java
sonar-server/src/main/java/org/sonar/server/rules/DeprecatedProfileImporters.java
sonar-server/src/main/java/org/sonar/server/rules/DeprecatedProfiles.java
sonar-server/src/main/java/org/sonar/server/rules/DeprecatedRuleRepositories.java
sonar-server/src/main/java/org/sonar/server/rules/ProfilesConsole.java
sonar-server/src/main/java/org/sonar/server/rules/RulesConsole.java
sonar-server/src/main/java/org/sonar/server/startup/ActivateDefaultProfiles.java
sonar-server/src/main/java/org/sonar/server/startup/DeleteDeprecatedMeasures.java
sonar-server/src/main/java/org/sonar/server/startup/EnableProfiles.java
sonar-server/src/main/java/org/sonar/server/startup/GwtPublisher.java
sonar-server/src/main/java/org/sonar/server/startup/JdbcDriverDeployer.java
sonar-server/src/main/java/org/sonar/server/startup/RegisterMetrics.java
sonar-server/src/main/java/org/sonar/server/startup/RegisterProvidedProfiles.java
sonar-server/src/main/java/org/sonar/server/startup/RegisterQualityModels.java
sonar-server/src/main/java/org/sonar/server/startup/RegisterRules.java
sonar-server/src/main/java/org/sonar/server/startup/ServerMetadataPersister.java
sonar-server/src/main/java/org/sonar/server/ui/AuthenticatorFactory.java
sonar-server/src/main/java/org/sonar/server/ui/AuthenticatorNotFoundException.java
sonar-server/src/main/java/org/sonar/server/ui/CodeColorizers.java
sonar-server/src/main/java/org/sonar/server/ui/DatabaseSessionFilter.java
sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java
sonar-server/src/main/java/org/sonar/server/ui/SonarRackFilter.java
sonar-server/src/main/java/org/sonar/server/ui/ViewProxy.java
sonar-server/src/main/java/org/sonar/server/ui/Views.java
sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_dashboards_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_filters_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/alerts_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/api_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependencies_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/dependency_tree_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/events_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/favourites_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/gwp_resources_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/metrics_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/projects_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/properties_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resource_rest_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rest_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/rules_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/server_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/sources_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/updatecenter_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/user_properties_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/application_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/backup_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/charts_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/columns_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/components_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/dependencies_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/event_categories_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/events_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/favourites_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/feeds_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/groups_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/ie6_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/maintenance_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/metrics_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/configuration_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/home_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/project_roles_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_configuration_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/rules_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/sessions_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/setup_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/system_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/timemachine_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/updatecenter_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/alerts_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/chart_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/components_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/dashboard_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/filters_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/metrics_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/plugins_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/profiles_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/project_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/roles_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/sessions_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/system_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/timemachine_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/updatecenter_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/users_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/models/active_dashboard.rb
sonar-server/src/main/webapp/WEB-INF/app/models/active_filter.rb
sonar-server/src/main/webapp/WEB-INF/app/models/active_rule.rb
sonar-server/src/main/webapp/WEB-INF/app/models/active_rule_parameter.rb
sonar-server/src/main/webapp/WEB-INF/app/models/alert.rb
sonar-server/src/main/webapp/WEB-INF/app/models/api/dashboard_configuration.rb
sonar-server/src/main/webapp/WEB-INF/app/models/async_measure_snapshot.rb
sonar-server/src/main/webapp/WEB-INF/app/models/caches.rb
sonar-server/src/main/webapp/WEB-INF/app/models/characteristic.rb
sonar-server/src/main/webapp/WEB-INF/app/models/characteristic_property.rb
sonar-server/src/main/webapp/WEB-INF/app/models/chart_measure.rb
sonar-server/src/main/webapp/WEB-INF/app/models/criterion.rb
sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb
sonar-server/src/main/webapp/WEB-INF/app/models/dependency.rb
sonar-server/src/main/webapp/WEB-INF/app/models/drilldown.rb
sonar-server/src/main/webapp/WEB-INF/app/models/event.rb
sonar-server/src/main/webapp/WEB-INF/app/models/event_category.rb
sonar-server/src/main/webapp/WEB-INF/app/models/filter.rb
sonar-server/src/main/webapp/WEB-INF/app/models/filter_column.rb
sonar-server/src/main/webapp/WEB-INF/app/models/filter_context.rb
sonar-server/src/main/webapp/WEB-INF/app/models/group.rb
sonar-server/src/main/webapp/WEB-INF/app/models/group_role.rb
sonar-server/src/main/webapp/WEB-INF/app/models/measure_color.rb
sonar-server/src/main/webapp/WEB-INF/app/models/measure_data.rb
sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb
sonar-server/src/main/webapp/WEB-INF/app/models/navigation.rb
sonar-server/src/main/webapp/WEB-INF/app/models/plugin.rb
sonar-server/src/main/webapp/WEB-INF/app/models/plugin_file.rb
sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb
sonar-server/src/main/webapp/WEB-INF/app/models/project.rb
sonar-server/src/main/webapp/WEB-INF/app/models/project_link.rb
sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb
sonar-server/src/main/webapp/WEB-INF/app/models/property.rb
sonar-server/src/main/webapp/WEB-INF/app/models/quality_model.rb
sonar-server/src/main/webapp/WEB-INF/app/models/role.rb
sonar-server/src/main/webapp/WEB-INF/app/models/rule.rb
sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb
sonar-server/src/main/webapp/WEB-INF/app/models/rules_parameter.rb
sonar-server/src/main/webapp/WEB-INF/app/models/server.rb
sonar-server/src/main/webapp/WEB-INF/app/models/snapshot.rb
sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb
sonar-server/src/main/webapp/WEB-INF/app/models/sonar/columns_view.rb
sonar-server/src/main/webapp/WEB-INF/app/models/sonar/components_configuration.rb
sonar-server/src/main/webapp/WEB-INF/app/models/sonar/resource_finder.rb
sonar-server/src/main/webapp/WEB-INF/app/models/sonar/rule_priority.rb
sonar-server/src/main/webapp/WEB-INF/app/models/sonar/timemachine_row.rb
sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap.rb
sonar-server/src/main/webapp/WEB-INF/app/models/sonar/treemap_builder.rb
sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb
sonar-server/src/main/webapp/WEB-INF/app/models/user.rb
sonar-server/src/main/webapp/WEB-INF/app/models/user_role.rb
sonar-server/src/main/webapp/WEB-INF/app/models/widget.rb
sonar-server/src/main/webapp/WEB-INF/app/models/widget_property.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/002_index_database.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/010_create_users.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/013_add_metrics_names.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/014_create_rules_profiles.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/016_add_rules_profiles_provided_column.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/035_projects_to_entities.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/036_add_measure_tendency.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/039_add_rules_profiles_language.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/041_increase_rules_name_size.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/046_simplify_metrics.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/048_create_async_measure_snapshots_table.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/049_remove_external_measures_table.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/051_add_metrics_origin_column.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/052_remove_columns_views_table.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/053_create_events_table.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/054_create_alerts_table.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/055_create_profiles_per_project.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/057_ensure_measure_snapshot_column_null.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/058_add_snapshots_path.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/059_add_properties_resource.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/060_add_project_language.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/061_add_measure_data.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/062_add_project_kee_index.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/066_increase_size_of_rules_profiles_name.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/068_add_rule_priority.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/069_add_diff_columns_to_measures.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/072_delete_snapshots_purged.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/073_add_line_to_rule_failures.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/075_reset_tendency_depth.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/076_upgrade_properties_to_blobs.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/077_add_copy_resource_id_to_projects.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/078_increase_project_kee_size.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/079_create_groups.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/080_create_groups_users.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/081_add_projects_long_name.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/082_include_branch_in_project_name.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/084_delete_some_findbugs_rules.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/085_add_metric_value_limits.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/086_create_group_roles.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/087_create_user_roles.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/088_create_default_users_and_groups.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/089_set_default_project_roles.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/090_add_name_to_users.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/091_add_root_project_id_to_snapshots.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/092_fill_snapshots_root_project_id.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/093_create_dependencies_table.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/094_add_metrics_hidden_column.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/095_increase_measure_id_size.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/096_mssql_change_text_columns_to_varchar.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/097_increase_dep_usage_size.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/098_increase_snapshots_version.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/099_delete_deprecated_libraries.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/100_delete_checkstyle_regexp_rules.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/101_remove_null_snapshot_created_at.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/110_add_events_data.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/111_create_extensions.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/112_delete_checkstyle_jee_rules.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/113_rename_clover_properties.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/114_add_user_properties.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/115_create_filters.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/116_set_resource_long_names.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/117_remove_measure_sid_index.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/118_add_snapshots_qualifier_index.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/119_add_measures_sid_metric_index.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/120_add_extensions_core_column.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/131_create_quality_models.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/132_add_characteristic_id_to_measures.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/133_create_plugins.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/134_delete_checkstyle_translations.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/135_add_rules_enabled_column.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/136_increase_violations_size.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/137_add_rules_cardinality.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/138_add_characteristic_description.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/139_add_characteristic_enabled.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/140_create_characteristic_properties.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/141_add_rule_failures_cost.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/142_delete_active_rules_orphans.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/150_add_plugins_child_first_classloader_column.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/151_create_dashboards.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/160_add_rule_failures_columns.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/162_delete_iso_rule_categories.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/163_add_variation_columns.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/165_set_nullable_rule_config_key.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/166_set_nullable_rule_parameter_description.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/167_add_index_to_measure_data_snapshot.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/168_add_periods_to_filters.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/169_add_columns_for_profiles_inheritance.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/170_delete_unvalid_project_snapshots.rb
sonar-server/src/main/webapp/WEB-INF/db/migrate/180_add_profiles_disabled.rb
sonar-server/src/main/webapp/WEB-INF/lib/authorization/all_pass_authorizer.rb
sonar-server/src/main/webapp/WEB-INF/lib/authorization/default_authorizer.rb
sonar-server/src/main/webapp/WEB-INF/lib/authorization/logged_in_authorizer.rb
sonar-server/src/main/webapp/WEB-INF/lib/database_version.rb
sonar-server/src/main/webapp/WEB-INF/lib/need_authentication.rb
sonar-server/src/main/webapp/WEB-INF/lib/need_authorization.rb
sonar-server/src/main/webapp/WEB-INF/lib/resourceable.rb
sonar-server/src/main/webapp/WEB-INF/lib/slf4j_logger.rb
sonar-server/src/main/webapp/WEB-INF/lib/sonar_webservice_plugins.rb
sonar-server/src/test/java/org/sonar/server/charts/ChartFactoryTest.java
sonar-server/src/test/java/org/sonar/server/charts/FakeChart.java
sonar-server/src/test/java/org/sonar/server/charts/deprecated/BarChartTest.java
sonar-server/src/test/java/org/sonar/server/charts/deprecated/BaseChartTest.java
sonar-server/src/test/java/org/sonar/server/charts/deprecated/BaseChartWebTest.java
sonar-server/src/test/java/org/sonar/server/charts/deprecated/CustomBarChartTest.java
sonar-server/src/test/java/org/sonar/server/charts/deprecated/PieChartTest.java
sonar-server/src/test/java/org/sonar/server/charts/deprecated/SparkLinesChartTest.java
sonar-server/src/test/java/org/sonar/server/charts/jruby/TrendsChartTest.java
sonar-server/src/test/java/org/sonar/server/configuration/BackupTest.java
sonar-server/src/test/java/org/sonar/server/configuration/ConfigurationFactoryTest.java
sonar-server/src/test/java/org/sonar/server/configuration/InheritedProfilesTest.java
sonar-server/src/test/java/org/sonar/server/configuration/MetricsBackupTest.java
sonar-server/src/test/java/org/sonar/server/configuration/ProfilesBackupTest.java
sonar-server/src/test/java/org/sonar/server/configuration/ProfilesManagerTest.java
sonar-server/src/test/java/org/sonar/server/configuration/PropertiesBackupTest.java
sonar-server/src/test/java/org/sonar/server/configuration/RulesBackupTest.java
sonar-server/src/test/java/org/sonar/server/database/EmbeddedDatabaseTest.java
sonar-server/src/test/java/org/sonar/server/database/JndiDatabaseConnectorTest.java
sonar-server/src/test/java/org/sonar/server/database/UniqueDatasourceFactoryTest.java
sonar-server/src/test/java/org/sonar/server/filters/DateCriterionTest.java
sonar-server/src/test/java/org/sonar/server/filters/FilterExecutorTest.java
sonar-server/src/test/java/org/sonar/server/filters/FilterResultTest.java
sonar-server/src/test/java/org/sonar/server/mavendeployer/ArtifactTest.java
sonar-server/src/test/java/org/sonar/server/mavendeployer/MavenRepositoryTest.java
sonar-server/src/test/java/org/sonar/server/mavendeployer/MojoTest.java
sonar-server/src/test/java/org/sonar/server/platform/DefaultServerUpgradeStatusTest.java
sonar-server/src/test/java/org/sonar/server/platform/ServerFileSystemTest.java
sonar-server/src/test/java/org/sonar/server/platform/ServerImplTest.java
sonar-server/src/test/java/org/sonar/server/platform/ServerLifecycleNotifierTest.java
sonar-server/src/test/java/org/sonar/server/plugins/BatchResourcesServletTest.java
sonar-server/src/test/java/org/sonar/server/plugins/PluginClassLoadersTest.java
sonar-server/src/test/java/org/sonar/server/plugins/PluginDeployerTest.java
sonar-server/src/test/java/org/sonar/server/plugins/PluginMetadataTest.java
sonar-server/src/test/java/org/sonar/server/plugins/PluginUpdateTest.java
sonar-server/src/test/java/org/sonar/server/plugins/ServerPluginRepositoryTest.java
sonar-server/src/test/java/org/sonar/server/plugins/SonarUpdateTest.java
sonar-server/src/test/java/org/sonar/server/plugins/StaticResourcesServletTest.java
sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java
sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterMatrixTest.java
sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterServlet.java
sonar-server/src/test/java/org/sonar/server/qualitymodel/DefaultModelManagerTest.java
sonar-server/src/test/java/org/sonar/server/rules/DeprecatedProfilesTest.java
sonar-server/src/test/java/org/sonar/server/startup/DeleteDeprecatedMeasuresTest.java
sonar-server/src/test/java/org/sonar/server/startup/EnableProfilesTest.java
sonar-server/src/test/java/org/sonar/server/startup/GwtPublisherTest.java
sonar-server/src/test/java/org/sonar/server/startup/JdbcDriverDeployerTest.java
sonar-server/src/test/java/org/sonar/server/startup/RegisterMetricsTest.java
sonar-server/src/test/java/org/sonar/server/startup/RegisterQualityModelsTest.java
sonar-server/src/test/java/org/sonar/server/startup/RegisterRulesTest.java
sonar-server/src/test/java/org/sonar/server/startup/ServerMetadataPersisterTest.java
sonar-server/src/test/java/org/sonar/server/ui/AuthenticatorFactoryTest.java
sonar-server/src/test/java/org/sonar/server/ui/FakePage.java
sonar-server/src/test/java/org/sonar/server/ui/FakeResourceViewer.java
sonar-server/src/test/java/org/sonar/server/ui/FakeWidget.java
sonar-server/src/test/java/org/sonar/server/ui/ViewProxyTest.java
sonar-server/src/test/java/org/sonar/server/ui/ViewsTest.java
sonar-squid/src/main/java/org/sonar/squid/Squid.java
sonar-squid/src/main/java/org/sonar/squid/api/AnalysisException.java
sonar-squid/src/main/java/org/sonar/squid/api/CheckMessage.java
sonar-squid/src/main/java/org/sonar/squid/api/CodeCheck.java
sonar-squid/src/main/java/org/sonar/squid/api/CodeScanner.java
sonar-squid/src/main/java/org/sonar/squid/api/CodeVisitor.java
sonar-squid/src/main/java/org/sonar/squid/api/Query.java
sonar-squid/src/main/java/org/sonar/squid/api/SourceClass.java
sonar-squid/src/main/java/org/sonar/squid/api/SourceCode.java
sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeEdge.java
sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeEdgeUsage.java
sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeIndexer.java
sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeSearchEngine.java
sonar-squid/src/main/java/org/sonar/squid/api/SourceCodeTreeDecorator.java
sonar-squid/src/main/java/org/sonar/squid/api/SourceFile.java
sonar-squid/src/main/java/org/sonar/squid/api/SourceFunction.java
sonar-squid/src/main/java/org/sonar/squid/api/SourceMethod.java
sonar-squid/src/main/java/org/sonar/squid/api/SourcePackage.java
sonar-squid/src/main/java/org/sonar/squid/api/SourceProject.java
sonar-squid/src/main/java/org/sonar/squid/api/SquidConfiguration.java
sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByMeasure.java
sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByName.java
sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByParent.java
sonar-squid/src/main/java/org/sonar/squid/indexer/QueryByType.java
sonar-squid/src/main/java/org/sonar/squid/indexer/SquidIndex.java
sonar-squid/src/main/java/org/sonar/squid/math/MeasuresDistribution.java
sonar-squid/src/main/java/org/sonar/squid/measures/AbstractnessFormula.java
sonar-squid/src/main/java/org/sonar/squid/measures/AggregationFormula.java
sonar-squid/src/main/java/org/sonar/squid/measures/CalculatedMetricFormula.java
sonar-squid/src/main/java/org/sonar/squid/measures/CommentLinesDensityFormula.java
sonar-squid/src/main/java/org/sonar/squid/measures/CommentLinesWithoutHeaderFormula.java
sonar-squid/src/main/java/org/sonar/squid/measures/DistanceFormula.java
sonar-squid/src/main/java/org/sonar/squid/measures/InstabilityFormula.java
sonar-squid/src/main/java/org/sonar/squid/measures/MeanAggregationFormula.java
sonar-squid/src/main/java/org/sonar/squid/measures/Measurable.java
sonar-squid/src/main/java/org/sonar/squid/measures/Measures.java
sonar-squid/src/main/java/org/sonar/squid/measures/Metric.java
sonar-squid/src/main/java/org/sonar/squid/measures/MetricDef.java
sonar-squid/src/main/java/org/sonar/squid/measures/NoAggregationFormula.java
sonar-squid/src/main/java/org/sonar/squid/measures/PublicDocumentedApiDensityFormula.java
sonar-squid/src/main/java/org/sonar/squid/measures/SumAggregationFormula.java
sonar-squid/src/main/java/org/sonar/squid/recognizer/CamelCaseDetector.java
sonar-squid/src/main/java/org/sonar/squid/recognizer/CodeRecognizer.java
sonar-squid/src/main/java/org/sonar/squid/recognizer/ContainsDetector.java
sonar-squid/src/main/java/org/sonar/squid/recognizer/Detector.java
sonar-squid/src/main/java/org/sonar/squid/recognizer/EndWithDetector.java
sonar-squid/src/main/java/org/sonar/squid/recognizer/KeywordsDetector.java
sonar-squid/src/main/java/org/sonar/squid/recognizer/LanguageFootprint.java
sonar-squid/src/main/java/org/sonar/squid/recognizer/RegexDetector.java
sonar-squid/src/main/java/org/sonar/squid/text/Line.java
sonar-squid/src/main/java/org/sonar/squid/text/LineContextHandler.java
sonar-squid/src/main/java/org/sonar/squid/text/LinesFactory.java
sonar-squid/src/main/java/org/sonar/squid/text/LiteralValueHandler.java
sonar-squid/src/main/java/org/sonar/squid/text/MultiLinesCommentHandler.java
sonar-squid/src/main/java/org/sonar/squid/text/SingleLineCommentHandler.java
sonar-squid/src/main/java/org/sonar/squid/text/Source.java
sonar-squid/src/main/java/org/sonar/squid/text/StringArrayReader.java
sonar-squid/src/test/java/org/sonar/squid/api/CheckMessageTest.java
sonar-squid/src/test/java/org/sonar/squid/api/SourceCodeTest.java
sonar-squid/src/test/java/org/sonar/squid/api/SourceCodeTreeDecoratorTest.java
sonar-squid/src/test/java/org/sonar/squid/api/SourceFileTest.java
sonar-squid/src/test/java/org/sonar/squid/api/SourceMethodTest.java
sonar-squid/src/test/java/org/sonar/squid/indexer/SquidIndexTest.java
sonar-squid/src/test/java/org/sonar/squid/math/MeasuresDistributionTest.java
sonar-squid/src/test/java/org/sonar/squid/measures/AbstractnessFormulaTest.java
sonar-squid/src/test/java/org/sonar/squid/measures/CommentLinesDensityFormulaTest.java
sonar-squid/src/test/java/org/sonar/squid/measures/CommentLinesWithoutHeaderFormulaTest.java
sonar-squid/src/test/java/org/sonar/squid/measures/DistanceFormulaTest.java
sonar-squid/src/test/java/org/sonar/squid/measures/InstabilityFormulaTest.java
sonar-squid/src/test/java/org/sonar/squid/measures/MeanAggregationFormulaTest.java
sonar-squid/src/test/java/org/sonar/squid/measures/MeasuresTest.java
sonar-squid/src/test/java/org/sonar/squid/measures/PublicDocumentedApiDensityFormulaTest.java
sonar-squid/src/test/java/org/sonar/squid/measures/SumAggregationFormulaTest.java
sonar-squid/src/test/java/org/sonar/squid/recognizer/CamelCaseDetectorTest.java
sonar-squid/src/test/java/org/sonar/squid/recognizer/ContainsDetectorTest.java
sonar-squid/src/test/java/org/sonar/squid/recognizer/EndWithDetectorTest.java
sonar-squid/src/test/java/org/sonar/squid/recognizer/KeywordsDetectorTest.java
sonar-squid/src/test/java/org/sonar/squid/recognizer/RegexDetectorTest.java
sonar-squid/src/test/java/org/sonar/squid/text/JavaFootprint.java
sonar-squid/src/test/java/org/sonar/squid/text/LineTest.java
sonar-squid/src/test/java/org/sonar/squid/text/LinesFactoryTest.java
sonar-squid/src/test/java/org/sonar/squid/text/LiteralValueHandlerTest.java
sonar-squid/src/test/java/org/sonar/squid/text/MultiLineCommentHandlerTest.java
sonar-squid/src/test/java/org/sonar/squid/text/SingleLineCommentHandlerTest.java
sonar-squid/src/test/java/org/sonar/squid/text/SourceTest.java
sonar-squid/src/test/java/org/sonar/squid/text/StringArrayReaderTest.java
sonar-testing-harness/src/main/java/org/sonar/test/TestUtils.java
sonar-testing-harness/src/main/java/org/sonar/test/channel/ChannelMatcher.java
sonar-testing-harness/src/main/java/org/sonar/test/channel/ChannelMatchers.java
sonar-testing-harness/src/main/java/org/sonar/test/channel/ReaderHasNextCharMatcher.java
sonar-testing-harness/src/test/java/org/sonar/test/TestUtilsTest.java
sonar-testing-harness/src/test/java/org/sonar/test/channel/ChannelMatchersTest.java
sonar-ws-client/src/main/java/org/sonar/wsclient/Host.java
sonar-ws-client/src/main/java/org/sonar/wsclient/JdkUtils.java
sonar-ws-client/src/main/java/org/sonar/wsclient/Sonar.java
sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/ConnectionException.java
sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/Connector.java
sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/ConnectorFactory.java
sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient3Connector.java
sonar-ws-client/src/main/java/org/sonar/wsclient/connectors/HttpClient4Connector.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/AbstractQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/CreateQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/DeleteQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/Dependency.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/DependencyQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/DependencyTree.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/DependencyTreeQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/Event.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/EventCreateQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/EventQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/Favourite.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/FavouriteCreateQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/FavouriteDeleteQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/FavouriteQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/Measure.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/Metric.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/MetricQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/Model.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/Plugin.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/Property.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyCreateQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyDeleteQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/PropertyUpdateQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/Query.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/Resource.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/ResourceQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/Rule.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/RuleParam.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/RuleQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/Server.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/ServerQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/Source.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/SourceQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachine.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineCell.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineColumn.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/TimeMachineQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/UpdateCenterQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/UpdateQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/UserPropertyCreateQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/UserPropertyDeleteQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/UserPropertyQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/Violation.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/ViolationQuery.java
sonar-ws-client/src/main/java/org/sonar/wsclient/services/WSUtils.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/AbstractUnmarshaller.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/DependencyTreeUnmarshaller.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/DependencyUnmarshaller.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/EventUnmarshaller.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/FavouriteUnmarshaller.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/JsonUtils.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/MetricUnmarshaller.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/PluginUnmarshaller.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/PropertyUnmarshaller.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshaller.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/RuleUnmarshaller.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ServerUnmarshaller.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/SourceUnmarshaller.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshaller.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/Unmarshaller.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/Unmarshallers.java
sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshaller.java
sonar-ws-client/src/test/java/org/sonar/wsclient/EmptyServlet.java
sonar-ws-client/src/test/java/org/sonar/wsclient/MetricServlet.java
sonar-ws-client/src/test/java/org/sonar/wsclient/ServerServlet.java
sonar-ws-client/src/test/java/org/sonar/wsclient/SonarTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/AbstractQueryTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/DependencyQueryTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/EventQueryTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/MeasureTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/MetricQueryTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyCreateQueryTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyDeleteQueryTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/PropertyQueryTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceQueryTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/ResourceTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/RuleQueryTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/ServerQueryTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/SourceQueryTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/TimeMachineQueryTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/UpdateCenterQueryTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyCreateQueryTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/UserPropertyDeleteQueryTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/services/ViolationQueryTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyTreeUnmarshallerTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/DependencyUnmarshallerTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/EventUnmarshallerTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/JsonUtilsTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/MetricUnmarshallerTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PluginUnmarshallerTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/PropertyUnmarshallerTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ResourceUnmarshallerTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/RuleUnmarshallerTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ServerUnmarshallerTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/SourceUnmarshallerTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/TimeMachineUnmarshallerTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallerTestCase.java
sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/UnmarshallersTest.java
sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java
sonar-ws-client/src/test/resources/sources/from_line_to_line.json
sonar-ws-client/src/test/resources/sources/source.json
tests/integration/sonar-it-reference-plugin/src/main/java/itests/ITestsPlugin.java
tests/integration/sonar-it-reference-plugin/src/main/java/itests/SampleSensor.java
tests/integration/sonar-it-reference-plugin/src/main/java/itests/ServerSideExtensionUsingExternalDependency.java
tests/integration/sonar-it-reference-plugin/src/main/java/itests/footer/SampleFooter.java
tests/integration/sonar-it-reference-plugin/src/main/java/itests/languages/LanguageWithoutRulesEngine.java
tests/integration/sonar-it-reference-plugin/src/main/java/itests/page/GwtSamplePage.java
tests/integration/sonar-it-reference-plugin/src/main/java/itests/page/RubyApiTestsPage.java
tests/integration/sonar-it-reference-plugin/src/main/java/itests/page/client/GwtModule.java
tests/integration/sonar-it-reference-plugin/src/main/java/itests/resourcetab/SampleResourceTab.java
tests/integration/sonar-it-reference-plugin/src/main/java/itests/resourcetab/client/GwtSampleResourceTab.java
tests/integration/sonar-it-reference-plugin/src/main/java/itests/ws/RubyWebService.java
tests/integration/sonar-it-reference-plugin/src/main/resources/itests/ws/ruby_ws_controller.rb
tests/integration/tests/maven-projects/SONAR-767-pmd-close-resource-rule/src/main/java/org/sonar/tests/CloseableResource.java
tests/integration/tests/maven-projects/SONAR-767-pmd-close-resource-rule/src/main/java/org/sonar/tests/ConnectionIsClosedInOtherMethod.java
tests/integration/tests/maven-projects/SONAR-767-pmd-close-resource-rule/src/main/java/org/sonar/tests/ResourceIsClosedInOtherMethod.java
tests/integration/tests/maven-projects/duplications/src/main/java/org/sonar/samples/duplicated_same_lines_within_3_classes/Class1.java
tests/integration/tests/maven-projects/duplications/src/main/java/org/sonar/samples/duplicated_same_lines_within_3_classes/Class2.java
tests/integration/tests/maven-projects/duplications/src/main/java/org/sonar/samples/duplicated_same_lines_within_3_classes/Class3.java
tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithAnonymousClass.java
tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithInnerClass.java
tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithLocalInnerClass.java
tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithStaticInnerClass.java
tests/integration/tests/maven-projects/java-inner-classes/src/main/java/WithSubClass.java
tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithAnonymousClassTest.java
tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithInnerClassTest.java
tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithLocalInnerClassTest.java
tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithStaticInnerClassTest.java
tests/integration/tests/maven-projects/java-inner-classes/src/test/java/WithSubClassTest.java
tests/integration/tests/maven-projects/many-source-dirs/src/test/java2/org/sonar/tests/FirstClassTest.java
tests/integration/tests/maven-projects/plugin-build-helper/src/main/java/Java1PackageClass.java
tests/integration/tests/maven-projects/plugin-build-helper/src/main/java2/Java2PackageClass.java
tests/integration/tests/maven-projects/plugin-build-helper/src/main/java3/Java3PackageClass.java
tests/integration/tests/maven-projects/test-failures/moduleB/src/test/java/ch/hortis/sonar/samples/testFailures/moduleB/NoTest.java
tests/integration/tests/maven-projects/test-failures/moduleB/src/test/java/ch/hortis/sonar/samples/testFailures/moduleB/SkippedTest.java
tests/integration/tests/src/test/java/org/sonar/tests/integration/GzipCompressionIT.java
tests/integration/tests/src/test/java/org/sonar/tests/integration/ITUtils.java
tests/integration/tests/src/test/java/org/sonar/tests/integration/JavaComplexityIT.java
tests/integration/tests/src/test/java/org/sonar/tests/integration/ServerIT.java
tests/integration/tests/src/test/java/org/sonar/tests/integration/Struts139IT.java
tests/integration/tests/src/test/java/org/sonar/tests/integration/UpdateCenterIT.java
tests/integration/tests/src/test/java/org/sonar/tests/integration/VariationsIT.java
tests/integration/tests/src/test/java/org/sonar/tests/integration/ViolationsTimeMachineIT.java
tests/integration/tests/src/test/java/org/sonar/tests/integration/selenium/CustomizeComponentsPageIT.java
tests/integration/tests/src/test/java/org/sonar/tests/integration/selenium/DeployUIExtensionsIT.java
tests/integration/tests/src/test/java/org/sonar/tests/integration/selenium/SonarTestCase.java
tests/volume/src/it/java/org/sonar/tests/volume/HomepageTest.java

index d868b0b2e5323a4eeff6fc7d0a229f2beae00b12..4f3dc1be72ccbc86f551b3c4095833fe1bd6ad4e 100644 (file)
@@ -1,5 +1,5 @@
 Sonar, open source software quality management tool.
-Copyright (C) 2009 SonarSource SA
+Copyright (C) 2008-2011 SonarSource
 mailto:contact AT sonarsource DOT com
 
 Sonar is free software; you can redistribute it and/or
index 20e051480a0ab6f5470e4add8d1385a6d7234fad..64b0ece22536a7ff2596493005248f7d4b8c29d1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b33b0be8ece2791ff8f502641b737e30cafadcf7..970d50019f0e05e1bab7580c921a32b8c8fe0e3b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c8ec295a13a1aacf455a508e6256de5960567fa3..78ec934681fbbbd1cdf9fca7b70c6de6fdba8486 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1564e30b45e3b5937db53c7e037257a65fffbc4e..2ec7fcf737d52d4b4cfe28bf4469c180127d5d64 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 644aaeaeabf9657d10f9aa67dc999208937a8575..3af36e2809c4ae89da2f93e238b3e5cc9805ed66 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a44b578c769e98fa9ff3db429f03750b29556fd1..d39b716b9c34f99319ed2945de88862e392cb296 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0fef160a0f24a20974a256a7fe9aa82f0a533630..2ea3f1b62322955b94702de83925bc7f2fa818e3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 02dd0ad885c3c4c46f6e393e217c05775c845457..e6e0561561822bcfb10eacc495a746e348d56fc8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3cd042564eba27904912e2d17aa2bf131fae2c4f..32a52c47625d9db430c5a503dbd2fc7fa4e4ff9a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cfa31c923a1ae748e748965320c078c013e2dd13..42a3f3ba91fcf900fd1c7291054301103def5359 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 050a7dcd4444e05558fc543770c71fc7b93d84cc..228caf0235ff4e062da72c1a52da17457799fa68 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a0cf3410ce057d543b934d4b7eef9642903257ca..40e57808e43e58f4047f28e201304dd9d3d8b3bf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d9b26e2b43fdf79d573b00d4c11195c9b02bdc2f..3667b20bdec0ed5908ef352f4ad09ad786406d57 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 82b0e8b71770bf4f512ab2f8e3b50780ca9e88ea..3afca41057c9b3cb3adc8c6faa0f4c676d715a1c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4bd33ebd1b2457577d0ff31e170d557a286962b1..e9bf6ce42bcef8c06f7322c3e7aadeb9614f4be0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5cf62a2b05d9bfeaab0ac868d4257c48b0bb10a8..87e5aea56b54491821ae33c389b85c4db20e8496 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7eb1656dfc56ef36d07b36b27c4175ebb8bb76e9..57ecda9920d478b524c33eb43c752364e9cee707 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f8727211127067121cb23a08e3fd290211b26d7c..58ebc6682729b59666c09330ea84668ae3e9de65 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f3d4a41c1ffc8d905f17762a9dbd794f445eec0b..dab3cda54154f6c667d9f6b313f523f9a150ec3d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a501feb7308265b9fcc6d00a624d64bfaa358c7a..98cab62eacff6190ea8f8ef6564a101927b14649 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2f1e2b14acb2274107516bea05385d5253bbbbfc..26d61618de292758351be9364dc0b65eea4f1112 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 96d44e7880fb48f7cc020348269c68d008b5652c..ab9bf56dcdd95123101d4dd26d9883b61241b2e9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fef7df549a443c53e83a436ce386f0329a868eee..cb28685d34a4418f88a5c255ca7c6a17771c2d0c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c53eff084caa72a171ccb080c95ced14dc3b195e..d9fc0c3fa33bf11622992d1fac27b468e589b847 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4f2bb9361d8e555eacef7f74839f7fc4c96904e2..200b3f0480004c8e99676b5a07252f6248d62028 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e35ccde4c1b8f01845a7b8817961711bb414bb31..b59bac436daf06c7ab46b0b21e92d130983936e5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bd1db7af01336c9007c9d8ca5de344ba784b73c1..48d5c8e37c9b301cd4744a989f89dc46b04fb56c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 21b34b32c5afc49bfe1211d54f1d53c65df42a09..9e173aaebe6f273332e5886b90950b5447f4c946 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0fdc76999bd84de5ccac038c9707f5a8698838f8..8d131178445ca78e9483cd7025dd9e2158df03e0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 87c38d5452326a1f0dc55dd41112ef0caeef9958..0e3ad76dd83a2026a897cef097d0575ff917084f 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.clover;\r
-\r
-import org.apache.commons.lang.StringUtils;\r
-import org.codehaus.staxmate.in.*;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.sonar.api.batch.SensorContext;\r
-import org.sonar.api.measures.CoreMetrics;\r
-import org.sonar.api.measures.PropertiesBuilder;\r
-import org.sonar.api.resources.JavaFile;\r
-import org.sonar.api.resources.JavaPackage;\r
-import org.sonar.api.resources.Resource;\r
-import org.sonar.api.utils.ParsingUtils;\r
-import static org.sonar.api.utils.ParsingUtils.scaleValue;\r
-import org.sonar.api.utils.StaxParser;\r
-import org.sonar.api.utils.XmlParserException;\r
-\r
-import java.io.File;\r
-import java.text.ParseException;\r
-import javax.xml.stream.XMLStreamException;\r
-\r
-public class XmlReportParser {\r
-\r
-  private static final Logger LOG = LoggerFactory.getLogger(XmlReportParser.class);\r
-  private SensorContext context;\r
-  final PropertiesBuilder<String, Integer> lineHitsBuilder = new PropertiesBuilder<String, Integer>(CoreMetrics.COVERAGE_LINE_HITS_DATA);\r
-  final PropertiesBuilder<String, String> branchHitsBuilder = new PropertiesBuilder<String, String>(CoreMetrics.BRANCH_COVERAGE_HITS_DATA);\r
-\r
-  public XmlReportParser(SensorContext context) {\r
-    this.context = context;\r
-  }\r
-\r
-  private boolean reportExists(File report) {\r
-    return report != null && report.exists() && report.isFile();\r
-  }\r
-\r
-  protected void collect(File xmlFile) {\r
-    try {\r
-      if (reportExists(xmlFile)) {\r
-        LOG.info("Parsing " + xmlFile.getCanonicalPath());\r
-        StaxParser parser = new StaxParser(new StaxParser.XmlStreamHandler() {\r
-          public void stream(SMHierarchicCursor rootCursor) throws XMLStreamException {\r
-            try {\r
-              collectProjectMeasures(rootCursor.advance());\r
-            } catch (ParseException e) {\r
-              throw new XMLStreamException(e);\r
-            }\r
-          }\r
-        });\r
-        parser.parse(xmlFile);\r
-      }\r
-    } catch (Exception e) {\r
-      throw new XmlParserException(e);\r
-    }\r
-  }\r
-\r
-  private void collectProjectMeasures(SMInputCursor rootCursor) throws ParseException, XMLStreamException {\r
-    SMInputCursor projectCursor = rootCursor.descendantElementCursor("project");\r
-    SMInputCursor projectChildrenCursor = projectCursor.advance().childElementCursor();\r
-    projectChildrenCursor.setFilter(new SimpleFilter(SMEvent.START_ELEMENT));\r
-\r
-    SMInputCursor metricsCursor = projectChildrenCursor.advance();\r
-    analyseMetricsNode(null, metricsCursor);\r
-    collectPackageMeasures(projectChildrenCursor);\r
-  }\r
-\r
-  private void analyseMetricsNode(Resource resource, SMInputCursor metricsCursor) throws ParseException, XMLStreamException {\r
-    int elements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("elements"));\r
-    if (elements == 0) {\r
-      return;\r
-    }\r
-\r
-    int statements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("statements"));\r
-    int methods = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("methods"));\r
-    int conditionals = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("conditionals"));\r
-    int coveredElements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredelements"));\r
-    int coveredStatements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredstatements"));\r
-    int coveredMethods = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredmethods"));\r
-    int coveredConditionals = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredconditionals"));\r
-\r
-    context.saveMeasure(resource, CoreMetrics.COVERAGE, calculateCoverage(coveredElements, elements));\r
-\r
-    context.saveMeasure(resource, CoreMetrics.LINE_COVERAGE, calculateCoverage(coveredMethods + coveredStatements, methods + statements));\r
-    context.saveMeasure(resource, CoreMetrics.LINES_TO_COVER, (double) (statements + methods));\r
-    context.saveMeasure(resource, CoreMetrics.UNCOVERED_LINES, (double) (statements + methods - coveredStatements - coveredMethods));\r
-\r
-    if (conditionals > 0) {\r
-      context.saveMeasure(resource, CoreMetrics.BRANCH_COVERAGE, calculateCoverage(coveredConditionals, conditionals));\r
-      context.saveMeasure(resource, CoreMetrics.CONDITIONS_TO_COVER, (double) (conditionals));\r
-      context.saveMeasure(resource, CoreMetrics.UNCOVERED_CONDITIONS, (double) (conditionals - coveredConditionals));\r
-    }\r
-  }\r
-\r
-  private double calculateCoverage(int coveredElements, int elements) {\r
-    if (elements > 0) {\r
-      return scaleValue(100.0 * ((double) coveredElements / (double) elements));\r
-    }\r
-    return 0.0;\r
-  }\r
-\r
-  private void collectPackageMeasures(SMInputCursor packCursor) throws ParseException, XMLStreamException {\r
-    while (packCursor.getNext() != null) {\r
-      JavaPackage pack = new JavaPackage(packCursor.getAttrValue("name"));\r
-      SMInputCursor packChildrenCursor = packCursor.descendantElementCursor();\r
-      packChildrenCursor.setFilter(new SimpleFilter(SMEvent.START_ELEMENT));\r
-      SMInputCursor metricsCursor = packChildrenCursor.advance();\r
-      analyseMetricsNode(pack, metricsCursor);\r
-      collectFileMeasures(packChildrenCursor, pack);\r
-    }\r
-  }\r
-\r
-  private void collectFileMeasures(SMInputCursor fileCursor, JavaPackage pack) throws ParseException, XMLStreamException {\r
-    fileCursor.setFilter(SMFilterFactory.getElementOnlyFilter("file"));\r
-    while (fileCursor.getNext() != null) {\r
-      if (fileCursor.asEvent().isStartElement()) {\r
-        String classKey = extractClassName(fileCursor.getAttrValue("name"));\r
-        if (classKey != null) {\r
-          SMInputCursor fileChildrenCursor = fileCursor.childCursor(new SimpleFilter(SMEvent.START_ELEMENT));\r
-          // cursor should be on the metrics element\r
-          if (canBeIncludedInFileMetrics(fileChildrenCursor)) {\r
-            JavaFile resource = new JavaFile(pack.getKey(), classKey, false);\r
-            analyseMetricsNode(resource, fileChildrenCursor);\r
-\r
-            // cursor should be now on the line cursor\r
-            saveHitsData(resource, fileChildrenCursor);\r
-          }\r
-        }\r
-      }\r
-    }\r
-  }\r
-\r
-  private void saveHitsData(Resource resource, SMInputCursor lineCursor) throws ParseException, XMLStreamException {\r
-    lineHitsBuilder.clear();\r
-    branchHitsBuilder.clear();\r
-    boolean hasBranches = false;\r
-\r
-    while (lineCursor.getNext() != null) {\r
-      // skip class elements on format 2_3_2\r
-      if (lineCursor.getLocalName().equals("class")) {\r
-        continue;\r
-      }\r
-      final String lineId = lineCursor.getAttrValue("num");\r
-      int hits;\r
-      String count = lineCursor.getAttrValue("count");\r
-      if (StringUtils.isBlank(count)) {\r
-        int trueCount = (int) ParsingUtils.parseNumber(lineCursor.getAttrValue("truecount"));\r
-        int falseCount = (int) ParsingUtils.parseNumber(lineCursor.getAttrValue("falsecount"));\r
-        hits = trueCount + falseCount;\r
-        String branchHits;\r
-        if (trueCount > 0 && falseCount > 0) {\r
-          branchHits = "100%";\r
-        } else if (trueCount == 0 && falseCount == 0) {\r
-          branchHits = "0%";\r
-        } else {\r
-          branchHits = "50%";\r
-        }\r
-        branchHitsBuilder.add(lineId, branchHits);\r
-        hasBranches = true;\r
-\r
-      } else {\r
-        hits = (int) ParsingUtils.parseNumber(count);\r
-      }\r
-      lineHitsBuilder.add(lineId, hits);\r
-    }\r
-    context.saveMeasure(resource, lineHitsBuilder.build());\r
-    if (hasBranches) {\r
-      context.saveMeasure(resource, branchHitsBuilder.build());\r
-    }\r
-  }\r
-\r
-  private boolean canBeIncludedInFileMetrics(SMInputCursor metricsCursor) throws ParseException, XMLStreamException {\r
-    // skip class elements on 1.x xml format\r
-    while (metricsCursor.getNext() != null && metricsCursor.getLocalName().equals("class")) {\r
-    }\r
-    return ParsingUtils.parseNumber(metricsCursor.getAttrValue("elements")) > 0;\r
-  }\r
-\r
-  protected String extractClassName(String filename) {\r
-    if (filename != null) {\r
-      filename = StringUtils.replaceChars(filename, '\\', '/');\r
-      filename = StringUtils.substringBeforeLast(filename, ".java");\r
-      if (filename.indexOf('/') >= 0) {\r
-        filename = StringUtils.substringAfterLast(filename, "/");\r
-      }\r
-    }\r
-    return filename;\r
-  }\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.clover;
+
+import org.apache.commons.lang.StringUtils;
+import org.codehaus.staxmate.in.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.sonar.api.batch.SensorContext;
+import org.sonar.api.measures.CoreMetrics;
+import org.sonar.api.measures.PropertiesBuilder;
+import org.sonar.api.resources.JavaFile;
+import org.sonar.api.resources.JavaPackage;
+import org.sonar.api.resources.Resource;
+import org.sonar.api.utils.ParsingUtils;
+import static org.sonar.api.utils.ParsingUtils.scaleValue;
+import org.sonar.api.utils.StaxParser;
+import org.sonar.api.utils.XmlParserException;
+
+import java.io.File;
+import java.text.ParseException;
+import javax.xml.stream.XMLStreamException;
+
+public class XmlReportParser {
+
+  private static final Logger LOG = LoggerFactory.getLogger(XmlReportParser.class);
+  private SensorContext context;
+  final PropertiesBuilder<String, Integer> lineHitsBuilder = new PropertiesBuilder<String, Integer>(CoreMetrics.COVERAGE_LINE_HITS_DATA);
+  final PropertiesBuilder<String, String> branchHitsBuilder = new PropertiesBuilder<String, String>(CoreMetrics.BRANCH_COVERAGE_HITS_DATA);
+
+  public XmlReportParser(SensorContext context) {
+    this.context = context;
+  }
+
+  private boolean reportExists(File report) {
+    return report != null && report.exists() && report.isFile();
+  }
+
+  protected void collect(File xmlFile) {
+    try {
+      if (reportExists(xmlFile)) {
+        LOG.info("Parsing " + xmlFile.getCanonicalPath());
+        StaxParser parser = new StaxParser(new StaxParser.XmlStreamHandler() {
+          public void stream(SMHierarchicCursor rootCursor) throws XMLStreamException {
+            try {
+              collectProjectMeasures(rootCursor.advance());
+            } catch (ParseException e) {
+              throw new XMLStreamException(e);
+            }
+          }
+        });
+        parser.parse(xmlFile);
+      }
+    } catch (Exception e) {
+      throw new XmlParserException(e);
+    }
+  }
+
+  private void collectProjectMeasures(SMInputCursor rootCursor) throws ParseException, XMLStreamException {
+    SMInputCursor projectCursor = rootCursor.descendantElementCursor("project");
+    SMInputCursor projectChildrenCursor = projectCursor.advance().childElementCursor();
+    projectChildrenCursor.setFilter(new SimpleFilter(SMEvent.START_ELEMENT));
+
+    SMInputCursor metricsCursor = projectChildrenCursor.advance();
+    analyseMetricsNode(null, metricsCursor);
+    collectPackageMeasures(projectChildrenCursor);
+  }
+
+  private void analyseMetricsNode(Resource resource, SMInputCursor metricsCursor) throws ParseException, XMLStreamException {
+    int elements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("elements"));
+    if (elements == 0) {
+      return;
+    }
+
+    int statements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("statements"));
+    int methods = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("methods"));
+    int conditionals = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("conditionals"));
+    int coveredElements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredelements"));
+    int coveredStatements = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredstatements"));
+    int coveredMethods = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredmethods"));
+    int coveredConditionals = (int) ParsingUtils.parseNumber(metricsCursor.getAttrValue("coveredconditionals"));
+
+    context.saveMeasure(resource, CoreMetrics.COVERAGE, calculateCoverage(coveredElements, elements));
+
+    context.saveMeasure(resource, CoreMetrics.LINE_COVERAGE, calculateCoverage(coveredMethods + coveredStatements, methods + statements));
+    context.saveMeasure(resource, CoreMetrics.LINES_TO_COVER, (double) (statements + methods));
+    context.saveMeasure(resource, CoreMetrics.UNCOVERED_LINES, (double) (statements + methods - coveredStatements - coveredMethods));
+
+    if (conditionals > 0) {
+      context.saveMeasure(resource, CoreMetrics.BRANCH_COVERAGE, calculateCoverage(coveredConditionals, conditionals));
+      context.saveMeasure(resource, CoreMetrics.CONDITIONS_TO_COVER, (double) (conditionals));
+      context.saveMeasure(resource, CoreMetrics.UNCOVERED_CONDITIONS, (double) (conditionals - coveredConditionals));
+    }
+  }
+
+  private double calculateCoverage(int coveredElements, int elements) {
+    if (elements > 0) {
+      return scaleValue(100.0 * ((double) coveredElements / (double) elements));
+    }
+    return 0.0;
+  }
+
+  private void collectPackageMeasures(SMInputCursor packCursor) throws ParseException, XMLStreamException {
+    while (packCursor.getNext() != null) {
+      JavaPackage pack = new JavaPackage(packCursor.getAttrValue("name"));
+      SMInputCursor packChildrenCursor = packCursor.descendantElementCursor();
+      packChildrenCursor.setFilter(new SimpleFilter(SMEvent.START_ELEMENT));
+      SMInputCursor metricsCursor = packChildrenCursor.advance();
+      analyseMetricsNode(pack, metricsCursor);
+      collectFileMeasures(packChildrenCursor, pack);
+    }
+  }
+
+  private void collectFileMeasures(SMInputCursor fileCursor, JavaPackage pack) throws ParseException, XMLStreamException {
+    fileCursor.setFilter(SMFilterFactory.getElementOnlyFilter("file"));
+    while (fileCursor.getNext() != null) {
+      if (fileCursor.asEvent().isStartElement()) {
+        String classKey = extractClassName(fileCursor.getAttrValue("name"));
+        if (classKey != null) {
+          SMInputCursor fileChildrenCursor = fileCursor.childCursor(new SimpleFilter(SMEvent.START_ELEMENT));
+          // cursor should be on the metrics element
+          if (canBeIncludedInFileMetrics(fileChildrenCursor)) {
+            JavaFile resource = new JavaFile(pack.getKey(), classKey, false);
+            analyseMetricsNode(resource, fileChildrenCursor);
+
+            // cursor should be now on the line cursor
+            saveHitsData(resource, fileChildrenCursor);
+          }
+        }
+      }
+    }
+  }
+
+  private void saveHitsData(Resource resource, SMInputCursor lineCursor) throws ParseException, XMLStreamException {
+    lineHitsBuilder.clear();
+    branchHitsBuilder.clear();
+    boolean hasBranches = false;
+
+    while (lineCursor.getNext() != null) {
+      // skip class elements on format 2_3_2
+      if (lineCursor.getLocalName().equals("class")) {
+        continue;
+      }
+      final String lineId = lineCursor.getAttrValue("num");
+      int hits;
+      String count = lineCursor.getAttrValue("count");
+      if (StringUtils.isBlank(count)) {
+        int trueCount = (int) ParsingUtils.parseNumber(lineCursor.getAttrValue("truecount"));
+        int falseCount = (int) ParsingUtils.parseNumber(lineCursor.getAttrValue("falsecount"));
+        hits = trueCount + falseCount;
+        String branchHits;
+        if (trueCount > 0 && falseCount > 0) {
+          branchHits = "100%";
+        } else if (trueCount == 0 && falseCount == 0) {
+          branchHits = "0%";
+        } else {
+          branchHits = "50%";
+        }
+        branchHitsBuilder.add(lineId, branchHits);
+        hasBranches = true;
+
+      } else {
+        hits = (int) ParsingUtils.parseNumber(count);
+      }
+      lineHitsBuilder.add(lineId, hits);
+    }
+    context.saveMeasure(resource, lineHitsBuilder.build());
+    if (hasBranches) {
+      context.saveMeasure(resource, branchHitsBuilder.build());
+    }
+  }
+
+  private boolean canBeIncludedInFileMetrics(SMInputCursor metricsCursor) throws ParseException, XMLStreamException {
+    // skip class elements on 1.x xml format
+    while (metricsCursor.getNext() != null && metricsCursor.getLocalName().equals("class")) {
+    }
+    return ParsingUtils.parseNumber(metricsCursor.getAttrValue("elements")) > 0;
+  }
+
+  protected String extractClassName(String filename) {
+    if (filename != null) {
+      filename = StringUtils.replaceChars(filename, '\\', '/');
+      filename = StringUtils.substringBeforeLast(filename, ".java");
+      if (filename.indexOf('/') >= 0) {
+        filename = StringUtils.substringAfterLast(filename, "/");
+      }
+    }
+    return filename;
+  }
 }
\ No newline at end of file
index f18a233d45f583626b67bf761281a4fecbd55228..3b63d6a2b6bf28e47ce3078abb9e423774de4515 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ae55bda063f135e247a29a9eb197b99f1a30b693..9efcb86c256544e85afc38b62d6b16d78422e7fd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6b9b2744be8d102d28687d872fe68753458ce38e..06003ff2baf3510ea84933627e76ff8008ab917d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1424830d956013dda9e1fcbcc89366cb0655db8e..8219edd4489aaad96c2a887cd68622409c923a34 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.clover;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.sonar.api.batch.SensorContext;\r
-import org.sonar.api.measures.CoreMetrics;\r
-import org.sonar.api.resources.JavaFile;\r
-import org.sonar.api.resources.JavaPackage;\r
-import org.sonar.api.resources.Resource;\r
-import org.sonar.api.test.IsMeasure;\r
-import org.sonar.test.TestUtils;\r
-\r
-import java.io.File;\r
-import java.net.URISyntaxException;\r
-import java.text.ParseException;\r
-\r
-import static org.junit.Assert.assertEquals;\r
-import static org.mockito.Matchers.anyDouble;\r
-import static org.mockito.Matchers.anyObject;\r
-import static org.mockito.Matchers.argThat;\r
-import static org.mockito.Matchers.eq;\r
-import static org.mockito.Mockito.*;\r
-\r
-public class XmlReportParserTest {\r
-\r
-  private XmlReportParser reportParser;\r
-  private SensorContext context;\r
-  private File xmlFile;\r
-\r
-  @Before\r
-  public void before() throws URISyntaxException {\r
-    xmlFile = TestUtils.getResource(getClass(), "clover.xml");\r
-    context = mock(SensorContext.class);\r
-    reportParser = new XmlReportParser(context);\r
-  }\r
-\r
-  @Test\r
-  public void collectProjectMeasures() throws Exception {\r
-    reportParser.collect(xmlFile);\r
-    verify(context).saveMeasure(null, CoreMetrics.COVERAGE, 5.0); // coveredelements / elements\r
-\r
-    verify(context).saveMeasure(null, CoreMetrics.LINE_COVERAGE, 6.63); // covered methods + covered statements / methods + statements\r
-    verify(context).saveMeasure(null, CoreMetrics.LINES_TO_COVER, 196.0);\r
-    verify(context).saveMeasure(null, CoreMetrics.UNCOVERED_LINES, 183.0); // covered methods + covered statements\r
-\r
-    verify(context).saveMeasure(null, CoreMetrics.BRANCH_COVERAGE, 0.0); // covered conditionals / conditionals\r
-    verify(context).saveMeasure(null, CoreMetrics.CONDITIONS_TO_COVER, 64.0); // covered_conditionals\r
-    verify(context).saveMeasure(null, CoreMetrics.UNCOVERED_CONDITIONS, 64.0);\r
-  }\r
-\r
-  @Test\r
-  public void collectPackageMeasures() throws ParseException {\r
-    reportParser.collect(xmlFile);\r
-    final JavaPackage pac = new JavaPackage("org.sonar.samples");\r
-    verify(context).saveMeasure(pac, CoreMetrics.COVERAGE, 28.89);\r
-\r
-    // lines\r
-    verify(context).saveMeasure(pac, CoreMetrics.LINE_COVERAGE, 28.89);\r
-    verify(context).saveMeasure(pac, CoreMetrics.LINES_TO_COVER, 45.0);\r
-    verify(context).saveMeasure(pac, CoreMetrics.UNCOVERED_LINES, 32.0);\r
-\r
-    // no conditions\r
-    verify(context, never()).saveMeasure(eq(pac), eq(CoreMetrics.BRANCH_COVERAGE), anyDouble());\r
-    verify(context, never()).saveMeasure(eq(pac), eq(CoreMetrics.CONDITIONS_TO_COVER), anyDouble());\r
-    verify(context, never()).saveMeasure(eq(pac), eq(CoreMetrics.UNCOVERED_CONDITIONS), anyDouble());\r
-  }\r
-\r
-  @Test\r
-  public void parseClaver232Format() throws ParseException, URISyntaxException {\r
-    reportParser.collect(TestUtils.getResource(getClass(), "clover_2_3_2.xml"));\r
-    verify(context).saveMeasure(new JavaPackage("org.sonar.squid.sensors"), CoreMetrics.COVERAGE, 94.87);\r
-  }\r
-\r
-//  @Test\r
-//  public void doNotSaveInnerClassMeasures() throws ParseException, URISyntaxException {\r
-//    collector.collect(xmlFile);\r
-//\r
-//    verify(context, never()).saveMeasure(\r
-//        eq(new JavaFile("ch.hortis.sonar.model.MetricMetaInf.Classes")), eq(CoreMetrics.COVERAGE), anyDouble());\r
-//    verify(context).saveMeasure(\r
-//        eq(new JavaFile("ch.hortis.sonar.model.MetricMetaInf")), eq(CoreMetrics.COVERAGE), anyDouble());\r
-//  }\r
-\r
-  @Test\r
-  public void collectFileMeasures() throws Exception {\r
-    reportParser.collect(xmlFile);\r
-\r
-    final JavaFile file = new JavaFile("org.sonar.samples.ClassUnderTest");\r
-    verify(context).saveMeasure(file, CoreMetrics.COVERAGE, 100.0);\r
-\r
-    verify(context).saveMeasure(file, CoreMetrics.LINE_COVERAGE, 100.0);\r
-    verify(context).saveMeasure(file, CoreMetrics.LINES_TO_COVER, 5.0);\r
-    verify(context).saveMeasure(file, CoreMetrics.UNCOVERED_LINES, 0.0);\r
-\r
-    // no conditions\r
-    verify(context, never()).saveMeasure(eq(file), eq(CoreMetrics.BRANCH_COVERAGE), anyDouble());\r
-    verify(context, never()).saveMeasure(eq(file), eq(CoreMetrics.CONDITIONS_TO_COVER), anyDouble());\r
-    verify(context, never()).saveMeasure(eq(file), eq(CoreMetrics.UNCOVERED_CONDITIONS), anyDouble());\r
-  }\r
-\r
-  @Test\r
-  public void collectFileHitsData() throws Exception {\r
-    reportParser.collect(xmlFile);\r
-    verify(context).saveMeasure(eq(new JavaFile("org.sonar.samples.ClassUnderTest")), argThat(new IsMeasure(CoreMetrics.COVERAGE_LINE_HITS_DATA, "4=1;5=1;6=1;8=1;9=1")));\r
-  }\r
-\r
-  @Test\r
-  public void clover1FileNameContainsPath() {\r
-    XmlReportParser reportParser = new XmlReportParser(context);\r
-    assertEquals("SampleClass", reportParser.extractClassName("C:\\src\\main\\java\\org\\sonar\\samples\\SampleClass.java"));\r
-\r
-    assertEquals("SampleClass", reportParser.extractClassName("/src/main/java/org/sonar/samples/SampleClass.java"));\r
-  }\r
-\r
-  @Test\r
-  public void clover2FileNameDoesNotContainPath() {\r
-    XmlReportParser reportParser = new XmlReportParser(context);\r
-    assertEquals("SampleClass", reportParser.extractClassName("SampleClass.java"));\r
-  }\r
-\r
-  @Test\r
-  public void coverageShouldBeZeroWhenNoElements() throws URISyntaxException {\r
-    File xmlFile = TestUtils.getResource(getClass(), "coverageShouldBeZeroWhenNoElements/clover.xml");\r
-    context = mock(SensorContext.class);\r
-    XmlReportParser reportParser = new XmlReportParser(context);\r
-    reportParser.collect(xmlFile);\r
-    verify(context, never()).saveMeasure((Resource) anyObject(), eq(CoreMetrics.COVERAGE), anyDouble());\r
-    verify(context, never()).saveMeasure((Resource) anyObject(), eq(CoreMetrics.LINE_COVERAGE), anyDouble());\r
-    verify(context, never()).saveMeasure((Resource) anyObject(), eq(CoreMetrics.BRANCH_COVERAGE), anyDouble());\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.clover;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.sonar.api.batch.SensorContext;
+import org.sonar.api.measures.CoreMetrics;
+import org.sonar.api.resources.JavaFile;
+import org.sonar.api.resources.JavaPackage;
+import org.sonar.api.resources.Resource;
+import org.sonar.api.test.IsMeasure;
+import org.sonar.test.TestUtils;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.text.ParseException;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Matchers.anyDouble;
+import static org.mockito.Matchers.anyObject;
+import static org.mockito.Matchers.argThat;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.*;
+
+public class XmlReportParserTest {
+
+  private XmlReportParser reportParser;
+  private SensorContext context;
+  private File xmlFile;
+
+  @Before
+  public void before() throws URISyntaxException {
+    xmlFile = TestUtils.getResource(getClass(), "clover.xml");
+    context = mock(SensorContext.class);
+    reportParser = new XmlReportParser(context);
+  }
+
+  @Test
+  public void collectProjectMeasures() throws Exception {
+    reportParser.collect(xmlFile);
+    verify(context).saveMeasure(null, CoreMetrics.COVERAGE, 5.0); // coveredelements / elements
+
+    verify(context).saveMeasure(null, CoreMetrics.LINE_COVERAGE, 6.63); // covered methods + covered statements / methods + statements
+    verify(context).saveMeasure(null, CoreMetrics.LINES_TO_COVER, 196.0);
+    verify(context).saveMeasure(null, CoreMetrics.UNCOVERED_LINES, 183.0); // covered methods + covered statements
+
+    verify(context).saveMeasure(null, CoreMetrics.BRANCH_COVERAGE, 0.0); // covered conditionals / conditionals
+    verify(context).saveMeasure(null, CoreMetrics.CONDITIONS_TO_COVER, 64.0); // covered_conditionals
+    verify(context).saveMeasure(null, CoreMetrics.UNCOVERED_CONDITIONS, 64.0);
+  }
+
+  @Test
+  public void collectPackageMeasures() throws ParseException {
+    reportParser.collect(xmlFile);
+    final JavaPackage pac = new JavaPackage("org.sonar.samples");
+    verify(context).saveMeasure(pac, CoreMetrics.COVERAGE, 28.89);
+
+    // lines
+    verify(context).saveMeasure(pac, CoreMetrics.LINE_COVERAGE, 28.89);
+    verify(context).saveMeasure(pac, CoreMetrics.LINES_TO_COVER, 45.0);
+    verify(context).saveMeasure(pac, CoreMetrics.UNCOVERED_LINES, 32.0);
+
+    // no conditions
+    verify(context, never()).saveMeasure(eq(pac), eq(CoreMetrics.BRANCH_COVERAGE), anyDouble());
+    verify(context, never()).saveMeasure(eq(pac), eq(CoreMetrics.CONDITIONS_TO_COVER), anyDouble());
+    verify(context, never()).saveMeasure(eq(pac), eq(CoreMetrics.UNCOVERED_CONDITIONS), anyDouble());
+  }
+
+  @Test
+  public void parseClaver232Format() throws ParseException, URISyntaxException {
+    reportParser.collect(TestUtils.getResource(getClass(), "clover_2_3_2.xml"));
+    verify(context).saveMeasure(new JavaPackage("org.sonar.squid.sensors"), CoreMetrics.COVERAGE, 94.87);
+  }
+
+//  @Test
+//  public void doNotSaveInnerClassMeasures() throws ParseException, URISyntaxException {
+//    collector.collect(xmlFile);
+//
+//    verify(context, never()).saveMeasure(
+//        eq(new JavaFile("ch.hortis.sonar.model.MetricMetaInf.Classes")), eq(CoreMetrics.COVERAGE), anyDouble());
+//    verify(context).saveMeasure(
+//        eq(new JavaFile("ch.hortis.sonar.model.MetricMetaInf")), eq(CoreMetrics.COVERAGE), anyDouble());
+//  }
+
+  @Test
+  public void collectFileMeasures() throws Exception {
+    reportParser.collect(xmlFile);
+
+    final JavaFile file = new JavaFile("org.sonar.samples.ClassUnderTest");
+    verify(context).saveMeasure(file, CoreMetrics.COVERAGE, 100.0);
+
+    verify(context).saveMeasure(file, CoreMetrics.LINE_COVERAGE, 100.0);
+    verify(context).saveMeasure(file, CoreMetrics.LINES_TO_COVER, 5.0);
+    verify(context).saveMeasure(file, CoreMetrics.UNCOVERED_LINES, 0.0);
+
+    // no conditions
+    verify(context, never()).saveMeasure(eq(file), eq(CoreMetrics.BRANCH_COVERAGE), anyDouble());
+    verify(context, never()).saveMeasure(eq(file), eq(CoreMetrics.CONDITIONS_TO_COVER), anyDouble());
+    verify(context, never()).saveMeasure(eq(file), eq(CoreMetrics.UNCOVERED_CONDITIONS), anyDouble());
+  }
+
+  @Test
+  public void collectFileHitsData() throws Exception {
+    reportParser.collect(xmlFile);
+    verify(context).saveMeasure(eq(new JavaFile("org.sonar.samples.ClassUnderTest")), argThat(new IsMeasure(CoreMetrics.COVERAGE_LINE_HITS_DATA, "4=1;5=1;6=1;8=1;9=1")));
+  }
+
+  @Test
+  public void clover1FileNameContainsPath() {
+    XmlReportParser reportParser = new XmlReportParser(context);
+    assertEquals("SampleClass", reportParser.extractClassName("C:\\src\\main\\java\\org\\sonar\\samples\\SampleClass.java"));
+
+    assertEquals("SampleClass", reportParser.extractClassName("/src/main/java/org/sonar/samples/SampleClass.java"));
+  }
+
+  @Test
+  public void clover2FileNameDoesNotContainPath() {
+    XmlReportParser reportParser = new XmlReportParser(context);
+    assertEquals("SampleClass", reportParser.extractClassName("SampleClass.java"));
+  }
+
+  @Test
+  public void coverageShouldBeZeroWhenNoElements() throws URISyntaxException {
+    File xmlFile = TestUtils.getResource(getClass(), "coverageShouldBeZeroWhenNoElements/clover.xml");
+    context = mock(SensorContext.class);
+    XmlReportParser reportParser = new XmlReportParser(context);
+    reportParser.collect(xmlFile);
+    verify(context, never()).saveMeasure((Resource) anyObject(), eq(CoreMetrics.COVERAGE), anyDouble());
+    verify(context, never()).saveMeasure((Resource) anyObject(), eq(CoreMetrics.LINE_COVERAGE), anyDouble());
+    verify(context, never()).saveMeasure((Resource) anyObject(), eq(CoreMetrics.BRANCH_COVERAGE), anyDouble());
+  }
+}
index 8bf085f53254338dd89eab5a77c57342e4a49a73..63b63a886fd969f133721a48399f92506205a00d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e758da4ee2a9004c6d7946a09e8079efd34b125e..11f3f1ab0673c5b19d748e4c7d4f5d7e75114e95 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1cb6061d8ab34b26cbe1da7f06b031c2b7b20847..f620b037d9d60c554f61ecab1b86d06cddb54672 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 05d289cbf8674384760b20244019ac81cd436f08..bd095688fb05cabbc26c59913d8d7470007b3ccb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 891b76b6cec074318b24af9f80779cc0261decba..129d1ac4b91e9e630135b56f22648a51736432db 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0dd64edf611387819bf722e0793b85a43632a784..8a81a94f8430fc3b62a4cd3cf152b21d44a627e3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 02b6f0a1a51f91e5affb428aca2430cbd67bb837..803e9f3bb1017d4aacc14acabc8477d2579c5e33 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4a3a5a21b7e4f2b63cef2500280a2dbe10bfbfc1..865aece0c535a1e45ee0ed66ba689f5c04cf2c6f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e657a9a2c1982d4f16277f1cd1128060c8f3d3a2..59192a3a25882a3b7b1d210c261a4ba41b3e663c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f0b319604b20b7ca57a40886886a29de5550f4d4..946fb6a0b63ca2d369dde32d39f3b33edcf09a95 100644 (file)
@@ -1,42 +1,42 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.core.clouds;\r
-\r
-import org.sonar.api.resources.Resource;\r
-import org.sonar.api.web.GwtPage;\r
-import org.sonar.api.web.NavigationSection;\r
-import org.sonar.api.web.ResourceScope;\r
-import org.sonar.api.web.UserRole;\r
-import org.sonar.plugins.core.clouds.client.GwtClouds;\r
-\r
-@NavigationSection(NavigationSection.RESOURCE)\r
-@ResourceScope({Resource.SCOPE_SET, Resource.SCOPE_SPACE})\r
-@UserRole(UserRole.USER)\r
-public class Clouds extends GwtPage {\r
-\r
-  public String getGwtId() {\r
-    return GwtClouds.GWT_ID;\r
-  }\r
-\r
-  public String getTitle() {\r
-    return "Clouds";\r
-  }\r
-\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.core.clouds;
+
+import org.sonar.api.resources.Resource;
+import org.sonar.api.web.GwtPage;
+import org.sonar.api.web.NavigationSection;
+import org.sonar.api.web.ResourceScope;
+import org.sonar.api.web.UserRole;
+import org.sonar.plugins.core.clouds.client.GwtClouds;
+
+@NavigationSection(NavigationSection.RESOURCE)
+@ResourceScope({Resource.SCOPE_SET, Resource.SCOPE_SPACE})
+@UserRole(UserRole.USER)
+public class Clouds extends GwtPage {
+
+  public String getGwtId() {
+    return GwtClouds.GWT_ID;
+  }
+
+  public String getTitle() {
+    return "Clouds";
+  }
+
 }
\ No newline at end of file
index 5202b4feebc47f74c1bbe59b1af143eed2dca521..c63e667f989082f7b2f72f0bf50b919ebb794d81 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.core.clouds.client;\r
-\r
-import org.sonar.plugins.core.clouds.client.model.Color;\r
-\r
-public class Calculator {\r
-\r
-  private Float minValue;\r
-  private Float maxValue;\r
-  private Float minPercent;\r
-  private Float maxPercent;\r
-\r
-  public Calculator(Float minPercent, Float maxPercent) {\r
-    this.minPercent = minPercent;\r
-    this.maxPercent = maxPercent;\r
-  }\r
-\r
-  public void updateMaxAndMin(Float value){\r
-    updateMaxValue(value);\r
-    updateMinValue(value);\r
-  }\r
-  \r
-  public Integer getFontSizePercent(Integer value) {\r
-    float divisor = getMaxValue() - getMinValue();\r
-    float size = getMinPercent();\r
-    if (divisor != 0) {\r
-      float multiplier = (getMaxPercent() - getMinPercent()) / divisor;\r
-      size = getMinPercent() +\r
-        ((getMaxValue() - (getMaxValue() - (value - getMinValue()))) * multiplier);\r
-    }\r
-    return Float.valueOf(size).intValue();\r
-  }\r
-\r
-  public String getFontColor(float value) {\r
-    float interval = (getMaxPercent() - getMinPercent()) / 2f;\r
-    float mean = (getMinPercent() + getMaxPercent()) / 2f;\r
-\r
-    Color minColor = new Color(191/255f, 0f, 21/255f); // red\r
-    Color meanColor = new Color(77/255f, 5/255f, 177/255f); // purple\r
-    Color maxColor = new Color(23/255f, 96/255f, 191/255f); // blue\r
-\r
-    Color color;\r
-    if (value > mean) {\r
-      float valuePercent = ((value - mean) / interval) * 100f;\r
-      color = mixColorWith(maxColor, meanColor, valuePercent);\r
-    } else {\r
-      float valuePercent = ((mean - value) / interval) * 100f;\r
-      color = mixColorWith(minColor, meanColor, valuePercent);\r
-    }\r
-\r
-    int r = Float.valueOf(color.getRed()* 255f).intValue();\r
-    int g = Float.valueOf(color.getGreen() * 255f).intValue();\r
-    int b = Float.valueOf(color.getBlue() * 255f).intValue();\r
-\r
-    return ("rgb("+ r +","+ g +","+ b +")");\r
-  }\r
-\r
-  private Color mixColorWith(Color currentColor, Color mask, float value){\r
-    float opacity = value / 100f;\r
-\r
-    float r = (currentColor.getRed() * opacity) + (mask.getRed() * (1f - opacity));\r
-    float g = (currentColor.getGreen() * opacity) + (mask.getGreen() * (1f - opacity));\r
-    float b = (currentColor.getBlue() * opacity) + (mask.getBlue() * (1f - opacity));\r
-\r
-    return new Color(r, g, b);\r
-  }\r
-\r
-\r
-  private void updateMaxValue(Float value) {\r
-    if (maxValue == null) {\r
-      maxValue = value;\r
-    } else if (value > maxValue) {\r
-      maxValue = value;\r
-    }\r
-  }\r
-\r
-  private void updateMinValue(Float value) {\r
-    if (minValue == null) {\r
-      minValue = value;\r
-    } else if (value < minValue) {\r
-      minValue = value;\r
-    }\r
-  }\r
-\r
-\r
-  public Float getMinValue() {\r
-    return minValue;\r
-  }\r
-\r
-  public Float getMaxValue() {\r
-    return maxValue;\r
-  }\r
-\r
-  public Float getMinPercent() {\r
-    return minPercent;\r
-  }\r
-\r
-  public Float getMaxPercent() {\r
-    return maxPercent;\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.core.clouds.client;
+
+import org.sonar.plugins.core.clouds.client.model.Color;
+
+public class Calculator {
+
+  private Float minValue;
+  private Float maxValue;
+  private Float minPercent;
+  private Float maxPercent;
+
+  public Calculator(Float minPercent, Float maxPercent) {
+    this.minPercent = minPercent;
+    this.maxPercent = maxPercent;
+  }
+
+  public void updateMaxAndMin(Float value){
+    updateMaxValue(value);
+    updateMinValue(value);
+  }
+  
+  public Integer getFontSizePercent(Integer value) {
+    float divisor = getMaxValue() - getMinValue();
+    float size = getMinPercent();
+    if (divisor != 0) {
+      float multiplier = (getMaxPercent() - getMinPercent()) / divisor;
+      size = getMinPercent() +
+        ((getMaxValue() - (getMaxValue() - (value - getMinValue()))) * multiplier);
+    }
+    return Float.valueOf(size).intValue();
+  }
+
+  public String getFontColor(float value) {
+    float interval = (getMaxPercent() - getMinPercent()) / 2f;
+    float mean = (getMinPercent() + getMaxPercent()) / 2f;
+
+    Color minColor = new Color(191/255f, 0f, 21/255f); // red
+    Color meanColor = new Color(77/255f, 5/255f, 177/255f); // purple
+    Color maxColor = new Color(23/255f, 96/255f, 191/255f); // blue
+
+    Color color;
+    if (value > mean) {
+      float valuePercent = ((value - mean) / interval) * 100f;
+      color = mixColorWith(maxColor, meanColor, valuePercent);
+    } else {
+      float valuePercent = ((mean - value) / interval) * 100f;
+      color = mixColorWith(minColor, meanColor, valuePercent);
+    }
+
+    int r = Float.valueOf(color.getRed()* 255f).intValue();
+    int g = Float.valueOf(color.getGreen() * 255f).intValue();
+    int b = Float.valueOf(color.getBlue() * 255f).intValue();
+
+    return ("rgb("+ r +","+ g +","+ b +")");
+  }
+
+  private Color mixColorWith(Color currentColor, Color mask, float value){
+    float opacity = value / 100f;
+
+    float r = (currentColor.getRed() * opacity) + (mask.getRed() * (1f - opacity));
+    float g = (currentColor.getGreen() * opacity) + (mask.getGreen() * (1f - opacity));
+    float b = (currentColor.getBlue() * opacity) + (mask.getBlue() * (1f - opacity));
+
+    return new Color(r, g, b);
+  }
+
+
+  private void updateMaxValue(Float value) {
+    if (maxValue == null) {
+      maxValue = value;
+    } else if (value > maxValue) {
+      maxValue = value;
+    }
+  }
+
+  private void updateMinValue(Float value) {
+    if (minValue == null) {
+      minValue = value;
+    } else if (value < minValue) {
+      minValue = value;
+    }
+  }
+
+
+  public Float getMinValue() {
+    return minValue;
+  }
+
+  public Float getMaxValue() {
+    return maxValue;
+  }
+
+  public Float getMinPercent() {
+    return minPercent;
+  }
+
+  public Float getMaxPercent() {
+    return maxPercent;
+  }
+}
index 4770f3d64ba719e3e645438fad708b4e25183c5e..9b07b53d915b3f2e2aac42549ce9de0131316c29 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 60f928d8f3ea5fe5cd979d62a46c8b39f4df2292..08bcac836b0213af8e579619f5eee982c5e6eda1 100644 (file)
@@ -1,53 +1,53 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.core.clouds.client.model;\r
-\r
-import org.sonar.api.web.gwt.client.webservices.Resource;\r
-\r
-\r
-public class CloudElement implements Comparable<CloudElement> {\r
-\r
-  private Integer fontSize;\r
-  private Float fontColor;\r
-  private Resource resource;\r
-\r
-  public CloudElement(Resource resource, Integer fontSize, Float fontColor) {\r
-    this.resource = resource;\r
-    this.fontSize = fontSize;\r
-    this.fontColor = fontColor;\r
-  }\r
-\r
-  public Resource getResource() {\r
-    return resource;\r
-  }\r
-\r
-  public Integer getFontSize() {\r
-    return fontSize;\r
-  }\r
-\r
-  public Float getFontColor() {\r
-    return fontColor;\r
-  }\r
-\r
-  public int compareTo(CloudElement cloudElement) {\r
-    return resource.getName().compareTo(cloudElement.getResource().getName());\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.core.clouds.client.model;
+
+import org.sonar.api.web.gwt.client.webservices.Resource;
+
+
+public class CloudElement implements Comparable<CloudElement> {
+
+  private Integer fontSize;
+  private Float fontColor;
+  private Resource resource;
+
+  public CloudElement(Resource resource, Integer fontSize, Float fontColor) {
+    this.resource = resource;
+    this.fontSize = fontSize;
+    this.fontColor = fontColor;
+  }
+
+  public Resource getResource() {
+    return resource;
+  }
+
+  public Integer getFontSize() {
+    return fontSize;
+  }
+
+  public Float getFontColor() {
+    return fontColor;
+  }
+
+  public int compareTo(CloudElement cloudElement) {
+    return resource.getName().compareTo(cloudElement.getResource().getName());
+  }
+
+}
index 598c470f207600c7b28e336f87922502aa62de39..d3f8f6f988ecdff1c9f1ad818943e127d1341553 100644 (file)
@@ -1,50 +1,50 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.core.clouds.client.model;\r
-\r
-public class Color {\r
-\r
-  private float red;\r
-  private float green;\r
-  private float blue;\r
-\r
-  public Color(float red, float green, float blue) {\r
-    this.red = red;\r
-    this.green = green;\r
-    this.blue = blue;\r
-  }\r
-\r
-  public float getRed() {\r
-    return red;\r
-  }\r
-\r
-  public float getGreen() {\r
-    return green;\r
-  }\r
-\r
-  public float getBlue() {\r
-    return blue;\r
-  }\r
-\r
-  @Override\r
-  public String toString() {\r
-    return ("red : "+ red + ", green : "+ green + ", blue : "+ blue );\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.core.clouds.client.model;
+
+public class Color {
+
+  private float red;
+  private float green;
+  private float blue;
+
+  public Color(float red, float green, float blue) {
+    this.red = red;
+    this.green = green;
+    this.blue = blue;
+  }
+
+  public float getRed() {
+    return red;
+  }
+
+  public float getGreen() {
+    return green;
+  }
+
+  public float getBlue() {
+    return blue;
+  }
+
+  @Override
+  public String toString() {
+    return ("red : "+ red + ", green : "+ green + ", blue : "+ blue );
+  }
+}
index 49c28d87656cffb18e7e445676c5cc6b2a7d29b3..d3233fd8519441d6e3527297e5dd9417fa688116 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.core.clouds.client.widget;\r
-\r
-import com.google.gwt.event.dom.client.ClickEvent;\r
-import com.google.gwt.event.dom.client.ClickHandler;\r
-import com.google.gwt.user.client.Window;\r
-import com.google.gwt.user.client.ui.*;\r
-import org.sonar.api.web.gwt.client.Utils;\r
-import org.sonar.api.web.gwt.client.webservices.Measure;\r
-import org.sonar.api.web.gwt.client.webservices.Resource;\r
-import org.sonar.api.web.gwt.client.webservices.WSMetrics.Metric;\r
-import org.sonar.api.web.gwt.client.widgets.LoadingLabel;\r
-import org.sonar.plugins.core.clouds.client.Calculator;\r
-import org.sonar.plugins.core.clouds.client.GwtClouds;\r
-import org.sonar.plugins.core.clouds.client.model.CloudElement;\r
-\r
-import java.util.ArrayList;\r
-import java.util.Collections;\r
-import java.util.List;\r
-\r
-public class ClassCloudsWidget extends Composite {\r
-\r
-  private Panel main;\r
-  private Metric sizeMetric;\r
-  private List<Resource> resources;\r
-  private float minSizePercent = 60f;\r
-  private float maxSizePercent = 240f;\r
-\r
-  private Calculator sizeCalculator = new Calculator(minSizePercent, maxSizePercent);\r
-  private Calculator colorCalculator = new Calculator(0f, 100f);\r
-\r
-  public ClassCloudsWidget(List<Resource> resources, Metric sizeMetric) {\r
-    this.sizeMetric = sizeMetric;\r
-    this.main = new FlowPanel();\r
-    this.resources = resources;\r
-    initWidget(main);\r
-  }\r
-\r
-  public Metric getSizeMetric() {\r
-    return sizeMetric;\r
-  }\r
-\r
-  public void generateCloud(Metric colorMetric) {\r
-    main.clear();\r
-    LoadingLabel loading = new LoadingLabel();\r
-    main.add(loading);\r
-    if (colorMetric.equals(colorMetric)) {\r
-      List<CloudElement> cloudElements = getCloudElements(resources, colorMetric);\r
-      createClouds(cloudElements, colorMetric);\r
-    }\r
-    main.remove(loading);\r
-  }\r
-\r
-  private List<CloudElement> getCloudElements(List<Resource> resources, Metric colorMetric) {\r
-    List<CloudElement> tagList = new ArrayList<CloudElement>();\r
-    for (Resource resource : resources) {\r
-      Measure sizeMeasure = getMeasure(resource, sizeMetric);\r
-      Measure colorMeasure = getMeasure(resource, colorMetric);\r
-\r
-      if (sizeMeasure != null && colorMeasure != null) {\r
-        Integer size = getMeasureValue(sizeMeasure.getValue());\r
-        float color = colorMeasure.getValue().floatValue();\r
-        tagList.add(new CloudElement(resource, size, color));\r
-        sizeCalculator.updateMaxAndMin(Float.valueOf(size.toString()));\r
-      }\r
-    }\r
-    Collections.sort(tagList);\r
-    return tagList;\r
-  }\r
-\r
-  private Integer getMeasureValue(Double value) {\r
-    Float floatValue = (value.floatValue() * 100.0f);\r
-    return floatValue.intValue();\r
-  }\r
-\r
-  private Measure getMeasure(Resource project, Metric metricToFind) {\r
-    return project.getMeasure(metricToFind);\r
-  }\r
-\r
-  private void createClouds(List<CloudElement> cloudElements, Metric colorMetric) {\r
-    for (CloudElement tag : cloudElements) {\r
-      HTML className = new HTML(\r
-          "<span style=\"font-size:" + Integer.toString(sizeCalculator.getFontSizePercent(tag.getFontSize())) +\r
-              "%; color:" + colorCalculator.getFontColor(tag.getFontColor()) + "\" >" +\r
-              tag.getResource().getName() + "</span>\n");\r
-      className.setStyleName("inline");\r
-\r
-      Hyperlink link = createLink(tag, colorMetric);\r
-      link.setHTML(className.getHTML());\r
-      main.add(link);\r
-    }\r
-  }\r
-\r
-  private Hyperlink createLink(CloudElement tag, final Metric colorMetric) {\r
-    Hyperlink link = new Hyperlink();\r
-    link.setStyleName("tag inline");\r
-    String tooltip = getTooltip(tag.getResource(), colorMetric);\r
-    link.getElement().setAttribute("title", tooltip);\r
-    link.getElement().setAttribute("rel", tooltip);\r
-\r
-    String sizeCss = Float.toString(maxSizePercent / 100f) + "em";\r
-    link.setHeight(sizeCss);\r
-    final Resource clickResource = tag.getResource();\r
-    link.addClickHandler(new ClickHandler() {\r
-      public void onClick(final ClickEvent event) {\r
-        if (clickResource.getCopy() != null) {\r
-          Window.Location.assign(Utils.getServerUrl() + "/plugins/resource/" + clickResource.getCopy() + "?page=" + GwtClouds.GWT_ID);\r
-        } else {\r
-          Utils.openResourcePopup(clickResource, colorMetric.getKey());\r
-        }\r
-      }\r
-    });\r
-\r
-    return link;\r
-  }\r
-\r
-  private String getTooltip(Resource resource, Metric colorMetric) {\r
-    Measure sizeMeasure = getMeasure(resource, sizeMetric);\r
-    String sizeMetricName = sizeMetric.getName();\r
-    String sizeMetricValue = sizeMeasure.getFormattedValue();\r
-\r
-    Measure colorMeasure = getMeasure(resource, colorMetric);\r
-    String colorMetricName = colorMetric.getName();\r
-    String colorMetricValue = colorMeasure.getFormattedValue();\r
-\r
-    return resource.getName(true) + ", " + sizeMetricName + " : " + sizeMetricValue + ", " + colorMetricName + " : " + colorMetricValue;\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.core.clouds.client.widget;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.*;
+import org.sonar.api.web.gwt.client.Utils;
+import org.sonar.api.web.gwt.client.webservices.Measure;
+import org.sonar.api.web.gwt.client.webservices.Resource;
+import org.sonar.api.web.gwt.client.webservices.WSMetrics.Metric;
+import org.sonar.api.web.gwt.client.widgets.LoadingLabel;
+import org.sonar.plugins.core.clouds.client.Calculator;
+import org.sonar.plugins.core.clouds.client.GwtClouds;
+import org.sonar.plugins.core.clouds.client.model.CloudElement;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class ClassCloudsWidget extends Composite {
+
+  private Panel main;
+  private Metric sizeMetric;
+  private List<Resource> resources;
+  private float minSizePercent = 60f;
+  private float maxSizePercent = 240f;
+
+  private Calculator sizeCalculator = new Calculator(minSizePercent, maxSizePercent);
+  private Calculator colorCalculator = new Calculator(0f, 100f);
+
+  public ClassCloudsWidget(List<Resource> resources, Metric sizeMetric) {
+    this.sizeMetric = sizeMetric;
+    this.main = new FlowPanel();
+    this.resources = resources;
+    initWidget(main);
+  }
+
+  public Metric getSizeMetric() {
+    return sizeMetric;
+  }
+
+  public void generateCloud(Metric colorMetric) {
+    main.clear();
+    LoadingLabel loading = new LoadingLabel();
+    main.add(loading);
+    if (colorMetric.equals(colorMetric)) {
+      List<CloudElement> cloudElements = getCloudElements(resources, colorMetric);
+      createClouds(cloudElements, colorMetric);
+    }
+    main.remove(loading);
+  }
+
+  private List<CloudElement> getCloudElements(List<Resource> resources, Metric colorMetric) {
+    List<CloudElement> tagList = new ArrayList<CloudElement>();
+    for (Resource resource : resources) {
+      Measure sizeMeasure = getMeasure(resource, sizeMetric);
+      Measure colorMeasure = getMeasure(resource, colorMetric);
+
+      if (sizeMeasure != null && colorMeasure != null) {
+        Integer size = getMeasureValue(sizeMeasure.getValue());
+        float color = colorMeasure.getValue().floatValue();
+        tagList.add(new CloudElement(resource, size, color));
+        sizeCalculator.updateMaxAndMin(Float.valueOf(size.toString()));
+      }
+    }
+    Collections.sort(tagList);
+    return tagList;
+  }
+
+  private Integer getMeasureValue(Double value) {
+    Float floatValue = (value.floatValue() * 100.0f);
+    return floatValue.intValue();
+  }
+
+  private Measure getMeasure(Resource project, Metric metricToFind) {
+    return project.getMeasure(metricToFind);
+  }
+
+  private void createClouds(List<CloudElement> cloudElements, Metric colorMetric) {
+    for (CloudElement tag : cloudElements) {
+      HTML className = new HTML(
+          "<span style=\"font-size:" + Integer.toString(sizeCalculator.getFontSizePercent(tag.getFontSize())) +
+              "%; color:" + colorCalculator.getFontColor(tag.getFontColor()) + "\" >" +
+              tag.getResource().getName() + "</span>\n");
+      className.setStyleName("inline");
+
+      Hyperlink link = createLink(tag, colorMetric);
+      link.setHTML(className.getHTML());
+      main.add(link);
+    }
+  }
+
+  private Hyperlink createLink(CloudElement tag, final Metric colorMetric) {
+    Hyperlink link = new Hyperlink();
+    link.setStyleName("tag inline");
+    String tooltip = getTooltip(tag.getResource(), colorMetric);
+    link.getElement().setAttribute("title", tooltip);
+    link.getElement().setAttribute("rel", tooltip);
+
+    String sizeCss = Float.toString(maxSizePercent / 100f) + "em";
+    link.setHeight(sizeCss);
+    final Resource clickResource = tag.getResource();
+    link.addClickHandler(new ClickHandler() {
+      public void onClick(final ClickEvent event) {
+        if (clickResource.getCopy() != null) {
+          Window.Location.assign(Utils.getServerUrl() + "/plugins/resource/" + clickResource.getCopy() + "?page=" + GwtClouds.GWT_ID);
+        } else {
+          Utils.openResourcePopup(clickResource, colorMetric.getKey());
+        }
+      }
+    });
+
+    return link;
+  }
+
+  private String getTooltip(Resource resource, Metric colorMetric) {
+    Measure sizeMeasure = getMeasure(resource, sizeMetric);
+    String sizeMetricName = sizeMetric.getName();
+    String sizeMetricValue = sizeMeasure.getFormattedValue();
+
+    Measure colorMeasure = getMeasure(resource, colorMetric);
+    String colorMetricName = colorMetric.getName();
+    String colorMetricValue = colorMeasure.getFormattedValue();
+
+    return resource.getName(true) + ", " + sizeMetricName + " : " + sizeMetricValue + ", " + colorMetricName + " : " + colorMetricValue;
+  }
+}
index 7e9b571a4e02fb90a9651a947e59a6f006aaf7fc..ace9d651a017c145e36ce14aa6006dc4ab0ce4b0 100644 (file)
@@ -1,77 +1,77 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.core.clouds.client.widget;\r
-\r
-import com.google.gwt.event.logical.shared.SelectionEvent;\r
-import com.google.gwt.event.logical.shared.SelectionHandler;\r
-import com.google.gwt.user.client.ui.Composite;\r
-import com.google.gwt.user.client.ui.Label;\r
-import com.google.gwt.user.client.ui.TabPanel;\r
-import com.google.gwt.user.client.ui.Widget;\r
-\r
-public class TabWidget extends Composite {\r
-\r
-  private TabPanel tab = new TabPanel();\r
-\r
-  private Integer nbTab;\r
-  private final Integer defaultSelectedTabPosition = 0;\r
-  private String selectedTabId;\r
-  private int selectedIndex;\r
-\r
-  public TabWidget(final SelectionHandler<Integer> selectionListener) {\r
-    nbTab = 0;\r
-    initWidget(tab);\r
-    tab.setWidth("100%");\r
-\r
-    tab.addSelectionHandler(new SelectionHandler<Integer>() {\r
-      public void onSelection(SelectionEvent<Integer> event) {\r
-        selectedTabId = tab.getWidget(event.getSelectedItem()).getElement().getId().replace("_tab_content", "");\r
-        selectedIndex = event.getSelectedItem();\r
-        selectionListener.onSelection(event);\r
-      }\r
-    });\r
-\r
-  }\r
-\r
-  public String getSelectedTabId() {\r
-    return selectedTabId;\r
-  }\r
-\r
-  public Widget getSelectedWidget() {\r
-    return tab.getWidget(selectedIndex);\r
-  }\r
-\r
-  public void addTab(Widget widget, String tabName, String id) {\r
-    widget.getElement().setId(id + "_tab_content");\r
-    tab.add(widget, createTabLabel(tabName, id));\r
-    if (nbTab.equals(defaultSelectedTabPosition)) {\r
-      tab.selectTab(defaultSelectedTabPosition);\r
-    }\r
-    nbTab++;\r
-  }\r
-\r
-  private Label createTabLabel(String tabName, String id) {\r
-    Label tabLabel = new Label(tabName);\r
-    tabLabel.getElement().setId(id + "_tab_title");\r
-    tabLabel.addStyleName("tab_title");\r
-    return tabLabel;\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.core.clouds.client.widget;
+
+import com.google.gwt.event.logical.shared.SelectionEvent;
+import com.google.gwt.event.logical.shared.SelectionHandler;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.TabPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class TabWidget extends Composite {
+
+  private TabPanel tab = new TabPanel();
+
+  private Integer nbTab;
+  private final Integer defaultSelectedTabPosition = 0;
+  private String selectedTabId;
+  private int selectedIndex;
+
+  public TabWidget(final SelectionHandler<Integer> selectionListener) {
+    nbTab = 0;
+    initWidget(tab);
+    tab.setWidth("100%");
+
+    tab.addSelectionHandler(new SelectionHandler<Integer>() {
+      public void onSelection(SelectionEvent<Integer> event) {
+        selectedTabId = tab.getWidget(event.getSelectedItem()).getElement().getId().replace("_tab_content", "");
+        selectedIndex = event.getSelectedItem();
+        selectionListener.onSelection(event);
+      }
+    });
+
+  }
+
+  public String getSelectedTabId() {
+    return selectedTabId;
+  }
+
+  public Widget getSelectedWidget() {
+    return tab.getWidget(selectedIndex);
+  }
+
+  public void addTab(Widget widget, String tabName, String id) {
+    widget.getElement().setId(id + "_tab_content");
+    tab.add(widget, createTabLabel(tabName, id));
+    if (nbTab.equals(defaultSelectedTabPosition)) {
+      tab.selectTab(defaultSelectedTabPosition);
+    }
+    nbTab++;
+  }
+
+  private Label createTabLabel(String tabName, String id) {
+    Label tabLabel = new Label(tabName);
+    tabLabel.getElement().setId(id + "_tab_title");
+    tabLabel.addStyleName("tab_title");
+    return tabLabel;
+  }
+
+}
index ba9231e491d2e6f503bab3d8ceb0520d5e253e9d..25989ae2d185ac13e63c2f527904af5db13e6e43 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fabda63343e6005d8dbf135cc6acc031e4a7840d..b6b4833e243f1668b5bf0354d41d39819e3a0a71 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 64752ddd7c04444b67e0fca7894682cf868db16e..61fa9cd8de42e66c88b1b9ae4b3e9a401b11b35f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f400727cc55ef939f579f8dc1ff68ec1d09889ce..df411bc82341aa1fd7ee8682d3e89ca33ca006d3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fd9a929ae581870f7fa35538780dadc257389654..ad6101bb31c01cc198839bc3ae28e3fbbcb739f8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b679a144f7675c4aafb6345f6119d9929d21e4ff..17c7ffa95b2fd7664d92a960b74fc5c38a1ef3fe 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 17f34ffa94b2dec9e861724ee926d30d61292747..24a8ff15392aa6166e5deeef9953c9ec81e9c431 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 742e0975dc79fa4b7da42a7bc9b4abae4a2ba2ea..cf44ad88b25ec2e4648ea3c6372a169ad8ef1a29 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 35ec96f4e93dfbd67e5b8e8715a0b314a2b96a14..33a02af82cd73cf6761f75b02c4012750532efc9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5f9f3edae0c3a157115f4bbdaefa6ed747bc7dfa..c4cd86ba5dc1e95e5edd234e943a9dd8ca831ca9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4abcd8f2b12968c6ea9a0f100bc9314a5efdc4a2..ac1ebd5ab0de1b476c0130c267d2188ae29d0034 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f214e9f58d93136c51ae3318bfe1020ffcf64a37..fa84185c303fef716cadd19a0d140f14e9a52488 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 688cca9a08ace57d34a1f75107c00f9f63cc770d..bb19d263d0c6fa278a71af22ce183bc8a0e71964 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e0400fa9eb959f7591e65341619d2cb0ccff7246..df84f197d496b4c115faa920c7d614b7a9b86ddb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6017b205060a7c80d088f78b9654cdd98e617d6e..d523bc13b4f51b5a01a61d0bc9d407e73f235851 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a8af7097d74095dcb51633162ca78c89362ee858..c58b018a6eb128789db337a9ce8fe70a547d5768 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 98bc53a04370d05dec5ce79deeaa561511b9011d..d1a60ecfc7ca9b33ca02a9eb1886ed51afed8304 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ace2bb747a6965ee77b261de73e8e7759be056e5..99f50ff1bc2f0f060f5869200689797becd86ab8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e6dfc2545e1d3b1a7ed1a7977c4bb72462c1425d..c757be379f66f9f7a0d1290d1f65b119d3a1c866 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ccebcbf588cd615b67fa546d602ac7bb0cee214c..1b7a29edd388823658702867ea73b32b00dfaae0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 29e5d451445e6cb0b3608d0e264bc52a00296cf3..90f2b6b2c0d3c038a08bebe345218e6934a29c7a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 048096e182f5913e9898fe8e7a82ba622cce2f92..7614a968b1090449c5540f989aa9a055aa3f7f5a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6c28f8c4d6c2ea1f431d34528b4702a218415750..f944d47110efd10c0163fb201515c006d5d922a2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 76b6226fc58ae551d8046d6cbd1cd9c06ef784c6..d15dccb52de45831fa97c6fcb833f61bbc3005e7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6b56ecc510cc653a124b24a73f65bbf3108ac09a..0d35f3be81811b2d6ea730b02d620f9392872f1b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 588852943e6b5ca745f772c3c57bfcf29a9f201a..a63c0119574da904c97d6496732d5d0ff8097af9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 42b63b4b87f1224f2e111f7258a4e61ed68d25ce..d17edf1ca350ab91ef91d8fc15a43428de2ffb70 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 71f43a8d3151149ce7980bd0a6a33d6ed9eac5dd..25d9d0abf1a564f60602a1be023538cc745ff063 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 944fc9a572d86fb978cf75c6457b03278607fadb..c56ab2192ef3b19235b56e15e99ade2fb6681e7c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 78365bce65c00b611fe32ad13475a9a40704f5cd..f594d19483536ef9bea7bf8eae9e913b98da09bd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a0f597ee7fca075dbb4e0a296691e065c3d1eb41..141d2eefd84cb9703859ea3b1be87f9b205a53a6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6820283e7958b52dd653dc8fd54cae6f3e83cf75..58d2f3cbf8534897548023178878ced38a754028 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 52cfebd7d3bd9950cbdbc1ca3c0834f964cf1674..a615b3579535708b0258f09ad7132529f2c3eb58 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 45d6dc5d7546b2f3287431e39ec189e29e96ae60..97b318199f59055a34637944b1cb857fbc45d09a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1f8d5a79a9e76487959180a11099103d408e7537..6907cacf1ef4097646919859e7930b58e5a6aac3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2f9f2e74779b4ab469d012b6b914417b18ec90e2..df4f66f9b048ace2892957216e9f8c6cbd83dac8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 12bea9448a2e88f4096f609ea8b27d54a9f9c60e..b03d92d07fd63c2f9b814ec643ce5a41628b2d97 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d6bc7c87828399ab912189e9dc6aff56130f1251..b548de52143e34d6108342650dcb8db5634b8951 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4003f18210680a732a432d576eedcf8a9e8b9b2f..d65f635424d278b9264c77610eef54a212f1833c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index aef6430ae375cdaa2b37d9501efe0d37befa304c..e3f1a8c8726415e4fcb600181f51718860a52418 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4102ec48e18f1e1b42205dc21ed3bb6fd7a1d203..ce4c61bd11ab749deda0f7f1a0079cec6553404e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5b3be2accff8ef0736922116b948634bed578706..74e149a2f9685bd5eca8498c5de342e4a0cba5bf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0d9d579eb0cede5ac575c5d78b17b3dde6732789..a0c45da54d83ffc048d830aa340678d80f834c20 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 559d61e3c43cccc265d3eb87c312eb7eb5400c9f..4342742a87eb027c55114b6acea889316a033116 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5df50ef60286868e7bba1ff48e8fc6d47395a767..a6c3e799b74655ed3acbe8752d22c8d1a3c11fb1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 124690647e9c88e8d8f3c1f3ca5f55a86e46d872..5adb42ac84f4050a40e1e471d90335593f786ba4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 62b8882fd2d22b82b2a8a18a62dd67c66a42c864..69b1ddccf1c85e95172e1f6bee6df7dca0636baf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c97cc7784bf2978f0fcbfee39d5818f028d24084..5d8ed7bd57ac853d786589e2c45f3faf22206894 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 661ea9f83d7a1c0a90e8c67a8005246d33e43865..fb8787355d8a55a875222b22c9cd95011b3207c8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e8170cbe4c6d9cca6053101d2889db8e0af36fad..c9ef33368dcb06082656ecafcc4f3594dae8219d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2af5b2f3d085f0f861437aa5674c0b18200bae50..153b4d66a3dac025edda62537d59d7e7d2832136 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8bc670aec9de56b59698afb46b5a57e1f7f3a249..c61a46bfec24b970db3fe1f2d47ff30d4cb614fd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 97c572ed9f72d55c7a5a4d56944cc2ab0ba03179..555d53e80b2968850161c5713834b66585300751 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1b5d56d458e1491b94213e7b0f30cd9f30d33516..1190432b1a9511761266884f24427624f2278632 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d09a3be007f8030b799dd9c027b1f71c47bdc80b..b0d1577210c5832d22ac9dd4eedf6c337ff0d103 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fdffd293ac044a06b65e142d73059bfa1acd5334..a0b636d14810a659229d8cb6e3c7ce1d706bcff9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index da1415f6fde46e74c4cf281e06f3a485a1f2a47c..53b5f77f3a2dd52fc063dfb4b2e62409f2bbd54f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4ec79fcdaae3fd049bd4be2146181fc05c498b6b..89af173f676ec582aabb07b355552dcf7eabb8b3 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.core.timemachine;\r
-\r
-import java.util.List;\r
-\r
-public class TendencyAnalyser {\r
-\r
-  public final static Integer TENDENCY_BIG_UP = 2;\r
-  public final static Integer TENDENCY_UP = 1;\r
-  public final static Integer TENDENCY_NEUTRAL = 0;\r
-  public final static Integer TENDENCY_DOWN = -1;\r
-  public final static Integer TENDENCY_BIG_DOWN = -2;\r
-\r
-  public Integer analyseLevel(List<Double> values) {\r
-    TendencyAnalyser.SlopeData slopeData = analyse(values);\r
-    if (slopeData != null) {\r
-      return slopeData.getLevel();\r
-    }\r
-    return null;\r
-  }\r
-\r
-  public SlopeData analyse(List<Double> values) {\r
-    double sumY = 0.0;\r
-    double sumX = 0.0;\r
-    double sumYPower2 = 0.0;\r
-    double sumXY = 0.0;\r
-    double sumXPower2 = 0.0;\r
-    int nbrPoints = 0;\r
-    boolean nullValuesYList = true;\r
-    int i = 0;\r
-    for (Double p : values) {\r
-      if (p != null) {\r
-        nullValuesYList = false;\r
-        //SumY calculation\r
-        sumY += p;\r
-        // sumYPower2 calculation\r
-        sumYPower2 += p * p;\r
-        //sumXY calculation\r
-        sumXY += p * (i + 1);\r
-        //SumX calculation\r
-        sumX += (i + 1);\r
-        //sumXPower2 calculation\r
-        sumXPower2 += (i + 1) * (i + 1);\r
-        //Point number calculation\r
-        nbrPoints++;\r
-      }\r
-      i++;\r
-    }\r
-    // no tendency if null values or only 1 value\r
-    if (nullValuesYList || nbrPoints == 1) {\r
-      return null;\r
-    }\r
-    double n0 = (((nbrPoints) * (sumXY)) - ((sumX) * (sumY)));\r
-    double d = (((nbrPoints) * (sumXPower2)) - ((sumX) * (sumX)));\r
-    double n1 = (((sumY) * (sumXPower2)) - ((sumX) * (sumXY)));\r
-\r
-    SlopeData result = new SlopeData();\r
-\r
-    //yIntercept Calculation the value when X equals zero\r
-    result.setYIntercept(n1 / d);\r
-    // Slope Calculation\r
-    if (n0 == 0d && d == 0d) {\r
-      result.setSlope(0.0);\r
-    } else {\r
-      Double slope = n0 / d;\r
-      if (Double.isNaN(slope) || Double.isInfinite(slope)) {\r
-        result.setSlope(null);\r
-      } else {\r
-        result.setSlope(slope);\r
-      }\r
-    }\r
-    result.setSumXPower2(sumXPower2);\r
-    result.setSumXY(sumXY);\r
-    result.setSumYPower2(sumYPower2);\r
-\r
-    if (sumXPower2 == 0 || sumYPower2 == 0) {\r
-      result.setCorrelationRate(0.0);\r
-    } else {\r
-      result.setCorrelationRate((sumXY) / (Math.sqrt(sumXPower2 * sumYPower2)));\r
-    }\r
-\r
-    return result;\r
-  }\r
-\r
-\r
-  static class SlopeData {\r
-    private double sumXPower2;\r
-    private double sumYPower2;\r
-    private double sumXY;\r
-    private double yIntercept; // not used today\r
-    private Double slope;\r
-    private Double correlationRate;\r
-\r
-    public double getSumXPower2() {\r
-      return sumXPower2;\r
-    }\r
-\r
-    public void setSumXPower2(double sumXPower2) {\r
-      this.sumXPower2 = sumXPower2;\r
-    }\r
-\r
-    public double getSumYPower2() {\r
-      return sumYPower2;\r
-    }\r
-\r
-    public void setSumYPower2(double sumYPower2) {\r
-      this.sumYPower2 = sumYPower2;\r
-    }\r
-\r
-    public double getSumXY() {\r
-      return sumXY;\r
-    }\r
-\r
-    public void setSumXY(double sumXY) {\r
-      this.sumXY = sumXY;\r
-    }\r
-\r
-    public double getYIntercept() {\r
-      return yIntercept;\r
-    }\r
-\r
-    public void setYIntercept(double yIntercept) {\r
-      this.yIntercept = yIntercept;\r
-    }\r
-\r
-    public Double getSlope() {\r
-      return slope;\r
-    }\r
-\r
-    public void setSlope(Double slope) {\r
-      this.slope = slope;\r
-    }\r
-\r
-    public Double getCorrelationRate() {\r
-      return correlationRate;\r
-    }\r
-\r
-    public void setCorrelationRate(Double correlationRate) {\r
-      this.correlationRate = correlationRate;\r
-    }\r
-\r
-    public Integer getLevel() {\r
-      double hSlope = 0.8;\r
-      double nSlope = 0.2;\r
-\r
-      double vHighCorcoef = 1.0;\r
-      double modCorcoef = 0.69;\r
-      Double correlationCoeff = getCorrelationRate();\r
-      boolean vHCorCoefPos = (correlationCoeff > modCorcoef) && (correlationCoeff <= vHighCorcoef);\r
-      boolean vHCorCoefNeg = (correlationCoeff < -modCorcoef) && (correlationCoeff >= -vHighCorcoef);\r
-\r
-      if ((vHCorCoefPos || vHCorCoefNeg) && (slope >= hSlope)) {\r
-        return TENDENCY_BIG_UP;\r
-\r
-      } else if ((vHCorCoefPos || vHCorCoefNeg) && (slope <= -hSlope)) {\r
-        return TENDENCY_BIG_DOWN;\r
-\r
-      } else if ((vHCorCoefPos || vHCorCoefNeg) && ((slope >= nSlope) && (slope < hSlope))) {\r
-        return TENDENCY_UP;\r
-\r
-      } else if ((vHCorCoefPos || vHCorCoefNeg) && ((slope <= -nSlope) && (slope > -hSlope))) {\r
-        return TENDENCY_DOWN;\r
-\r
-      } else if ((vHCorCoefPos || vHCorCoefNeg) && ((slope < nSlope) || (slope > -nSlope))) {\r
-        return TENDENCY_NEUTRAL;\r
-\r
-      } else if (correlationCoeff == 0 && slope == 0 && !vHCorCoefPos && !vHCorCoefNeg) {\r
-        return TENDENCY_NEUTRAL;\r
-      }\r
-      return null;\r
-    }\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.core.timemachine;
+
+import java.util.List;
+
+public class TendencyAnalyser {
+
+  public final static Integer TENDENCY_BIG_UP = 2;
+  public final static Integer TENDENCY_UP = 1;
+  public final static Integer TENDENCY_NEUTRAL = 0;
+  public final static Integer TENDENCY_DOWN = -1;
+  public final static Integer TENDENCY_BIG_DOWN = -2;
+
+  public Integer analyseLevel(List<Double> values) {
+    TendencyAnalyser.SlopeData slopeData = analyse(values);
+    if (slopeData != null) {
+      return slopeData.getLevel();
+    }
+    return null;
+  }
+
+  public SlopeData analyse(List<Double> values) {
+    double sumY = 0.0;
+    double sumX = 0.0;
+    double sumYPower2 = 0.0;
+    double sumXY = 0.0;
+    double sumXPower2 = 0.0;
+    int nbrPoints = 0;
+    boolean nullValuesYList = true;
+    int i = 0;
+    for (Double p : values) {
+      if (p != null) {
+        nullValuesYList = false;
+        //SumY calculation
+        sumY += p;
+        // sumYPower2 calculation
+        sumYPower2 += p * p;
+        //sumXY calculation
+        sumXY += p * (i + 1);
+        //SumX calculation
+        sumX += (i + 1);
+        //sumXPower2 calculation
+        sumXPower2 += (i + 1) * (i + 1);
+        //Point number calculation
+        nbrPoints++;
+      }
+      i++;
+    }
+    // no tendency if null values or only 1 value
+    if (nullValuesYList || nbrPoints == 1) {
+      return null;
+    }
+    double n0 = (((nbrPoints) * (sumXY)) - ((sumX) * (sumY)));
+    double d = (((nbrPoints) * (sumXPower2)) - ((sumX) * (sumX)));
+    double n1 = (((sumY) * (sumXPower2)) - ((sumX) * (sumXY)));
+
+    SlopeData result = new SlopeData();
+
+    //yIntercept Calculation the value when X equals zero
+    result.setYIntercept(n1 / d);
+    // Slope Calculation
+    if (n0 == 0d && d == 0d) {
+      result.setSlope(0.0);
+    } else {
+      Double slope = n0 / d;
+      if (Double.isNaN(slope) || Double.isInfinite(slope)) {
+        result.setSlope(null);
+      } else {
+        result.setSlope(slope);
+      }
+    }
+    result.setSumXPower2(sumXPower2);
+    result.setSumXY(sumXY);
+    result.setSumYPower2(sumYPower2);
+
+    if (sumXPower2 == 0 || sumYPower2 == 0) {
+      result.setCorrelationRate(0.0);
+    } else {
+      result.setCorrelationRate((sumXY) / (Math.sqrt(sumXPower2 * sumYPower2)));
+    }
+
+    return result;
+  }
+
+
+  static class SlopeData {
+    private double sumXPower2;
+    private double sumYPower2;
+    private double sumXY;
+    private double yIntercept; // not used today
+    private Double slope;
+    private Double correlationRate;
+
+    public double getSumXPower2() {
+      return sumXPower2;
+    }
+
+    public void setSumXPower2(double sumXPower2) {
+      this.sumXPower2 = sumXPower2;
+    }
+
+    public double getSumYPower2() {
+      return sumYPower2;
+    }
+
+    public void setSumYPower2(double sumYPower2) {
+      this.sumYPower2 = sumYPower2;
+    }
+
+    public double getSumXY() {
+      return sumXY;
+    }
+
+    public void setSumXY(double sumXY) {
+      this.sumXY = sumXY;
+    }
+
+    public double getYIntercept() {
+      return yIntercept;
+    }
+
+    public void setYIntercept(double yIntercept) {
+      this.yIntercept = yIntercept;
+    }
+
+    public Double getSlope() {
+      return slope;
+    }
+
+    public void setSlope(Double slope) {
+      this.slope = slope;
+    }
+
+    public Double getCorrelationRate() {
+      return correlationRate;
+    }
+
+    public void setCorrelationRate(Double correlationRate) {
+      this.correlationRate = correlationRate;
+    }
+
+    public Integer getLevel() {
+      double hSlope = 0.8;
+      double nSlope = 0.2;
+
+      double vHighCorcoef = 1.0;
+      double modCorcoef = 0.69;
+      Double correlationCoeff = getCorrelationRate();
+      boolean vHCorCoefPos = (correlationCoeff > modCorcoef) && (correlationCoeff <= vHighCorcoef);
+      boolean vHCorCoefNeg = (correlationCoeff < -modCorcoef) && (correlationCoeff >= -vHighCorcoef);
+
+      if ((vHCorCoefPos || vHCorCoefNeg) && (slope >= hSlope)) {
+        return TENDENCY_BIG_UP;
+
+      } else if ((vHCorCoefPos || vHCorCoefNeg) && (slope <= -hSlope)) {
+        return TENDENCY_BIG_DOWN;
+
+      } else if ((vHCorCoefPos || vHCorCoefNeg) && ((slope >= nSlope) && (slope < hSlope))) {
+        return TENDENCY_UP;
+
+      } else if ((vHCorCoefPos || vHCorCoefNeg) && ((slope <= -nSlope) && (slope > -hSlope))) {
+        return TENDENCY_DOWN;
+
+      } else if ((vHCorCoefPos || vHCorCoefNeg) && ((slope < nSlope) || (slope > -nSlope))) {
+        return TENDENCY_NEUTRAL;
+
+      } else if (correlationCoeff == 0 && slope == 0 && !vHCorCoefPos && !vHCorCoefNeg) {
+        return TENDENCY_NEUTRAL;
+      }
+      return null;
+    }
+  }
+}
index 310b19f04efe7ea668edb5e60fade7dd0a97b32c..e68ae61ce77e8d676cc300a62fbe4664ffa2d124 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5d2e923e70a48ec13f0aff30bb474c454b4ff4e3..092f59bed7a3350f88d8b3dd688648a6fac45244 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 68e686f61c8785452a7a8371319af16d933045b3..ac55d86ebf523e43eb1fcb4e5b02c4b6bc098d45 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2c1c31fe9e4edca4877dc26b517c9dc356ce444c..e1299a013651e6322b339cb06c611e709a5e7b6e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 426f35f93f8c0f4d611e3ea32bddad38b7fd0f9a..3f7933cea9d3747be6c9d85fe354bd9bf131c919 100644 (file)
@@ -1,39 +1,39 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.core.widgets;\r
-\r
-import org.sonar.api.web.*;\r
-\r
-@WidgetLayout(WidgetLayoutType.NONE)\r
-@Description("Display current alerts on the project.")\r
-public class AlertsWidget extends AbstractRubyTemplate implements RubyRailsWidget {\r
-  public String getId() {\r
-    return "alerts";\r
-  }\r
-\r
-  public String getTitle() {\r
-    return "Alerts";\r
-  }\r
-\r
-  @Override\r
-  protected String getTemplatePath() {\r
-    return "/org/sonar/plugins/core/widgets/alerts.html.erb";\r
-  }\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.core.widgets;
+
+import org.sonar.api.web.*;
+
+@WidgetLayout(WidgetLayoutType.NONE)
+@Description("Display current alerts on the project.")
+public class AlertsWidget extends AbstractRubyTemplate implements RubyRailsWidget {
+  public String getId() {
+    return "alerts";
+  }
+
+  public String getTitle() {
+    return "Alerts";
+  }
+
+  @Override
+  protected String getTemplatePath() {
+    return "/org/sonar/plugins/core/widgets/alerts.html.erb";
+  }
 }
\ No newline at end of file
index cd3f09e0df9e093414366154c2b363d1c4412a29..5f9b6697f8d639ee65a25a3251c4f937c7629271 100644 (file)
@@ -1,42 +1,42 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.core.widgets;\r
-\r
-import org.sonar.api.web.AbstractRubyTemplate;\r
-import org.sonar.api.web.Description;\r
-import org.sonar.api.web.RubyRailsWidget;\r
-import org.sonar.api.web.WidgetCategory;\r
-\r
-@WidgetCategory({"Tests"})\r
-@Description("Reports on units tests and code coverage by unit tests.")\r
-public class CodeCoverageWidget extends AbstractRubyTemplate implements RubyRailsWidget {\r
-  public String getId() {\r
-    return "code_coverage";\r
-  }\r
-\r
-  public String getTitle() {\r
-    return "Code coverage";\r
-  }\r
-\r
-  @Override\r
-  protected String getTemplatePath() {\r
-    return "/org/sonar/plugins/core/widgets/code_coverage.html.erb";\r
-  }\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.core.widgets;
+
+import org.sonar.api.web.AbstractRubyTemplate;
+import org.sonar.api.web.Description;
+import org.sonar.api.web.RubyRailsWidget;
+import org.sonar.api.web.WidgetCategory;
+
+@WidgetCategory({"Tests"})
+@Description("Reports on units tests and code coverage by unit tests.")
+public class CodeCoverageWidget extends AbstractRubyTemplate implements RubyRailsWidget {
+  public String getId() {
+    return "code_coverage";
+  }
+
+  public String getTitle() {
+    return "Code coverage";
+  }
+
+  @Override
+  protected String getTemplatePath() {
+    return "/org/sonar/plugins/core/widgets/code_coverage.html.erb";
+  }
 }
\ No newline at end of file
index 6244640336674767ae7d5b0d5375f966b4670d71..a8f5fbeb7eff510e32a0ae4e76b0e0ffd551228f 100644 (file)
@@ -1,40 +1,40 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.core.widgets;\r
-\r
-import org.sonar.api.web.AbstractRubyTemplate;\r
-import org.sonar.api.web.Description;\r
-import org.sonar.api.web.RubyRailsWidget;\r
-\r
-@Description("Reports on copy/paste and documentation")\r
-public class CommentsDuplicationsWidget extends AbstractRubyTemplate implements RubyRailsWidget {\r
-  public String getId() {\r
-    return "comments_duplications";\r
-  }\r
-\r
-  public String getTitle() {\r
-    return "Comments & Duplications";\r
-  }\r
-\r
-  @Override\r
-  protected String getTemplatePath() {\r
-    return "/org/sonar/plugins/core/widgets/comments_duplications.html.erb";\r
-  }\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.core.widgets;
+
+import org.sonar.api.web.AbstractRubyTemplate;
+import org.sonar.api.web.Description;
+import org.sonar.api.web.RubyRailsWidget;
+
+@Description("Reports on copy/paste and documentation")
+public class CommentsDuplicationsWidget extends AbstractRubyTemplate implements RubyRailsWidget {
+  public String getId() {
+    return "comments_duplications";
+  }
+
+  public String getTitle() {
+    return "Comments & Duplications";
+  }
+
+  @Override
+  protected String getTemplatePath() {
+    return "/org/sonar/plugins/core/widgets/comments_duplications.html.erb";
+  }
 }
\ No newline at end of file
index 90dba687ae3e778b33d79f609657f872149f107d..cf955db69d32d952b8af4a65f486acfde44527c2 100644 (file)
@@ -1,40 +1,40 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.core.widgets;\r
-\r
-import org.sonar.api.web.AbstractRubyTemplate;\r
-import org.sonar.api.web.Description;\r
-import org.sonar.api.web.RubyRailsWidget;\r
-\r
-@Description("Reports on complexity, average complexity and complexity distribution.")\r
-public class ComplexityWidget extends AbstractRubyTemplate implements RubyRailsWidget {\r
-  public String getId() {\r
-    return "complexity";\r
-  }\r
-\r
-  public String getTitle() {\r
-    return "Complexity";\r
-  }\r
-\r
-  @Override\r
-  protected String getTemplatePath() {\r
-    return "/org/sonar/plugins/core/widgets/complexity.html.erb";\r
-  }\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.core.widgets;
+
+import org.sonar.api.web.AbstractRubyTemplate;
+import org.sonar.api.web.Description;
+import org.sonar.api.web.RubyRailsWidget;
+
+@Description("Reports on complexity, average complexity and complexity distribution.")
+public class ComplexityWidget extends AbstractRubyTemplate implements RubyRailsWidget {
+  public String getId() {
+    return "complexity";
+  }
+
+  public String getTitle() {
+    return "Complexity";
+  }
+
+  @Override
+  protected String getTemplatePath() {
+    return "/org/sonar/plugins/core/widgets/complexity.html.erb";
+  }
 }
\ No newline at end of file
index 84d99a7f63c1d67bc7e223a71c39b9b2bc0a0e7b..5bb3525a3fd27f9f5fda5ca1c8a0f8bed1e18399 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f3304e4607341f8e7ce2071943e19c62b1226e32..02cf7944cc06a21d993bfba29b590e9311cbcfe3 100644 (file)
@@ -1,39 +1,39 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.core.widgets;\r
-\r
-import org.sonar.api.web.*;\r
-\r
-@WidgetLayout(WidgetLayoutType.NONE)\r
-@Description("Displays general project information taken from the pom.xml")\r
-public class DescriptionWidget extends AbstractRubyTemplate implements RubyRailsWidget {\r
-  public String getId() {\r
-    return "description";\r
-  }\r
-\r
-  public String getTitle() {\r
-    return "Description";\r
-  }\r
-\r
-  @Override\r
-  protected String getTemplatePath() {\r
-    return "/org/sonar/plugins/core/widgets/description.html.erb";\r
-  }\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.core.widgets;
+
+import org.sonar.api.web.*;
+
+@WidgetLayout(WidgetLayoutType.NONE)
+@Description("Displays general project information taken from the pom.xml")
+public class DescriptionWidget extends AbstractRubyTemplate implements RubyRailsWidget {
+  public String getId() {
+    return "description";
+  }
+
+  public String getTitle() {
+    return "Description";
+  }
+
+  @Override
+  protected String getTemplatePath() {
+    return "/org/sonar/plugins/core/widgets/description.html.erb";
+  }
 }
\ No newline at end of file
index 0da901088b665665808ddc86108bc8d5499a6bbb..1c1ccc2775a16575494e4aac82e0933bba2db945 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d9d166aefdada24c827bcf435d638e81ac8b2300..37acbe7955998bec1019aa44a8673cddbf0a5494 100644 (file)
@@ -1,39 +1,39 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.core.widgets;\r
-\r
-import org.sonar.api.web.*;\r
-\r
-@WidgetCategory({"Rules"})\r
-@Description("Reports violations and compliance index on coding standards.")\r
-public class RulesWidget extends AbstractRubyTemplate implements RubyRailsWidget {\r
-  public String getId() {\r
-    return "rules";\r
-  }\r
-\r
-  public String getTitle() {\r
-    return "Rules Compliance";\r
-  }\r
-\r
-  @Override\r
-  protected String getTemplatePath() {\r
-    return "/org/sonar/plugins/core/widgets/rules.html.erb";\r
-  }\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.core.widgets;
+
+import org.sonar.api.web.*;
+
+@WidgetCategory({"Rules"})
+@Description("Reports violations and compliance index on coding standards.")
+public class RulesWidget extends AbstractRubyTemplate implements RubyRailsWidget {
+  public String getId() {
+    return "rules";
+  }
+
+  public String getTitle() {
+    return "Rules Compliance";
+  }
+
+  @Override
+  protected String getTemplatePath() {
+    return "/org/sonar/plugins/core/widgets/rules.html.erb";
+  }
 }
\ No newline at end of file
index 3c6a5c4205599e139d83d496c635e335ad879983..b7ff7657d5f41b34dee6eedbb12c90fd7e60cb95 100644 (file)
@@ -1,40 +1,40 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.core.widgets;\r
-\r
-import org.sonar.api.web.AbstractRubyTemplate;\r
-import org.sonar.api.web.Description;\r
-import org.sonar.api.web.RubyRailsWidget;\r
-\r
-@Description("Reports general metrics on the size of the project.")\r
-public class SizeWidget extends AbstractRubyTemplate implements RubyRailsWidget {\r
-  public String getId() {\r
-    return "size";\r
-  }\r
-\r
-  public String getTitle() {\r
-    return "Size metrics";\r
-  }\r
-\r
-  @Override\r
-  protected String getTemplatePath() {\r
-    return "/org/sonar/plugins/core/widgets/size.html.erb";\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.core.widgets;
+
+import org.sonar.api.web.AbstractRubyTemplate;
+import org.sonar.api.web.Description;
+import org.sonar.api.web.RubyRailsWidget;
+
+@Description("Reports general metrics on the size of the project.")
+public class SizeWidget extends AbstractRubyTemplate implements RubyRailsWidget {
+  public String getId() {
+    return "size";
+  }
+
+  public String getTitle() {
+    return "Size metrics";
+  }
+
+  @Override
+  protected String getTemplatePath() {
+    return "/org/sonar/plugins/core/widgets/size.html.erb";
+  }
+}
index b9dd13aaa14e7c13ea7e321120f05eda13b69b28..01465d08843572b98add61494a8ed2105a851a0e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b65b05007473ffa3a8cf13a0636240518f6940d1..2079725ed5efa94f128597472697a9d2206afc0c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3be2879ad121b0a4148175f29febddac155a9599..a2e5fa7afa7dbfe0cf700ae800ead9b008b7dcee 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b83ed6f81ed90a81f83ece3e33bc8d2ff8577833..e3e9a75cde6dade8aee0897f7f670dab79d60f08 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8f9cb7eb745af2ec51d0bc3043b16732ad40f6fe..e744e5f3b0b3f7acd680092672700fb46359c1b8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7ce01bb0ae1b052a0b50815f166edc3bd80d3e7e..238f26d655895b8443b7b00d3e8b257e08bae441 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 51673cd37f0411f1c192880df9356ff1b3ac827f..0721a6ae9d3a9f6a95ba703582f5a95b2f604ff1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ad89b5611b7e6fc49ec2726391f78999396f6e39..fb289e72caac973e2d6dc13d7bc95785986e173b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 828ab46c4c9f8d8c9b9b9292257d82745fd6990c..e0c19eaf81ef744cae0f2fbee657ca704242db8c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 69e3e06bd9e750cb18eb4c44443183a8445733e1..e98980ba776df6ad47057e354048724c40d1ae3b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4354c4914c9e78e13811574db161b3d5f3c983dc..c8958fe4572647f421601a62ae2e3ef342a25bc4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fd887e5df7a60a8bc9f519255b91902eef2423dd..355e400ce77def45817b99016a2dd497619d3192 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 01a90d7afb0c1a3bc16d02580e04dc237f0795f2..e0d15196855088d52a760619b6fe63346ed3d4e1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b3b3720fb5f497c74dbfe3a0e217dde41b401e74..2515abb7d068de062db1305e5649e995dd7092d7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6a5732d76ae3b93a251375804fb322ed170ef97f..15964b7259e860cfdba18b14f25be620686dc9bc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 018ac63750359b74c2cd91591a56c278060ea181..15d2e56d0f1c91e63877a5acce6d0442eaeaa004 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c0b9484795003748deefa7dfa18b4dd605e661a2..29ac9fad4ecbf7fd53c0a3cffdbd1ea6586676c1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 38f44eb001dec5d5be120c4c8430bc04d6ebe2e1..d4a6b85a72daf916dfc31d89be9901147a485f5a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6c3c4f0804979807342a592a0864fc16092a4617..e585691f730d647f9283ccb27792985a49ee65a4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2f837804bc09931e225dd0ef7f591650f67feae1..3b46ae33a0f8629e01d891b30f6e6196117cff92 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ef6401e557833682bceb1e5c597b863465f2acdd..e3ac1ee4d5e3246313beef8a97d8ff5b545caedb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e848be2a39d2a4d7f87c2fd01f6da2b2dbf6d57a..7317348074897e06ccf3c53bf7fead02f099f50c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7bf1650e570ba8e81848218251dc03e832e66d2c..8e242d4a95de16961b4dd31980066423104d6a54 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c6bb156ecba56b38634e98ea38cf591b7a71f0ec..54407f80223d7ab9c43c55935f262ebd0f601c0b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 22574d4a1b7a231843ea0ca4c5da8e6149975e5b..22a239811b3cd3257970b8a373d83e3ffe79384c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 15acb78854de9670511182af6cc255b36064591e..0f3b6aa748ea10871bc28cfdf2bfbfaa5f4c48eb 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.core.timemachine;\r
-\r
-import org.junit.Test;\r
-\r
-import java.util.Arrays;\r
-import java.util.Collections;\r
-import java.util.List;\r
-\r
-import static org.hamcrest.CoreMatchers.nullValue;\r
-import static org.junit.Assert.*;\r
-\r
-public class TendencyAnalyserTest {\r
-  private TendencyAnalyser analyser = new TendencyAnalyser();\r
-\r
-  private List<Double> getValues(Double[] array) {\r
-    return Arrays.asList(array);\r
-  }\r
-\r
-\r
-  protected void assertBetween(String typeLabel, Double value, Double min, Double max) {\r
-    assertTrue(typeLabel + " " + value + "<" + min, value >= min);\r
-    assertTrue(typeLabel + "=" + value + ">" + max, value <= max);\r
-  }\r
-\r
-  @Test\r
-  public void testNoData() {\r
-    assertThat(analyser.analyse(Collections.<Double>emptyList()), nullValue());\r
-  }\r
-\r
-  @Test\r
-  public void testNotEnoughData() {\r
-    assertThat(analyser.analyseLevel(Arrays.asList(10.0)), nullValue());\r
-  }\r
-\r
-  @Test\r
-  public void testTendencyOnThreeDays() {\r
-    Double[] doubles = new Double[]{10.0, null, 9.9};\r
-    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));\r
-    assertBetween("slope", slopeData.getSlope(), -0.5, 0.5);\r
-    assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel());\r
-  }\r
-\r
-  @Test\r
-  public void testTendencyOnTwoZeroDays() {\r
-    Double[] doubles = new Double[]{0.0, 0.0};\r
-    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));\r
-    assertBetween("slope", slopeData.getSlope(), -0.0, 0.0);\r
-    assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel());\r
-  }\r
-\r
-  @Test\r
-  public void testTendencyOnThreeZeroDays() {\r
-    Double[] doubles = new Double[]{0.0, 0.0, 0.0};\r
-    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));\r
-    assertBetween("slope", slopeData.getSlope(), -0.0, 0.0);\r
-    assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel());\r
-  }\r
-\r
-  @Test\r
-  public void testBigDownOnThreeDays() {\r
-    Double[] doubles = new Double[]{90.0, 91.0, 50.0};\r
-    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));\r
-    assertTrue("slope", slopeData.getSlope() < -2.0);\r
-    assertEquals(TendencyAnalyser.TENDENCY_BIG_DOWN, slopeData.getLevel());\r
-  }\r
-\r
-  @Test\r
-  public void testFlatTendency() {\r
-    Double[] doubles = new Double[]{10.0, 10.2, 9.9};\r
-    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));\r
-    assertBetween("slope", slopeData.getSlope(), -0.5, 0.5);\r
-    assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel());\r
-  }\r
-\r
-  @Test\r
-  public void testFlatTendencyWithPeak() {\r
-    Double[] doubles = new Double[]{10.0, 15.0, 10.0};\r
-    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));\r
-    assertBetween("slope", slopeData.getSlope(), -0.5, 0.5);\r
-    assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel());\r
-  }\r
-\r
-  @Test\r
-  public void testBigUpTendencyOnThreeValues() {\r
-    Double[] doubles = new Double[]{10.0, 12.0, 15.5};\r
-    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));\r
-    assertBetween("slope", slopeData.getSlope(), 2.5, 3.0);\r
-    assertEquals(TendencyAnalyser.TENDENCY_BIG_UP, slopeData.getLevel());\r
-  }\r
-\r
-  @Test\r
-  public void testBigUpTendencyOnTenValues() {\r
-    Double[] doubles = new Double[]{45.0, 60.0, 57.0, 65.0, 58.0, 68.0, 59.0, 66.0, 76.0, 80.0};\r
-    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));\r
-    assertBetween("slope", slopeData.getSlope(), 2.5, 3.0);\r
-    assertEquals(TendencyAnalyser.TENDENCY_BIG_UP, slopeData.getLevel());\r
-  }\r
-\r
-  @Test\r
-  public void testMediumUpTendency() {\r
-    Double[] doubles = new Double[]{5.0, 4.5, 5.1, 5.5, 5.3, 6.4, 6.3, 6.6, 6.8, 6.5};\r
-    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));\r
-    assertBetween("slope", slopeData.getSlope(), 0.0, 1.0);\r
-    assertEquals(TendencyAnalyser.TENDENCY_UP, slopeData.getLevel());\r
-  }\r
-\r
-  @Test\r
-  public void testAsymetricAlgorithm() {\r
-    TendencyAnalyser.SlopeData slopeData1 = analyser.analyse(getValues(new Double[]{45.0, 47.0, 95.0}));\r
-    TendencyAnalyser.SlopeData slopeData2 = analyser.analyse(getValues(new Double[]{95.0, 45.0, 47.0}));\r
-    assertTrue(slopeData1.getSlope() != slopeData2.getSlope());\r
-  }\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.core.timemachine;
+
+import org.junit.Test;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.*;
+
+public class TendencyAnalyserTest {
+  private TendencyAnalyser analyser = new TendencyAnalyser();
+
+  private List<Double> getValues(Double[] array) {
+    return Arrays.asList(array);
+  }
+
+
+  protected void assertBetween(String typeLabel, Double value, Double min, Double max) {
+    assertTrue(typeLabel + " " + value + "<" + min, value >= min);
+    assertTrue(typeLabel + "=" + value + ">" + max, value <= max);
+  }
+
+  @Test
+  public void testNoData() {
+    assertThat(analyser.analyse(Collections.<Double>emptyList()), nullValue());
+  }
+
+  @Test
+  public void testNotEnoughData() {
+    assertThat(analyser.analyseLevel(Arrays.asList(10.0)), nullValue());
+  }
+
+  @Test
+  public void testTendencyOnThreeDays() {
+    Double[] doubles = new Double[]{10.0, null, 9.9};
+    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
+    assertBetween("slope", slopeData.getSlope(), -0.5, 0.5);
+    assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel());
+  }
+
+  @Test
+  public void testTendencyOnTwoZeroDays() {
+    Double[] doubles = new Double[]{0.0, 0.0};
+    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
+    assertBetween("slope", slopeData.getSlope(), -0.0, 0.0);
+    assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel());
+  }
+
+  @Test
+  public void testTendencyOnThreeZeroDays() {
+    Double[] doubles = new Double[]{0.0, 0.0, 0.0};
+    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
+    assertBetween("slope", slopeData.getSlope(), -0.0, 0.0);
+    assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel());
+  }
+
+  @Test
+  public void testBigDownOnThreeDays() {
+    Double[] doubles = new Double[]{90.0, 91.0, 50.0};
+    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
+    assertTrue("slope", slopeData.getSlope() < -2.0);
+    assertEquals(TendencyAnalyser.TENDENCY_BIG_DOWN, slopeData.getLevel());
+  }
+
+  @Test
+  public void testFlatTendency() {
+    Double[] doubles = new Double[]{10.0, 10.2, 9.9};
+    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
+    assertBetween("slope", slopeData.getSlope(), -0.5, 0.5);
+    assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel());
+  }
+
+  @Test
+  public void testFlatTendencyWithPeak() {
+    Double[] doubles = new Double[]{10.0, 15.0, 10.0};
+    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
+    assertBetween("slope", slopeData.getSlope(), -0.5, 0.5);
+    assertEquals(TendencyAnalyser.TENDENCY_NEUTRAL, slopeData.getLevel());
+  }
+
+  @Test
+  public void testBigUpTendencyOnThreeValues() {
+    Double[] doubles = new Double[]{10.0, 12.0, 15.5};
+    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
+    assertBetween("slope", slopeData.getSlope(), 2.5, 3.0);
+    assertEquals(TendencyAnalyser.TENDENCY_BIG_UP, slopeData.getLevel());
+  }
+
+  @Test
+  public void testBigUpTendencyOnTenValues() {
+    Double[] doubles = new Double[]{45.0, 60.0, 57.0, 65.0, 58.0, 68.0, 59.0, 66.0, 76.0, 80.0};
+    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
+    assertBetween("slope", slopeData.getSlope(), 2.5, 3.0);
+    assertEquals(TendencyAnalyser.TENDENCY_BIG_UP, slopeData.getLevel());
+  }
+
+  @Test
+  public void testMediumUpTendency() {
+    Double[] doubles = new Double[]{5.0, 4.5, 5.1, 5.5, 5.3, 6.4, 6.3, 6.6, 6.8, 6.5};
+    TendencyAnalyser.SlopeData slopeData = analyser.analyse(getValues(doubles));
+    assertBetween("slope", slopeData.getSlope(), 0.0, 1.0);
+    assertEquals(TendencyAnalyser.TENDENCY_UP, slopeData.getLevel());
+  }
+
+  @Test
+  public void testAsymetricAlgorithm() {
+    TendencyAnalyser.SlopeData slopeData1 = analyser.analyse(getValues(new Double[]{45.0, 47.0, 95.0}));
+    TendencyAnalyser.SlopeData slopeData2 = analyser.analyse(getValues(new Double[]{95.0, 45.0, 47.0}));
+    assertTrue(slopeData1.getSlope() != slopeData2.getSlope());
+  }
 }
\ No newline at end of file
index ddf68f6d4283f00b05e5b7139aad83c67b0dbe2d..9fd3336ab0cc601541af41fab0e2a0bc1b72bf17 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 20bf7ddcdf2674bd969d9db46c76f22830df36ff..90481c78e65b7e3dc24b7e71d6cb3d721b9931a5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4a834d657964e56937fcaac0fb679e043df9e4e6..5af00f44226560d2d6d838241d41f2d93dd3c25c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 76fddcfb7f9d39e91c75c9e3bad098efab34d755..12d954646374d7cf8f1c8b388e6a44394bb0903f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 741496af6a469e7cc94e7797722d3c18e4c4a96b..daf343330c6dbb19563012285a089d9a82b4f878 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4d1da130abb6bec39b9e7c9384a9eba404948237..7693706f382eeb28e8ebd8e976b005c7ac858105 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 389a4c59c086c6b852f6123a32486db1bb71dc63..f7aa533e9adfc8a283d9611304c2ffec5ca47008 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e4a8c54a4ad334f05e6dfb87ffaa88bf7f1881ce..3c64cd47ff46ec97dbfe713ed60298dac625e9a4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index db2323836220059c4df8305c8571ccecaf1af7e9..3e65dd742eac3ac1f4132508e6e5db54d728ae47 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5faa5ab2a1de0b31e1ecd8021841faab8c3dd10c..c588660de2dadeb1d6fbc2242f27c270971f4c1c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c05835cfb13e0dd2925ccf14aeda052c544ad23b..dcee3b1586696f6c4d8bdf6005f5c96a04f9e2cd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c47b18a7110663d59e4d46dc78729591338e17a4..008b2ffd5a4059997d4d162a7d8c585087f50aaf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cc4e4681e85d32ed496aa8691632c51e8d82802f..1e3872068230cfbc505ee1a997371d663dc62927 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4fa0132b48d467135b08d2f4c6b42571d56b2ce4..2f640d525a6c7bf741ce44c9982e338867a30308 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3687a26b3a1db3879e73e9f4eacae5ac1c61d176..a7699d21c4c5791dfc9ef67d739b35529cfaccb2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f958c8549fe1d6b4b2cc5d85f1cde142b1064814..aa6ea11a769737c28e708b3f5bcd243a13da1d60 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 32cf781e366ac8beb9a547eafb36e78e0b08edeb..931d63bdfec52e72d60c0f28399e8716eac6f97d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 996957efb338de1b303b86b38b67896288635616..2ab4c945bcabab6f69f2d696012cbdb20d09b590 100644 (file)
@@ -1,78 +1,78 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.dbcleaner;\r
-\r
-import org.sonar.api.Plugin;\r
-import org.sonar.api.Properties;\r
-import org.sonar.api.Property;\r
-import org.sonar.plugins.dbcleaner.api.DbCleanerConstants;\r
-import org.sonar.plugins.dbcleaner.period.DefaultPeriodCleaner;\r
-import org.sonar.plugins.dbcleaner.period.PeriodPurge;\r
-import org.sonar.plugins.dbcleaner.purges.*;\r
-import org.sonar.plugins.dbcleaner.runner.PurgeRunner;\r
-\r
-import java.util.Arrays;\r
-import java.util.List;\r
-\r
-@Properties({\r
-    @Property(key = DbCleanerConstants.MONTHS_BEFORE_KEEPING_ONLY_ONE_SNAPSHOT_BY_WEEK,\r
-        defaultValue = DbCleanerConstants.ONE_MONTH, name = "Number of months before starting to keep only one snapshot by week",\r
-        description = "After this number of months, if there are several snapshots during the same week, "\r
-            + "the DbCleaner keeps the first one and fully delete the other ones.", global = true, project = true),\r
-    @Property(key = DbCleanerConstants.MONTHS_BEFORE_KEEPING_ONLY_ONE_SNAPSHOT_BY_MONTH,\r
-        defaultValue = DbCleanerConstants.ONE_YEAR, name = "Number of months before starting to keep only one snapshot by month",\r
-        description = "After this number of months, if there are several snapshots during the same month, "\r
-            + "the DbCleaner keeps the first one and fully delete the other ones.", global = true, project = true),\r
-    @Property(key = DbCleanerConstants.MONTHS_BEFORE_DELETING_ALL_SNAPSHOTS, defaultValue = DbCleanerConstants.FIVE_YEARS,\r
-        name = "Number of months before starting to delete all remaining snapshots",\r
-        description = "After this number of months, all snapshots are fully deleted.", global = true, project = true)})\r
-public final class DbCleanerPlugin implements Plugin {\r
-\r
-  @Override\r
-  public String toString() {\r
-    return DbCleanerConstants.PLUGIN_NAME;\r
-  }\r
-\r
-  public String getKey() {\r
-    return DbCleanerConstants.PLUGIN_KEY;\r
-  }\r
-\r
-  public String getName() {\r
-    return DbCleanerConstants.PLUGIN_NAME;\r
-  }\r
-\r
-  public String getDescription() {\r
-    return "The DbCleaner optimizes the Sonar DB performances by removing old and useless quality snapshots.";\r
-  }\r
-\r
-  public List getExtensions() {\r
-    return Arrays.asList(\r
-        // shared components\r
-        DefaultPeriodCleaner.class,\r
-\r
-        // purges\r
-        PurgeOrphanResources.class, PurgeEntities.class, PurgeRuleMeasures.class, PurgeUnprocessed.class,\r
-        PurgeDeletedResources.class, PurgeDeprecatedLast.class, UnflagLastDoublons.class, PurgeDisabledResources.class,\r
-        PurgeResourceRoles.class, PurgeEventOrphans.class, PurgePropertyOrphans.class, PeriodPurge.class, PurgeDependencies.class,\r
-\r
-        // post-job\r
-        PurgeRunner.class);\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.dbcleaner;
+
+import org.sonar.api.Plugin;
+import org.sonar.api.Properties;
+import org.sonar.api.Property;
+import org.sonar.plugins.dbcleaner.api.DbCleanerConstants;
+import org.sonar.plugins.dbcleaner.period.DefaultPeriodCleaner;
+import org.sonar.plugins.dbcleaner.period.PeriodPurge;
+import org.sonar.plugins.dbcleaner.purges.*;
+import org.sonar.plugins.dbcleaner.runner.PurgeRunner;
+
+import java.util.Arrays;
+import java.util.List;
+
+@Properties({
+    @Property(key = DbCleanerConstants.MONTHS_BEFORE_KEEPING_ONLY_ONE_SNAPSHOT_BY_WEEK,
+        defaultValue = DbCleanerConstants.ONE_MONTH, name = "Number of months before starting to keep only one snapshot by week",
+        description = "After this number of months, if there are several snapshots during the same week, "
+            + "the DbCleaner keeps the first one and fully delete the other ones.", global = true, project = true),
+    @Property(key = DbCleanerConstants.MONTHS_BEFORE_KEEPING_ONLY_ONE_SNAPSHOT_BY_MONTH,
+        defaultValue = DbCleanerConstants.ONE_YEAR, name = "Number of months before starting to keep only one snapshot by month",
+        description = "After this number of months, if there are several snapshots during the same month, "
+            + "the DbCleaner keeps the first one and fully delete the other ones.", global = true, project = true),
+    @Property(key = DbCleanerConstants.MONTHS_BEFORE_DELETING_ALL_SNAPSHOTS, defaultValue = DbCleanerConstants.FIVE_YEARS,
+        name = "Number of months before starting to delete all remaining snapshots",
+        description = "After this number of months, all snapshots are fully deleted.", global = true, project = true)})
+public final class DbCleanerPlugin implements Plugin {
+
+  @Override
+  public String toString() {
+    return DbCleanerConstants.PLUGIN_NAME;
+  }
+
+  public String getKey() {
+    return DbCleanerConstants.PLUGIN_KEY;
+  }
+
+  public String getName() {
+    return DbCleanerConstants.PLUGIN_NAME;
+  }
+
+  public String getDescription() {
+    return "The DbCleaner optimizes the Sonar DB performances by removing old and useless quality snapshots.";
+  }
+
+  public List getExtensions() {
+    return Arrays.asList(
+        // shared components
+        DefaultPeriodCleaner.class,
+
+        // purges
+        PurgeOrphanResources.class, PurgeEntities.class, PurgeRuleMeasures.class, PurgeUnprocessed.class,
+        PurgeDeletedResources.class, PurgeDeprecatedLast.class, UnflagLastDoublons.class, PurgeDisabledResources.class,
+        PurgeResourceRoles.class, PurgeEventOrphans.class, PurgePropertyOrphans.class, PeriodPurge.class, PurgeDependencies.class,
+
+        // post-job
+        PurgeRunner.class);
+  }
+}
index b7e1db082f5c4c6aa156618660fd6f977697ded5..72b968d1ed30445754cded33adab1ba7e623e2cb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fa2650130b78f50009841452f06ba3c8b5f905a6..22840378c4fdf5b4fb0a658e67c4e579da8124e8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d5177d3fa6c89a68091dd8b04cbec0a683177967..d671085e080c123ef34709ceee8b41548d8d1998 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index abaa9cb08ccc09f2521b4f713565b55a9337d701..aee2c76c9e70081a707ce8c0658633bcad190c2a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 229bcce88be8c2479e1e7239e77527ecdbd00dfb..c417befec6721761acef730245b5d46b13fd5d38 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c9c8f08099c7aed0d5f56c2c018937081db1357c..0cf4e7ee6c5746b37393c75a2e492490c1f55418 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 272d989e0347477eea5a2f068ff7963fe473db8d..86fb1a4322faf3a4e9b48b41ec9811e895305070 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 91889fba658541846cac89cae8db49156ecfea3b..426d4b18fdb79d4ff9667fed292123c79572d706 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index eaf3050cf82f8360c81e2efc1c6ee533da067997..c06d540299fabf6ac5ae35755b348f6c2977e3ee 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8700459a3d9d58764a570874611c118c7a654ab9..6946d44201aa834f1a4a87e1916894a1b815105c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 326636528d735b311a6f028aea3c74d9a8bdae04..722eec65338bd064aae92941a5b01f774c27d515 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a852c4d17b41e802d81a681826d8398cabd4408e..fd8d284dd03242ed02b2593736e6f8b47eb83f48 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e1061d6114b2e0168000ed0c46d9db88a83db673..909bb123c7db1a43625703bb4765c93452d3e009 100644 (file)
@@ -1,51 +1,51 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.dbcleaner.period;\r
-\r
-import org.sonar.api.batch.Event;\r
-import org.sonar.api.database.DatabaseSession;\r
-import org.sonar.api.database.model.Snapshot;\r
-\r
-import javax.persistence.Query;\r
-import java.util.List;\r
-\r
-final class SQLRequests {\r
-\r
-  private final DatabaseSession session;\r
-\r
-  SQLRequests(DatabaseSession session) {\r
-    this.session = session;\r
-  }\r
-\r
-  List<Snapshot> getProjectSnapshotsOrderedByCreatedAt(int oneProjectSnapshotId) {\r
-    Query query = session.createQuery("FROM " + Snapshot.class.getSimpleName()\r
-        + " sp1 WHERE sp1.resourceId  = (select sp2.resourceId FROM " + Snapshot.class.getSimpleName()\r
-        + " sp2 WHERE sp2.id = :id) and sp1.rootId= null and not exists (from " + Event.class.getSimpleName() + " e where e.snapshot=sp1) order by sp1.createdAt");\r
-    query.setParameter("id", oneProjectSnapshotId);\r
-    return query.getResultList();\r
-  }\r
-\r
-  List<Integer> getChildIds(Snapshot parentSnapshot) {\r
-    Query query = session.createQuery("select sp.id FROM " + Snapshot.class.getSimpleName()\r
-        + " sp WHERE sp.rootId  = :rootId or id = :rootId");\r
-    query.setParameter("rootId", parentSnapshot.getId());\r
-    return query.getResultList();\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.dbcleaner.period;
+
+import org.sonar.api.batch.Event;
+import org.sonar.api.database.DatabaseSession;
+import org.sonar.api.database.model.Snapshot;
+
+import javax.persistence.Query;
+import java.util.List;
+
+final class SQLRequests {
+
+  private final DatabaseSession session;
+
+  SQLRequests(DatabaseSession session) {
+    this.session = session;
+  }
+
+  List<Snapshot> getProjectSnapshotsOrderedByCreatedAt(int oneProjectSnapshotId) {
+    Query query = session.createQuery("FROM " + Snapshot.class.getSimpleName()
+        + " sp1 WHERE sp1.resourceId  = (select sp2.resourceId FROM " + Snapshot.class.getSimpleName()
+        + " sp2 WHERE sp2.id = :id) and sp1.rootId= null and not exists (from " + Event.class.getSimpleName() + " e where e.snapshot=sp1) order by sp1.createdAt");
+    query.setParameter("id", oneProjectSnapshotId);
+    return query.getResultList();
+  }
+
+  List<Integer> getChildIds(Snapshot parentSnapshot) {
+    Query query = session.createQuery("select sp.id FROM " + Snapshot.class.getSimpleName()
+        + " sp WHERE sp.rootId  = :rootId or id = :rootId");
+    query.setParameter("rootId", parentSnapshot.getId());
+    return query.getResultList();
+  }
+}
index d5db44285f46fb06cb624583edf3cc131d2e74d9..fd3402fa6d3810bc3864000eeb8c1680ce9b8d8a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4e4708fa564567445af6d6c74821352141f8f12a..f91e1da8c708d172449623189e52ff41133374f9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 07f9e81efe87a353de0f20b2269cffae5479a1c0..a05bd16bb02ffcaea982136166befee907500e4e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fb4d3782f03cb215fdd0ad4768ed75ff458e6d0f..fc84d52a2de92972a4eff8109c9bcb414d9a66e8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5ce0448833e501222c2c5784e406323ebb51edd5..4a0895fea0c7b9eef8c4b04aedc5d575022e7113 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cff889cc37a160d92bde2f8e76c10c72f39e25b7..a074cb9a6bbd2ccf61a07bd4d145ad46c7d433df 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 16b01253ae93d9594e71fcb95028c13db412cbd2..41ddd5e06d689254c2c0324b808394103067daba 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 680faa6633bc50c47eef702f34fee4644e5a4342..f3e6d62a8d13b19532dba6b43901b86077765e00 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 485a036bedd0d5ba6b50771bd0e70c649606a3d8..74dda00b9a7b88848f58bc37f388166f7cd3ae24 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 80f16aadb9bc149501381eec1a1557fe47fb5c20..63c2d9dcce859e991acbe43bdce687ceea480e10 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 52943fcbef9c75639d2069feba8a441005dc28e2..6b50aa8f8580190ffc66211f687d5f74a6fad092 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 579cadf275dfc80a55019ed19df9a13e000dc129..21b7b67bb26be10a2989d02d9b463394d43962c8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bb309655a587244f72296b5d06c9333bf6bd6846..5799850f8e8bfd0ef4b7754314cdc2854a347b67 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 91b711baa81e4adedd5087fa30200ccbd1db078e..ea49d64e485790088533a412074eebede7e25bda 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9548f8c853a8c818febc8596a565753b8325d5a0..3cfb209410da36be6fc03583f27c6ae3a78d9829 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index aa9dfcde266cb52cd9640e17211249d2ad07812f..a22dfc7ee56b5b4085713c4e5fbbabd6293c739d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 00327d4247c5bbe451441261fce2fd0d6f366da9..fd78c35bd0e5314ad5b9dc6f91e207ee5609d4f8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 08bb8604fc22919e9d3e84eaeb7f01603c81dec4..e61c9b49195035aea432440e1f7cb7050fb95721 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9b74178026825a59683b11ebaefaaa5c0499f874..0d561db86e2edccc71e127acd05bc6375cad183d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 61699405b628b63dc1b7d0c5802b343a17e4e2ee..048e2f99b8a9ef9641696051519a83797a8e0a56 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fe70628c2201d44e8a365b30ca00582a757927b7..6829d8cc95026f2abc0e869c14d11f5af908962b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 06defdc69ceb2c16fca5619dbda5d6e267971188..c93c26a264d3b150b57e5e4720cc5f007d4dfecb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c99edd9743f260ec6e4e4580445ccaa05aecb24e..6fb58c7a76f14472d54f86d8b91894dbe984309f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 99dcf520280747d197b35ee9ae63a2c0d8042494..2dea638ee3f9bd8a35937a796e2542a349444732 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 867d6f2a98459b36848c504877ef130a7f1976e2..4bde0b19c876c66e2309fa1aa7722f90827ed9e2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7983b474f5a6b53efc42490a8eca7ddbfe3f0f2c..3ce14d6d27b0b4b2e896d4a122d17e6785c5620e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 63712b04496a9bc42c8bd3ba94c1901a56c9eb94..3a4803614523f9e6691a1734543852792966494f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f83d85279578638a6a79a2a5c3fe89c368f27aef..8ff3d3d84c36de43385c6c479fa07f678cbab2b3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ab7e63eef83e351fb6cdc7bcde095686d4f05ba9..0caae612803dc72c779f7ec91007ae5233204eab 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7418ec6dcee74e816fbcb493df83d96a8d4c9d96..223b6facf0787f9ace30f23a072e8a11571886ce 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fcc9073156cd77a8ebc8d383adae4ae87fca2b17..87ba7fb9c8b4bac208834cb4220972c909defe99 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 373117d7829fc6d9a6eb8480cc0c36e54f9301c9..9489c7181dbd91aa85fda192ebf53176105d92f3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index af037daa59e163074c07634d056dea90f310119f..f25b612e7d61336123f9eacad6b82946130839f5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f1ca3db58afa3b39543dbe8d639560b84e1eef86..45fb2b69c518e82156dece0ff4ff262509855bd0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0848a69c5de6cdadc97b053b8bc08471d8d40a44..d82640c13831542e30113ad3424c94a55186b4de 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0be4e984e4cd6b99b00bc54fe6c2b804460dd7a5..e9204a462d950a0f361734fe835d8b6d811eb404 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 64c756228d94ca465177dea46812f9b3e472e057..c1a84d41e40bb1c800d5045e8828c5ce3b8266a5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ae4f6b24985f8b1928facc20e39132d58d3f1a80..b0485cc36ca7fee18f371affcf3dcf7e38ec9b4c 100644 (file)
@@ -1,6 +1,6 @@
 <!--
   ~ Sonar, open source software quality management tool.
-  ~ Copyright (C) 2009 SonarSource SA
+  ~ Copyright (C) 2008-2011 SonarSource
   ~ mailto:contact AT sonarsource DOT com
   ~
   ~ Sonar is free software; you can redistribute it and/or
index 4e53b22c276fe0b2648d9df5d703ba477f800179..61e0dfbce333469c65de4411491e7b4cf8d62789 100644 (file)
@@ -1,6 +1,6 @@
 <!--
   ~ Sonar, open source software quality management tool.
-  ~ Copyright (C) 2009 SonarSource SA
+  ~ Copyright (C) 2008-2011 SonarSource
   ~ mailto:contact AT sonarsource DOT com
   ~
   ~ Sonar is free software; you can redistribute it and/or
index 511551f4accb0b60ec68e8ec6de308e64ce0df13..97a76b074fd86a0268fee32f5d0a2a1df7f4aaa9 100644 (file)
@@ -1,6 +1,6 @@
 <!--
   ~ Sonar, open source software quality management tool.
-  ~ Copyright (C) 2009 SonarSource SA
+  ~ Copyright (C) 2008-2011 SonarSource
   ~ mailto:contact AT sonarsource DOT com
   ~
   ~ Sonar is free software; you can redistribute it and/or
index fdb70535b5948857e880316a8aa17c764c92d850..3b2c0464684ce75979f126e7666d4d3c768302de 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6ce0e006e5786713368db343a0da0380c3441e9e..c0846770857f289dda52fa00e44d35b859d94f7f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fa449e0887e05216c9f2ea1873e54ee856e54f7f..7b3ca9ee283f29e8de110bf38230587d62eebdbe 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3bb6f053dd23c689f0a5c269a302f9a8679d2661..eb00b801d4c01580b6b9bab940217b7b8271289a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fa4e440fbe54dcac92b53709a992ce816c030d3d..0b23d080e6b94630f0aee142e24e50cea2d5e22e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 103c0b95fc563350630a5ef867a9639546bb2008..9f8e874d8aa9c5c9af0af50b7afb45cd3f01de67 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 35370a02d2fd6021f1797ce19d7d107559e2852c..b627753b364caeb9e0a7039dc3eac95d70ac0bf9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 703bd6334ad6cd9faabcde6d89b6b156965de5d3..e99599066efe52fa53d67204b735b79e92934312 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f49bffdae1be02b5b3607fa149babe36bc9b48a7..80d718b1223171f64a9818c78993a81794f3422e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2d457de0347c378f043b947130f94af23e1da15a..2b9279c0fa6e741aa3d454f8a5917d4dd1206f71 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3e3541f05890d6d8e56a5f05f1a380fd46394bd5..7f91b413080e5af64e0447da12debcf62c4653ae 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9faa122e7e7f146c78c894d550cc4cf515941817..ce4ed84c755347362ab944c66e111d1357656ed9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8de67b00dc6c2de4e7178ef4467766209130839c..3be4f7037a51d644c683d74b61597fc745a68c6e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a90e4fbfde586aff552468b9536793b995e9fa74..cccb2304629a452d53a3d9291bb94c14f5f8ab82 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d4bee638d28679738ee79075c8bc2f7a5f70bef3..51eef44558a19c8ca264dffecfcd90c585b9cf17 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3f34d7400fe0cd5f6ec4c18f643f7bc026a38cc8..76ee31729f232b19657059c4e0c2809e11dca622 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ee7a2f4292b363313e04fff80879bb45110683ce..7fe67a1a0301835f9bbae7e6a57c60d8abbe5c4d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 32d54114a8d4e1e8e91bf334b57ce4247723eb34..cedea07194561ffc36738fb2e53b3d5ae1f9872d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 31f7888c04edd85f1e7d9441b4fe5b014cdd854c..6a76d5c681ef39e8b71fedf08af7229c5a1dae38 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 496fb44a6568336f0d104b55b5b4817e0fc06ac0..79eecaffdf1f871ef14e78bef0addd1afb3dedb4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d162a4340e31d9546f564dc6b2dfc252448b6915..fd83334458ee7c3f148a297dd65d554cb7c74662 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 54cb1deb2dc143f15c6d3c92aae0ed861b4826be..a25a07e4c6c9d127275fae4a39ebfc79ca5f517f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1e20f0c77b7d98ab46f3331150ff2efeeb17bdc4..75bb8126ace644138f3248be916abbb1d4b1b91b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6cae74bf78c19475bab99f263e44ee03aa450b3a..685b5ef21c01e27b839eb0323769c66ebdf1f7af 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cbd9e31a443be05903f6a721facfdec4db6cc162..22dd200c31af673650d49919b4fef80e8d39c85b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 72e263da58a4263dd9093bd2cf76129c3d25ace9..42db5030b059027afab91e91ca488cfa229906cd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a8be3dfd472819628d18ccfa48de187d732139b2..2ae8a283514e54e9ab61fadfbd83e9e79e7593d7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2b7dba5bd01bf03266f996a9ac9fa17c819a82da..6594f9dbf25bf06d6fd363015b4d5df7e9ccc04c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 42c362f268ebf73d2c3fdc97ef2f6c43ba38e73c..0466c38fc8d1ca252dac204e2ec441557f44b15a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 63423385f23877d7874fe9c17c585f582fe1816a..48dc7ac6ad2746dff96c255ba55efd30c55574c9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 90345b27db85dab7000cc3879b2f3bf3c37e9d36..ead27a5f51abefee7d6fb7ab71141674ae2ea53e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 06643cad19189d5b2009d2b4c00008299bb2bba2..74ba2db32395151ac074342b208dddedda5ed9ba 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6c9ba0d1346b2fd3c65f7d4caac927aeffcae5a7..9edd64ec741d31165964d5fe8419bb7c67efa9bb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8b42373ccad4f1de1c74a90faa75fa8aead6c6f8..2930778806e51f15a533556e8a310d526741822e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3ab99fbc62015acfe74b72cad44e307c6d6556e3..8c74a45b1bc4b0549e200e6afb3ca4b5c7bddd37 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 28636be31671a9f6f7c9fbd1b4750ac69f35b620..ab60ee41dd95eaf80d96d75a327b67ba418132b0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 161938c42a87c6bd6ad24347c7ad4c67518d9b66..5b2d12297c51c5b3c4fc9fd9e953944e126b2758 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 279f3114108daaaff97323bc2f0614459775951e..d6db5e209cc1efcaec930d6241423f0d28466854 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 05b220aa092a28a288be6d97c68993c61f0674a7..2898de20b90fd5a27e8e04687d1192445e98f4d0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 736043e17669c405538fcd9d6cd0e1090f585283..fc1491b9d56f2dd81bb62ba9abe1d8d7099ed08c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index feff4df74a537deed17b4182ba983a848b03cd50..26d531f16000ec246a5469d966bcb46443f2bfdb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 60237a995ef781547760f38a877a62a6f2785418..db6edd9f4a5f023a737a29d03692218d009380b0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2a369d3ff1ac4a0768c6ccc1f186c8ff64f5cdfa..29eb7551453195a1257fa52adf3a775700f572ec 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bb228713115f08abe8e16a776059a9c864afa42e..c7cc44d73c0304bc7add5af0d348ba48a1f96dff 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cef9c2ded00c67f20d48a19e9a87cfbd50463320..1d69b54b6f3e7ded641495447588d5532669fb1f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 45b6a5e34161634cc035436e90b7a7f149ff432c..287cd2125433fe6b36f2c0ed7d511a834dc739ad 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 38e516aae9d920aee1330cc0ececbcf9b271cf12..8d6a7d2fdb3dcb130ddd1599337c32e9a4a2ecac 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e9f2ffd357138b0929dfc9bf8314543061cd9b89..dba812519f372778a241c16bdce803ba6a8c2cdd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index de979170cd3686c0786a0750afe17857df68fc2d..f32956a465e737b855ab1c215dc182f5b9881b66 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.findbugs;\r
-\r
-import java.io.File;\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-import javax.xml.stream.XMLInputFactory;\r
-import javax.xml.stream.XMLStreamException;\r
-\r
-import org.codehaus.staxmate.SMInputFactory;\r
-import org.codehaus.staxmate.in.SMInputCursor;\r
-import org.sonar.api.utils.SonarException;\r
-import org.sonar.api.utils.XmlParserException;\r
-\r
-class FindbugsXmlReportParser {\r
-\r
-  private final File findbugsXmlReport;\r
-  private final String findbugsXmlReportPath;\r
-\r
-  public FindbugsXmlReportParser(File findbugsXmlReport) {\r
-    this.findbugsXmlReport = findbugsXmlReport;\r
-    findbugsXmlReportPath = findbugsXmlReport.getAbsolutePath();\r
-    if ( !findbugsXmlReport.exists()) {\r
-      throw new SonarException("The findbugs XML report can't be found at '" + findbugsXmlReportPath + "'");\r
-    }\r
-  }\r
-\r
-  public List<Violation> getViolations() {\r
-    List<Violation> violations = new ArrayList<Violation>();\r
-    try {\r
-      SMInputFactory inf = new SMInputFactory(XMLInputFactory.newInstance());\r
-      SMInputCursor cursor = inf.rootElementCursor(findbugsXmlReport).advance();\r
-      SMInputCursor bugInstanceCursor = cursor.childElementCursor("BugInstance").advance();\r
-      while (bugInstanceCursor.asEvent() != null) {\r
-        String type = bugInstanceCursor.getAttrValue("type");\r
-        String longMessage = "";\r
-        SMInputCursor bugInstanceChildCursor = bugInstanceCursor.childElementCursor().advance();\r
-        while (bugInstanceChildCursor.asEvent() != null) {\r
-          String nodeName = bugInstanceChildCursor.getLocalName();\r
-          if ("LongMessage".equals(nodeName)) {\r
-            longMessage = bugInstanceChildCursor.collectDescendantText();\r
-          } else if ("SourceLine".equals(nodeName)) {\r
-            Violation fbViolation = new Violation();\r
-            fbViolation.type = type;\r
-            fbViolation.longMessage = longMessage;\r
-            fbViolation.parseStart(bugInstanceChildCursor.getAttrValue("start"));\r
-            fbViolation.parseEnd(bugInstanceChildCursor.getAttrValue("end"));\r
-            fbViolation.className = bugInstanceChildCursor.getAttrValue("classname");\r
-            fbViolation.sourcePath = bugInstanceChildCursor.getAttrValue("sourcepath");\r
-            violations.add(fbViolation);\r
-          }\r
-          bugInstanceChildCursor.advance();\r
-        }\r
-        bugInstanceCursor.advance();\r
-      }\r
-      cursor.getStreamReader().closeCompletely();\r
-    } catch (XMLStreamException e) {\r
-      throw new XmlParserException("Unable to parse the Findbugs XML Report '" + findbugsXmlReportPath + "'", e);\r
-    }\r
-    return violations;\r
-  }\r
-\r
-  public static class Violation {\r
-\r
-    private String type;\r
-    private String longMessage;\r
-    private Integer start;\r
-    private Integer end;\r
-    protected String className;\r
-    protected String sourcePath;\r
-\r
-    public String getType() {\r
-      return type;\r
-    }\r
-\r
-    public void parseStart(String attrValue) {\r
-      try {\r
-        start = Integer.parseInt(attrValue);\r
-      } catch (NumberFormatException e) {\r
-        start = null;\r
-      }\r
-    }\r
-\r
-    public void parseEnd(String attrValue) {\r
-      try {\r
-        end = Integer.parseInt(attrValue);\r
-      } catch (NumberFormatException e) {\r
-        end = null;\r
-      }\r
-    }\r
-\r
-    public String getLongMessage() {\r
-      return longMessage;\r
-    }\r
-\r
-    public Integer getStart() {\r
-      return start;\r
-    }\r
-\r
-    public Integer getEnd() {\r
-      return end;\r
-    }\r
-\r
-    public String getClassName() {\r
-      return className;\r
-    }\r
-\r
-    public String getSourcePath() {\r
-      return sourcePath;\r
-    }\r
-\r
-    public String getSonarJavaFileKey() {\r
-      if (className.indexOf('$') > -1) {\r
-        return className.substring(0, className.indexOf('$'));\r
-      }\r
-      return className;\r
-    }\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.findbugs;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+
+import org.codehaus.staxmate.SMInputFactory;
+import org.codehaus.staxmate.in.SMInputCursor;
+import org.sonar.api.utils.SonarException;
+import org.sonar.api.utils.XmlParserException;
+
+class FindbugsXmlReportParser {
+
+  private final File findbugsXmlReport;
+  private final String findbugsXmlReportPath;
+
+  public FindbugsXmlReportParser(File findbugsXmlReport) {
+    this.findbugsXmlReport = findbugsXmlReport;
+    findbugsXmlReportPath = findbugsXmlReport.getAbsolutePath();
+    if ( !findbugsXmlReport.exists()) {
+      throw new SonarException("The findbugs XML report can't be found at '" + findbugsXmlReportPath + "'");
+    }
+  }
+
+  public List<Violation> getViolations() {
+    List<Violation> violations = new ArrayList<Violation>();
+    try {
+      SMInputFactory inf = new SMInputFactory(XMLInputFactory.newInstance());
+      SMInputCursor cursor = inf.rootElementCursor(findbugsXmlReport).advance();
+      SMInputCursor bugInstanceCursor = cursor.childElementCursor("BugInstance").advance();
+      while (bugInstanceCursor.asEvent() != null) {
+        String type = bugInstanceCursor.getAttrValue("type");
+        String longMessage = "";
+        SMInputCursor bugInstanceChildCursor = bugInstanceCursor.childElementCursor().advance();
+        while (bugInstanceChildCursor.asEvent() != null) {
+          String nodeName = bugInstanceChildCursor.getLocalName();
+          if ("LongMessage".equals(nodeName)) {
+            longMessage = bugInstanceChildCursor.collectDescendantText();
+          } else if ("SourceLine".equals(nodeName)) {
+            Violation fbViolation = new Violation();
+            fbViolation.type = type;
+            fbViolation.longMessage = longMessage;
+            fbViolation.parseStart(bugInstanceChildCursor.getAttrValue("start"));
+            fbViolation.parseEnd(bugInstanceChildCursor.getAttrValue("end"));
+            fbViolation.className = bugInstanceChildCursor.getAttrValue("classname");
+            fbViolation.sourcePath = bugInstanceChildCursor.getAttrValue("sourcepath");
+            violations.add(fbViolation);
+          }
+          bugInstanceChildCursor.advance();
+        }
+        bugInstanceCursor.advance();
+      }
+      cursor.getStreamReader().closeCompletely();
+    } catch (XMLStreamException e) {
+      throw new XmlParserException("Unable to parse the Findbugs XML Report '" + findbugsXmlReportPath + "'", e);
+    }
+    return violations;
+  }
+
+  public static class Violation {
+
+    private String type;
+    private String longMessage;
+    private Integer start;
+    private Integer end;
+    protected String className;
+    protected String sourcePath;
+
+    public String getType() {
+      return type;
+    }
+
+    public void parseStart(String attrValue) {
+      try {
+        start = Integer.parseInt(attrValue);
+      } catch (NumberFormatException e) {
+        start = null;
+      }
+    }
+
+    public void parseEnd(String attrValue) {
+      try {
+        end = Integer.parseInt(attrValue);
+      } catch (NumberFormatException e) {
+        end = null;
+      }
+    }
+
+    public String getLongMessage() {
+      return longMessage;
+    }
+
+    public Integer getStart() {
+      return start;
+    }
+
+    public Integer getEnd() {
+      return end;
+    }
+
+    public String getClassName() {
+      return className;
+    }
+
+    public String getSourcePath() {
+      return sourcePath;
+    }
+
+    public String getSonarJavaFileKey() {
+      if (className.indexOf('$') > -1) {
+        return className.substring(0, className.indexOf('$'));
+      }
+      return className;
+    }
+  }
+
+}
index e7b70e12dc166fc90d989ad30be6815f7ded86af..31e959a41e35d8866771a36cd8d7558eb32b28c9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ebc836d8b1fdabf99c46200cb7f97ee2e9b4d664..99c03c92256864c6aea60d5ce2d91425932d6392 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e8b307692c2d4bded5d4dd7ebdef55aef89b8f75..9b2d7fbe39626682bee59a57fb10d75f54f6c200 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 384c90c9a398558199b9f929ab67e3a566011415..dcf814e9bdd36e2107062d114c512792b2e187f4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a9cbc70a742ce9599d5e014df39bfc9c0afa1cda..f32a9833719520562ebaa081ae9675b82cf19bc3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index af26485cbd7c0aaf47117654ec8000020840e056..3e400688d379b1599393e53899174d84781fc64e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e8fb48778ee992665b96e63b671dfafc5889264b..6db62a6ab84f0cdbf27be9246f3305acdb4bf587 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 78d353b6653b810e7cdf6c240c8685ba7d0c573c..c492e00af1d96fff6db1bffee2a23703b86102d9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1fcdc24cbdf315ff84cf70a1d353855fcdb55d9f..46f25dade69e5efb2bf0a29b0538f341a0b4d1d3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 858528fadd777ea40651d7a1f4e4060e66ce59cc..d422182326863937b7c5e744f889d1cf77ee0fc2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6541bf3207cfc9bbf3b628130cd5bd3ce6148dcc..7d1e77b2e563de6558e19b3e4b234ea0c7235460 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6ae98f1ea5db59742d3739418f7595570e438483..d73fdeba831be69780bcbb88938cdf8b78a7e1ef 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d3625f052a4b5a4bf8d880c66e6b51f570cdf42c..68ef215d40e073afae8432c092a15dd99b5d4d51 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e31d0d0a46255a0758af3d0e1bccbff97383331a..ef4b16df8d03453321802917f636069e9201770d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8e488266754390692b5914269c249780133cfb11..812f5180b8eb5331f562af1cfe955a92b06742dc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 52b7c24678199ca04c2808de7faab62af8587cf4..ab75288b390f9e0215399eadbf8b0da9bbb35c60 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 206ccdfc07dc923049c977d13855324e48e2428e..5597ba3d89865a0e213fe2a74127106930d3fe1c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 87c499354bc4d67749e3c68da04252df01bca880..1a5059f2bd58dad35950836a0a426f33df41ad38 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d436502634ab109d88478c0fc8fcff50f5a8803a..149ec5daeafc0c35353deefd5b28cd8c04f93fa9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4312ec6b49db3efefbc29202abf6c0566cd9c2cf..900032273b2ab21c5746094d99370c2d36e35f6f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d9d86eb9587615a216ff390c39ca4ed18e026acc..5fc61429e292d921e5bb58404f5a7511f94aff63 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 35511b8cd3f9345d0ab0999dd166107263ebe793..576e3b0b69c70bad2261ec1b3790aba7f3189662 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a21e3ccaeccbfb0045d23c601a8ab66b38bf07c7..1a580d03c38aa9d7773f55d5d7034fd668c42a47 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 79fa7cd1c736f07c21efd8cc9a579f65ba7f55e2..2f667a7fb91348b22e9da3c36687f4cb0128d25f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a2059a70fb72b5427e8f0f6b3cc855aecc96b9bb..7d90741a6f9e0f6c902b0489ede2f69cb0711991 100644 (file)
@@ -1,63 +1,63 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.googleanalytics;\r
-\r
-import org.apache.commons.configuration.Configuration;\r
-import org.sonar.api.CoreProperties;\r
-import org.sonar.api.web.Footer;\r
-\r
-public class GoogleAnalyticsWebFooter implements Footer {\r
-\r
-  private Configuration configuration;\r
-\r
-  public GoogleAnalyticsWebFooter(Configuration configuration) {\r
-    this.configuration = configuration;\r
-  }\r
-\r
-  protected String getIdAccount() {\r
-    return configuration.getString(CoreProperties.GOOGLE_ANALYTICS_ACCOUNT_PROPERTY, "");\r
-  }\r
-\r
-  public String getKey() {\r
-    return "webfooter_" + CoreProperties.GOOGLE_ANALYTICS_PLUGIN;\r
-  }\r
-\r
-  public String getHtml() {\r
-    String id = getIdAccount();\r
-    if (id != null && !"".equals(id)) {\r
-      return "<script type=\"text/javascript\">\n" +\r
-          "var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");\n" +\r
-          "document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));\n" +\r
-          "</script>\n" +\r
-          "<script type=\"text/javascript\">\n" +\r
-          "var pageTracker = _gat._getTracker(\"" + id + "\");\n" +\r
-          "pageTracker._initData();\n" +\r
-          "pageTracker._trackPageview();\n" +\r
-          "</script>";\r
-    }\r
-    return null;\r
-  }\r
-\r
-  @Override\r
-  public String toString() {\r
-    return getKey();\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.googleanalytics;
+
+import org.apache.commons.configuration.Configuration;
+import org.sonar.api.CoreProperties;
+import org.sonar.api.web.Footer;
+
+public class GoogleAnalyticsWebFooter implements Footer {
+
+  private Configuration configuration;
+
+  public GoogleAnalyticsWebFooter(Configuration configuration) {
+    this.configuration = configuration;
+  }
+
+  protected String getIdAccount() {
+    return configuration.getString(CoreProperties.GOOGLE_ANALYTICS_ACCOUNT_PROPERTY, "");
+  }
+
+  public String getKey() {
+    return "webfooter_" + CoreProperties.GOOGLE_ANALYTICS_PLUGIN;
+  }
+
+  public String getHtml() {
+    String id = getIdAccount();
+    if (id != null && !"".equals(id)) {
+      return "<script type=\"text/javascript\">\n" +
+          "var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");\n" +
+          "document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));\n" +
+          "</script>\n" +
+          "<script type=\"text/javascript\">\n" +
+          "var pageTracker = _gat._getTracker(\"" + id + "\");\n" +
+          "pageTracker._initData();\n" +
+          "pageTracker._trackPageview();\n" +
+          "</script>";
+    }
+    return null;
+  }
+
+  @Override
+  public String toString() {
+    return getKey();
+  }
+
+}
index 4bace7566ea8dfadb3d342eb0d1059a9f7281634..36c583a0c0984e43d1ab7aa51ffb7782f27c2754 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 682d706a0397afafd728f34fbedb994e9390120b..cf6c72c3f35680e4e87d78bb36c79c2351102c4f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5c613c42448f15f29e1b59b01ec578d495db15c0..64b0005b9ccbd4002ab8244fed96ffc6d64eb527 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f0429b16aed4d02c08794e42c48f35a2b5e2374a..e4018c209603d0d07f8e38ede783da6036d51a1e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f745333dd4523bbfba1531d59cf2661a728026dc..3db3b2687cc88b13fdfec4b6235b28fd2c598f11 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dd72f846a1c35c0f91abf21a07f686e312b31c02..a7024f01eb84986e94ee34a98f2ccd7f18a8da3c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bd25d94c34e9a959ed4b6313a19536f93a0d4134..1c87b66ac6e3239407d4e3cc32c17c3db8a74643 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 04fe1fdfe7699b9d12b60810729f09049c3ac043..d6e26a97135a7f1863081b9ef1d01460789fb5f2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 91d14497bbe2e3daf0dd528b2235632f9d10da33..6228fd8af62c7640ce009a31ffa1dff50a99f4d1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d0fbfefc60b6423f3e6aaff080437209a60be742..d08b484163eea1937d711186a37dded0505b28a8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 60803a680ccf04774ce42daabf2c58441d60fd89..37cbc4f7801a0a69cd75a719f82ef1cce0c3145b 100644 (file)
@@ -1,78 +1,78 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.pmd;\r
-\r
-import org.apache.commons.lang.StringUtils;\r
-import org.codehaus.staxmate.in.SMInputCursor;\r
-import org.sonar.api.CoreProperties;\r
-import org.sonar.api.batch.AbstractViolationsStaxParser;\r
-import org.sonar.api.batch.SensorContext;\r
-import org.sonar.api.profiles.RulesProfile;\r
-import org.sonar.api.resources.JavaFile;\r
-import org.sonar.api.resources.Project;\r
-import org.sonar.api.resources.Resource;\r
-import org.sonar.api.rules.RulesManager;\r
-\r
-import javax.xml.stream.XMLStreamException;\r
-\r
-class PmdViolationsXmlParser extends AbstractViolationsStaxParser {\r
-\r
-  private Project project;\r
-\r
-  PmdViolationsXmlParser(Project project, SensorContext context, RulesManager rulesManager, RulesProfile profile) {\r
-    super(context, rulesManager, profile);\r
-    this.project = project;\r
-  }\r
-\r
-  @Override\r
-  protected String keyForPlugin() {\r
-    return CoreProperties.PMD_PLUGIN;\r
-  }\r
-\r
-  @Override\r
-  protected SMInputCursor cursorForResources(SMInputCursor rootCursor) throws XMLStreamException {\r
-    return rootCursor.descendantElementCursor("file");\r
-  }\r
-\r
-  @Override\r
-  protected SMInputCursor cursorForViolations(SMInputCursor resourcesCursor) throws XMLStreamException {\r
-    return resourcesCursor.descendantElementCursor("violation");\r
-  }\r
-\r
-  @Override\r
-  protected String lineNumberForViolation(SMInputCursor violationCursor) throws XMLStreamException {\r
-    return violationCursor.getAttrValue("beginline");\r
-  }\r
-\r
-  @Override\r
-  protected String messageFor(SMInputCursor violationCursor) throws XMLStreamException {\r
-    return StringUtils.trim(violationCursor.collectDescendantText());\r
-  }\r
-\r
-  @Override\r
-  protected String ruleKey(SMInputCursor violationCursor) throws XMLStreamException {\r
-    return violationCursor.getAttrValue("rule");\r
-  }\r
-\r
-  @Override\r
-  protected Resource toResource(SMInputCursor resourcesCursor) throws XMLStreamException {\r
-    return JavaFile.fromAbsolutePath(resourcesCursor.getAttrValue("name"), project.getFileSystem().getSourceDirs(), false);\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.pmd;
+
+import org.apache.commons.lang.StringUtils;
+import org.codehaus.staxmate.in.SMInputCursor;
+import org.sonar.api.CoreProperties;
+import org.sonar.api.batch.AbstractViolationsStaxParser;
+import org.sonar.api.batch.SensorContext;
+import org.sonar.api.profiles.RulesProfile;
+import org.sonar.api.resources.JavaFile;
+import org.sonar.api.resources.Project;
+import org.sonar.api.resources.Resource;
+import org.sonar.api.rules.RulesManager;
+
+import javax.xml.stream.XMLStreamException;
+
+class PmdViolationsXmlParser extends AbstractViolationsStaxParser {
+
+  private Project project;
+
+  PmdViolationsXmlParser(Project project, SensorContext context, RulesManager rulesManager, RulesProfile profile) {
+    super(context, rulesManager, profile);
+    this.project = project;
+  }
+
+  @Override
+  protected String keyForPlugin() {
+    return CoreProperties.PMD_PLUGIN;
+  }
+
+  @Override
+  protected SMInputCursor cursorForResources(SMInputCursor rootCursor) throws XMLStreamException {
+    return rootCursor.descendantElementCursor("file");
+  }
+
+  @Override
+  protected SMInputCursor cursorForViolations(SMInputCursor resourcesCursor) throws XMLStreamException {
+    return resourcesCursor.descendantElementCursor("violation");
+  }
+
+  @Override
+  protected String lineNumberForViolation(SMInputCursor violationCursor) throws XMLStreamException {
+    return violationCursor.getAttrValue("beginline");
+  }
+
+  @Override
+  protected String messageFor(SMInputCursor violationCursor) throws XMLStreamException {
+    return StringUtils.trim(violationCursor.collectDescendantText());
+  }
+
+  @Override
+  protected String ruleKey(SMInputCursor violationCursor) throws XMLStreamException {
+    return violationCursor.getAttrValue("rule");
+  }
+
+  @Override
+  protected Resource toResource(SMInputCursor resourcesCursor) throws XMLStreamException {
+    return JavaFile.fromAbsolutePath(resourcesCursor.getAttrValue("name"), project.getFileSystem().getSourceDirs(), false);
+  }
+}
index fab6bf05f219d145b6a08aba165a5ab2dbd0a766..2a4b27ac788af9c0fba6a45bc0771e83291ee701 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f75d86f81c65f72a966c21197beb0eccdf9e0e9f..260484fd538bc7e773bac83d628527ed4cb8efe5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 46d4dffb5151dab554e22a86c7b554d8a8a0ef28..a65d4cc3ea6ad41e61c5965568fcfdee51a40ccc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a7d502979b313a29b99ff325d42db891a9a33409..1ad06e0ca12ffb4bf0a2e020d3f0b58b93ea342e 100644 (file)
@@ -1,58 +1,58 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.pmd.xml;\r
-\r
-public class PmdProperty {\r
-\r
-  private String name;\r
-\r
-  private String value;\r
-  \r
-  private String cdataValue;\r
-\r
-  public PmdProperty(String name, String value) {\r
-    this.name = name;\r
-    this.value = value;\r
-  }\r
-\r
-  public String getName() {\r
-    return name;\r
-  }\r
-\r
-  public String getValue() {\r
-    return value;\r
-  }\r
-  \r
-  public String getCdataValue() {\r
-    return cdataValue;\r
-  }\r
-  \r
-  public boolean isCdataValue(){\r
-    return cdataValue != null;\r
-  }\r
-\r
-  public void setValue(String value) {\r
-    this.value = value;\r
-  }\r
-  \r
-  public void setCdataValue(String cdataValue) {\r
-    this.cdataValue = cdataValue;\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.pmd.xml;
+
+public class PmdProperty {
+
+  private String name;
+
+  private String value;
+  
+  private String cdataValue;
+
+  public PmdProperty(String name, String value) {
+    this.name = name;
+    this.value = value;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public String getValue() {
+    return value;
+  }
+  
+  public String getCdataValue() {
+    return cdataValue;
+  }
+  
+  public boolean isCdataValue(){
+    return cdataValue != null;
+  }
+
+  public void setValue(String value) {
+    this.value = value;
+  }
+  
+  public void setCdataValue(String cdataValue) {
+    this.cdataValue = cdataValue;
+  }
+}
index 87305df110f325ea6b0508d4627f6cdde8dc61e0..7cc292162ce31935908502e1abc5fbbd5a627951 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.pmd.xml;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-public class PmdRule implements Comparable<String> {\r
-\r
-  private String ref;\r
-\r
-  private String priority;\r
-\r
-  private String name;\r
-\r
-  private String message;\r
-\r
-  private List<PmdProperty> properties = new ArrayList<PmdProperty>();\r
-\r
-  private String clazz;// NOSONAR unused private field\r
-\r
-  public PmdRule(String ref) {\r
-    this(ref, null);\r
-  }\r
-\r
-  public PmdRule(String ref, String priority) {\r
-    this.ref = ref;\r
-    this.priority = priority;\r
-  }\r
-\r
-  public String getRef() {\r
-    return ref;\r
-  }\r
-\r
-  public void setProperties(List<PmdProperty> properties) {\r
-    this.properties = properties;\r
-  }\r
-\r
-  public List<PmdProperty> getProperties() {\r
-    return properties;\r
-  }\r
-\r
-  public PmdProperty getProperty(String propertyName) {\r
-    for (PmdProperty prop : properties) {\r
-      if (propertyName.equals(prop.getName())) {\r
-        return prop;\r
-      }\r
-    }\r
-    return null;\r
-  }\r
-\r
-  public int compareTo(String o) {\r
-    return o.compareTo(ref);\r
-  }\r
-\r
-  public String getPriority() {\r
-    return priority;\r
-  }\r
-\r
-  public void setPriority(String priority) {\r
-    this.priority = priority;\r
-  }\r
-\r
-  public void addProperty(PmdProperty property) {\r
-    if (properties == null) {\r
-      properties = new ArrayList<PmdProperty>();\r
-    }\r
-    properties.add(property);\r
-  }\r
-\r
-  public void setName(String name) {\r
-    this.name = name;\r
-  }\r
-\r
-  public void setMessage(String message) {\r
-    this.message = message;\r
-  }\r
-\r
-  public String getMessage() {\r
-    return message;\r
-  }\r
-\r
-  public String getClazz() {\r
-    return clazz;\r
-  }\r
-\r
-  public void setRef(String ref) {\r
-    this.ref = ref;\r
-  }\r
-\r
-  public void removeProperty(String propertyName) {\r
-    PmdProperty prop = getProperty(propertyName);\r
-    properties.remove(prop);\r
-  }\r
-\r
-  public void setClazz(String clazz) {\r
-    this.clazz = clazz;\r
-  }\r
-\r
-  public String getName() {\r
-    return name;\r
-  }\r
-\r
-  public boolean hasProperties() {\r
-    return properties != null && !properties.isEmpty();\r
-  }\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.pmd.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class PmdRule implements Comparable<String> {
+
+  private String ref;
+
+  private String priority;
+
+  private String name;
+
+  private String message;
+
+  private List<PmdProperty> properties = new ArrayList<PmdProperty>();
+
+  private String clazz;// NOSONAR unused private field
+
+  public PmdRule(String ref) {
+    this(ref, null);
+  }
+
+  public PmdRule(String ref, String priority) {
+    this.ref = ref;
+    this.priority = priority;
+  }
+
+  public String getRef() {
+    return ref;
+  }
+
+  public void setProperties(List<PmdProperty> properties) {
+    this.properties = properties;
+  }
+
+  public List<PmdProperty> getProperties() {
+    return properties;
+  }
+
+  public PmdProperty getProperty(String propertyName) {
+    for (PmdProperty prop : properties) {
+      if (propertyName.equals(prop.getName())) {
+        return prop;
+      }
+    }
+    return null;
+  }
+
+  public int compareTo(String o) {
+    return o.compareTo(ref);
+  }
+
+  public String getPriority() {
+    return priority;
+  }
+
+  public void setPriority(String priority) {
+    this.priority = priority;
+  }
+
+  public void addProperty(PmdProperty property) {
+    if (properties == null) {
+      properties = new ArrayList<PmdProperty>();
+    }
+    properties.add(property);
+  }
+
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  public void setMessage(String message) {
+    this.message = message;
+  }
+
+  public String getMessage() {
+    return message;
+  }
+
+  public String getClazz() {
+    return clazz;
+  }
+
+  public void setRef(String ref) {
+    this.ref = ref;
+  }
+
+  public void removeProperty(String propertyName) {
+    PmdProperty prop = getProperty(propertyName);
+    properties.remove(prop);
+  }
+
+  public void setClazz(String clazz) {
+    this.clazz = clazz;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public boolean hasProperties() {
+    return properties != null && !properties.isEmpty();
+  }
 }
\ No newline at end of file
index 9df698a6a95d11bdee2ff37d101483980c92b9ae..19ecf31491159511e9d4fac508ca3eedd9cc10a7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4a5498e8d3ad78472881cb8ac31649947558d8ec..ed34c3940ae6d8c42fa7842623799b6f32af41fc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 07e9fb3a677d7d2c9e540d99e729d2a8d6d00584..5cd3989546a9a356ed8a810fe553071935e34662 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 031c88ad0f23be616fd8b3ec0ef93548a1ebe9ec..3fc3a2dfcce9c4ed9ed15b3c6d40778d3b2c7324 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5a73f5014489190545dd694f5ec65c1c2abc3565..3d9518efc2a6cb2d009e5bbe1d55dd2f39c487ab 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d726c28564e2db9de54b717bb16039c1382fd589..b8c0a2433d881539e568448a5518f561b7eddff2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f95bedc1c758f1c6a3288f55d130a1718e3d5df1..8ae7a3a9e8a7526ac8a62b1c3f64f1ed2ae33a0d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fdfea3f98ba1ad88456ccc8baec516e659b963cb..98e9a9a27fc0894a6d9e9afe32341f77b298daa8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ba5abe42307c81c0354587182a8a38ee65314a56..136acadc5db2ca6c75221726787ffabf2a9f5cd2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9e0ab0018f3f6289f64f376ee0c48bd3f78d0b6f..7ad207eba01ef9c3eee13d4043584180870c2c41 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b55a44b773fab02b26decc0ad66c1954dd7f9067..d877db554f3faa784e8deb982fb965ba42bb4d48 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bf4313997a7651bc62917cd91ad718e9dbce12c1..fa0041d176f3b450d7b5fb0f5210109256354e9b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a63ddea630c0a5accd7a284f72016530c991ce66..a96fe8b47a02b476171d77863d5d5d0c10831755 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4371668df72d26c4c99e3674451409e8ab103698..3607ab3fe82fb3bfac938d57885665b5576e454e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5a5094dae574dac97868ba8d2d676981bad8ed3c..ae908db4c67d7955e9df94ae9338b8c0835a7458 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dc3cd9a9b9ff6d55173591df446b4f5ad8469c05..73f853bebe3e6655b4ec432ee50d85867f539381 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6249ada3a9584b088ac9ae2c9e8c4ac857af3f99..773eef025f6fe56eb77c0cdf607f2621de19770e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6607c8eacf0d127d311e252f462ba723eb04e390..19916649f14e4b45fe4a30bcac892071ca91810a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 845a222cf06ddb5710e4c706dfc9febc57dd803d..c87626b8b1999141732e31d52c9c2bb24b370075 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0ce97322816530ccdae6026dd7cf4f0880e8bfca..241a11c69a55006154c5af9cabb2f3a62101ed29 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fa1e84275471de0ca28dd5287349fc785ba0b287..51e09d45883483dce77f55066cbfc3bd8bccd3be 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c4d7dfc98e100c0aa9d637bb91e20668e1a55d3f..b34b8856a01631d82ab34f55f4c4666ebd7afd77 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index be20ffb2d88077b5d991ff22e295b313b1406fad..6d9c735817cf98d6b746da8c695ae9bfa0d53f5c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f1d7030b8bdac51d4f91331445c0c639ebdd4b80..f07764467b17b87b1bbe2dbd2ea009e67850ecf3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4995f90c4b00b8767714eebb02eb844ce3476a9e..722e5809933b99f9e0ff5b4096114fa5ca66c3a7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 01b0ca1b9ba3291ba493f3395cbc6e9bd9dd2137..a5184ea34d9165dee78aad550545609dd140a9a7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index da1411f78ee10dfe108cef00b42d23205dc279ae..07b9e0b9c181401676394b191ff9c9703b3f9acd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 931d43e5288b1dbd5a990e0f7035777dc39825c0..0b979831e562d8b30d1494fac309ef4ae26413d9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6f7bffd6a819d78beeb5a292b6e1d60bda66e4f7..935a4f817e7196eae5ce548e5448d31312910b3d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ebd20587f7b0616560cd10269e400b04eb59b8bd..c0c4c635c5043dcc213271efe7bbe34ad93ebbe7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0a891c9521097e1fd86098742eaeebb7555a7847..9c53b6d454a87f31d38bc94a7e14bffee400a624 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d43f678fe7b45c2f86b8dac2802b97b786fee3cc..b9f95bd0f008b3525da606b14a1fcae46f167125 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e1e08dcccaba0b3bd34cebe20ca7217321daed46..20baa6befc743bb5a50a02e9d6b5fbc69774843c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fdf4a14b7aa4329ce527bbd79a9e81e63c26d4c8..a0ba7e71430d2a8d262ffd3c68239a205109a8b0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9db70862ddd1f0bb252279fa5b84737ca618573c..bd4fefc413314f2989c5c26a988636392e58a56e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6bf3b55ba960446029310df7096ffc1baa058508..e75e57226b27383cd7ed0b78f9fb1993075cfd57 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f35441b34a1f9061ba86148efdd3d4e58396b665..b36f9d3f6fa9e16987ada55bfcbd41c0f2ee8970 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fde4fddf9b66064e0525b47a377453b01487a8c1..908b9fbfe3fc3a4d79a68b8d36c7adced6cab5a8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0b274fb40c95cf07082e6af60df0e72bbe127325..75c7c56c0a42c24e6dcbe26ce5a7d4f11d9f8dbc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d92924122d6cd992a0294b34e3a8eaf1aed8167e..4cc10aedce17498b9174c6101fa7c5ef30930d75 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3f40eede2bdc44215158bebccd94007899e4d33d..b132ef7eb8d746030c2fb8bd21dd74c423b15997 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3458b35f81e4316c24989e1d89b734cbd71b13a0..481395d42b34b3161e9ed0d007aabeabfff6f396 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e5793a23d3618f80ccc39e51a7e5f981211c6090..b61137b34280a47e0f94a139192a583a41ad57e3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c3679949744e8589e4e8097dca7927a3c7687cf9..9969d9d46974b0bdbbc299af03daaccf64813f4a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4805ec4c40e731ee3414a91a0677383fdd158fab..3ae1bade06f508a35a31cb140bcf402a74cae9f8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 675bd1393c357eb259f9724c0a1f6258f4577e60..e05878c42de2f3777c6d12fb89c60b81a2d256e8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 21ec77371badb8cff7df5f42ef7dc68ddaec8c52..d0e46a0458ebcd9a7c74247a68154dd73b967904 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4a9bed4ed22bc14ebc9793851d2a991a50db56fd..f3d17025ccd4fda5231cc54431519adb3c634f34 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c2581b0ae7e086fc2903d7ac6946d68c7c724500..dbb29d6557f3872b57ec23e52787ea086e26d0e8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5918af867a22cb5dfb123c7c615445f550487d35..852e8a8c32a6a0c517673d2a3a3b4e05e0aafe65 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 08e775c61ab567dc256b2dacc857f5276a1621f2..5d58c51deb752cf9c95a7a9123dcadeb49a6a609 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 62340fb2bdd34a788282deea7e7151fa66908162..4566c7e6724314235809b32685664f43c8336727 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index af8ad8e0a9430d30e3a934656a4d2c01e1494dad..35a8fd81c362572502d2d5958cd2702b64123302 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e079530a6d25db5e4b7a7a4c0c6aef2dbf8600ea..cbff543391e46777437f33a2c4130ee639c575da 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 87a1c883579fbea2f2a177f905ff1b4108d109ed..b272f1ef58b38d6353835c656653e16a7bb6cf46 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2fc463a1632be0e2d4d37a5dde36184a701ccdc4..ad24cf3e903aa4adbab298e0f8c90d42fb0789fa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0565ad574952912a2fc1c6bbcd282ef9a898b7af..9dc17a1b4f99b16a72102c58db927e0140c31d8b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b77b47b6ac1a32417df3191d00d93c430b9e3591..81d125ded124a8a8f2e642000d9656c195c4622e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 63c498df775d554d609811fa22030311b8769d4d..f91fb6da9d7561ac6158c2873149950a6cd5f31d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5c82048f70e0b4856653f057b4a68ce18d38b46d..ea933b15184914ffa76688a6f42ad62cf7a22769 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f5fa286c0b7920dc49655851b156feea97369910..46b52d1b0239a9a8962fa2b3a0dc8bc665f8ad66 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0123195179c465c387a9d0069cdb37006d72402b..9240ccbff987a536c2a7f958bfbcbd2251380386 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 90cab18684470f3bf48cf21caff5ceb35b1ca6e9..e906aaba38695a97e1bad2bc7864b8e728bfce96 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d5668e072e079711917147b95f7bfc3e4a4fe64e..e2ab1d72e4f46034c993aeaeeca2fd7f88a35a19 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 17dd16fca68a95d311d813f633e6367d11b958a1..e74fb2ea9c6698ab252163b3aca9a1827c8cbf85 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 434a1b76b608fccf874bd17c2cc20e917e37abbc..65c6c13a50a8ff95da997db635cdb2666c4410f0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 228ce0226ebfb7cf39cbe7e9514522a6936e090f..ea51f1b5bc37c03586eaeb5434017827fa072a9b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 998ff4a4dc98bffb122f93ac48d2384f83bb9f01..5990b6d91482c1e2281339831b278bd763a01f70 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 975788aa35da8c0cdbdad8ffbad6898f0faa71f7..2617d557b5da572622254f5a16d0dbab202385bf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 78517bd6c54e92f4b7080f40aedd3799b7251c81..164f34722fa482057c9a36311d5f819a0052c06e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 236bd6b61ccc4802e51d2521f8c1e69c247ce2f7..da1a8b0b9672beb1668f76c2098cd9d6a4e15ea0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0aabea3f3486e717218355003d257c8bcfe279d2..ad8ae7854db4bc10b3d7db7942c50d2d1df66a40 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2714a2f88ae57297ab4f64dc9e5951fa237318a8..b74a2e20c937724183212d5178ad681c5142b233 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f5bb4e76bfff9395d622b32e470c96989ae8c919..8bb5809b407ea67176d9dfdc7aae10d3830e8b83 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8763b9bd46437fed3f38866bcbd054c74e60d06c..b1087c8a82df07c6606c3c3eac3b374732605cea 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 817d496247799ba50e0819a508ed598db5b821ea..e1e72bf4f90ecf32aea264d749e52a3579fe673e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 519d4fcd0411da164fe433065971fb038fef1654..808099dd817854654470fe6d69deb05a7ee933e2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 550b1f956eb3b9cbe6fc0b4e72b21573f31f68e2..f0dfe16a1aa78fcb1d9dedd67cb916aeda8bf95e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f48f6f1d69200a6d667d8b33c614fa28d7a2543c..faa95c72a7aed3ff5fe2314c4a77c1bba6bdeee7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 347b9b3bdfbbb37eb196cdcbe7d78cc295ab4d2b..b9b13f76f263ac004252c15f3b0608128c1cde72 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 84ffe5f0b956e588f205236559335a86afaae235..186e859f38fe7d3cb60f4fba1035b8730627b372 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dff3f4dbac3870bffed7da705f786299bfd23bde..1b329314b6130d291d653f15c6bed534eff9590d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4cf44a75a9a70eddd3793dc48b1167d3088f4883..8823a309d81a08582075e3b7dfe1f928475fbe65 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e5b9bcd3ede5a279d98c058ea868646b6081f4c6..26bbbaa7b1904420bb6054ffe365ecd5d35c8017 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 23bcd777f59e77857bf1d7843e6ead7920140586..9627ba5f9f5187f4c1773783443e2b94f410fde6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4654c0eb24f828c1c5a775d5e561ee890a4afab1..5a9f9b25b75c24e3538ae2d763fcfa6e9e056dd4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 46ffd2412974d4c5be0f5e28c7e1a2fff3601e72..c96dd325793c433eaf0d66daa7bca475f5265c34 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6fed2b2c84c104107bd23802e014eacb24ca7d71..b3236c0975725feafa69e6419e7a2d3216aeac14 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f087d55c748ab61c3b09cf5dafaa8ab7c5bb6c65..4e884bc3ffc66300bd8079d11ecd940e53247026 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ef9fa2e531ec06acc3e320b73ed8453a7555fde4..7558aa95b6ecdd0ea5bd0629f63e6ea9c4f4d905 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e124214d461e6ea490a58f30a0f7e9be6d73ee54..0dad86dd95aae1e479c00cab1c08068a17b64aa4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 56245cd153bcdb285fb89952f645232c39948288..9024be2db3d105227fed9a94bbe2f9c0c7e26510 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 01752ffe749324e148ec63969befa71dbc939da7..c819e5a930f6b8864ea43eda092e958c5e1ed30c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b621e87b2307c7ca22eecf5f43c119220f6fba33..bbadc0ae4e8ff18a5078310ee8a50401d3d9cc79 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9be67bee3cbb290676f78a9df726045c78d8e02e..0587bd6e15f77cc0c008b855b262f122414d465d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 645d79ac6075d23f0e64f2835937c25230d92751..53cc50904bdfad99fb8a946d109d0d67be49c978 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d2a3c467d6db5287065f777f1d5cab25c0d078fc..9a4ef5f4192ecc60a859632ec8e599c191b41574 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0bdbec7b52b63f5d2e223ea12a2b1428bf6387c4..a9ae54a9cbd66714c922111eccf4d95abce10e1c 100644 (file)
@@ -1,61 +1,61 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.plugins.squid.bridges;\r
-\r
-import org.sonar.api.measures.CoreMetrics;\r
-import org.sonar.api.measures.Measure;\r
-import org.sonar.api.resources.Resource;\r
-import org.sonar.squid.Squid;\r
-import org.sonar.squid.api.SourceClass;\r
-import org.sonar.squid.api.SourceCode;\r
-import org.sonar.squid.api.SourcePackage;\r
-import org.sonar.squid.indexer.QueryByParent;\r
-import org.sonar.squid.indexer.QueryByType;\r
-import org.sonar.squid.math.MeasuresDistribution;\r
-import org.sonar.squid.measures.Metric;\r
-\r
-import java.util.Map;\r
-\r
-public class ClassComplexityDistributionBridge extends Bridge {\r
-\r
-  public static final int[] CLASSES_DISTRIB_BOTTOM_LIMITS = {0, 5, 10, 20, 30, 60, 90};\r
-\r
-  protected ClassComplexityDistributionBridge() {\r
-    super(false);\r
-  }\r
-\r
-  @Override\r
-  public final void onPackage(SourcePackage squidPackage, Resource sonarPackage) {\r
-    if (squidPackage.getDouble(Metric.METHODS) > 0) {\r
-      context.saveMeasure(sonarPackage, new Measure(CoreMetrics.CLASS_COMPLEXITY_DISTRIBUTION, getClassesComplexityDistribution(squidPackage, squid)));\r
-    }\r
-  }\r
-\r
-  private String getClassesComplexityDistribution(SourceCode unit, Squid squid) {\r
-    MeasuresDistribution distribution = new MeasuresDistribution(squid.search(new QueryByParent(unit), new QueryByType(SourceClass.class)));\r
-    Map<Integer, Integer> distrib = distribution.distributeAccordingTo(Metric.COMPLEXITY, CLASSES_DISTRIB_BOTTOM_LIMITS);\r
-    StringBuilder distribString = new StringBuilder(32);\r
-    for (Map.Entry<Integer, Integer> entry : distrib.entrySet()) {\r
-      distribString.append(entry.getKey()).append('=').append(entry.getValue().toString()).append(';');\r
-    }\r
-    distribString.setLength(distribString.length() - 1);\r
-    return distribString.toString();\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.plugins.squid.bridges;
+
+import org.sonar.api.measures.CoreMetrics;
+import org.sonar.api.measures.Measure;
+import org.sonar.api.resources.Resource;
+import org.sonar.squid.Squid;
+import org.sonar.squid.api.SourceClass;
+import org.sonar.squid.api.SourceCode;
+import org.sonar.squid.api.SourcePackage;
+import org.sonar.squid.indexer.QueryByParent;
+import org.sonar.squid.indexer.QueryByType;
+import org.sonar.squid.math.MeasuresDistribution;
+import org.sonar.squid.measures.Metric;
+
+import java.util.Map;
+
+public class ClassComplexityDistributionBridge extends Bridge {
+
+  public static final int[] CLASSES_DISTRIB_BOTTOM_LIMITS = {0, 5, 10, 20, 30, 60, 90};
+
+  protected ClassComplexityDistributionBridge() {
+    super(false);
+  }
+
+  @Override
+  public final void onPackage(SourcePackage squidPackage, Resource sonarPackage) {
+    if (squidPackage.getDouble(Metric.METHODS) > 0) {
+      context.saveMeasure(sonarPackage, new Measure(CoreMetrics.CLASS_COMPLEXITY_DISTRIBUTION, getClassesComplexityDistribution(squidPackage, squid)));
+    }
+  }
+
+  private String getClassesComplexityDistribution(SourceCode unit, Squid squid) {
+    MeasuresDistribution distribution = new MeasuresDistribution(squid.search(new QueryByParent(unit), new QueryByType(SourceClass.class)));
+    Map<Integer, Integer> distrib = distribution.distributeAccordingTo(Metric.COMPLEXITY, CLASSES_DISTRIB_BOTTOM_LIMITS);
+    StringBuilder distribString = new StringBuilder(32);
+    for (Map.Entry<Integer, Integer> entry : distrib.entrySet()) {
+      distribString.append(entry.getKey()).append('=').append(entry.getValue().toString()).append(';');
+    }
+    distribString.setLength(distribString.length() - 1);
+    return distribString.toString();
+  }
+}
index 14cd8876c5509bdecd9ba1896d58266a9597e29f..d5f11a53d479f9927010d5466259c316937cf65c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 79a0ca76a180fd9ed0b99c726ba5dccb6f1576fc..f46c399e9b4067e87b11c610e603621cb50f2ac0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ef98f42a7690abfa892e5c9a148114cbe4d34e60..d9ebd6680284e1a9fb9771f7fb21c213255d3cf8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 58abb4c49f7eba32beee540ef491b8a95de40c13..85a7a8928571cc7e01ae2a18cc70b8e123451afb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e091d4cd233b8e89fed7e5d9e7db492c9bbbc74f..f51ff51cde86195798f4e2460f7a64cef2480304 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8971e618b4e1a38221e132424ae9f1840630ed42..dd11d3d91223dbf437ffbc3d2507b4462e1f01d3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index abbff8ec449e2ef68ef73dadce0b20d44f56a36f..e73de853a8ad3a2785525574f5908c8cd2992f40 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9c76901e8385f6218249b0a4c021145408dd0f7d..737991ddfc23ea46ea7ea1294d58bb1601953b0d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bd455b4618700103628bf890bb60027f0e3cb810..39fddb3d01cb4b7f58879d837a35b375c151ba95 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b9c5819b9943522769b775b97fef5a9940a48f70..ba49a80d6de7803a7ecd58799590e23bfa633317 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d67ab464b985a6c74498270df5b13690f282a6f7..b7fc09e2accda3bea7ce91de6f7104c8887efb1e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 33fb53bf50e516c84f5728ef9a534a9b702b6d2b..74ebffed78e652717f5025d895b0ae3a5b29285a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f0a0636f19c0c5fe3f0470900e1af2fa52d0e10d..2b8eb53be186015dc48e854fb52944f95c0059b3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index aa605bdefd290b8138b854d5a73040600f6710bc..5e87d950cb42dfae2f2b82a9d021504e69bf6518 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 75c5c28fd8e53616e8fa44e2cc2ce610bf6a78a0..66570870c6fdbc1ee358038180212742998578e8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e8ec5e24d2b6a4d2d98c5186ccabfc157159db17..0f15bf37fa575881eb5763bf7b551c58504b909a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5163dc9347d466b44d8379c91ceac0d7522c764e..bb968b068215e8987c81cace5ef9f1f351c27f43 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 278b552778b971acbb6a5b4cfa401853a7a6e9f1..7506dbb50bdddeef0e3d1fe301273cc105ffbde0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7f8d3a04b76bd0a662f15cd2ff82fd37fbd9d73d..766929440cff64eeff6990df2acfb1816b531e86 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4f3756621916c12c25b1109340868c10c1f90f87..2b61b9ea45539e5284c377bad0cc3be751cd2792 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6681c54441c8d74148065e7e189fe60594722fe8..a5787df6df25cc3cb34530d414077cb93265646d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c48138680dd4c9c056f3de576c7217e1b28a7f7c..2888fdcb22d4f302dd5dd35073e519f917146e21 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9295075d8366bcfd74d5a7fd8d5be3a86311cc21..7e43874b24fe380e1f90b3704b9c33172fe56c9a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0061b15884b416aa79809a15627ea13f6972b2d9..d2827ccabe5a4aff1c0920fdc1cdb89ab148c159 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 301ad8a4852c9504f34d9bd624aacfac2b37cb48..711872a2831440d3c50eb28a99c5e4a0cad25ac4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d539f2218f75672d8f40898154ecc357c3a12af6..e385db329ffb95f5a218f9d0b664e0d3075e4d48 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 421fae7069fc3565265b14f3f9e9e79f37047e82..ee9a68dec150319d74daefb8834892b48cf52fe3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 83647fe3c05be0e7b7ecae7822fecd77443dc681..af8ba25111218bfee9e69910d4471e7a27e3cdce 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 58b446062a70a4b0a53e14d63a8e40e55c3d0f7f..07e7209ab09fec41c60d455ba4ae05664277b054 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2f4f524e1e59c6f1e1b99992bf4e5f21fa8fcfe2..dc72f66caea805356e9decf802336410b09f73fc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3338515f610f0949051d7a4fd16dddcb93c0a906..7fe8036b70fad9be0110da740bcbdf7a17e5ef5d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1ccd987c59248d9576d0f52b219f431507117859..662f871cdc920298d39b2913c0366733badbec6a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d90401b81dc6295e3cb7c518e68211e085ce9ad5..107945ea0fe6cb4e1d1ce0c7aa8957dd70925e9d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index aae2b7f407405bbe6bb2dea3f655afb8c5ef8972..0d0eaec498458ffb09f35822c87be1233b3e9dae 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 52f955842f4f84c8c75de2e3cf643813640e5744..a8e7d740ec49b95d8b277f09cefdefe461d8fda1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d2619567ab78d0cae7f215fc9dae39301ecf9701..925d196deda5c182a71203c807c65b66de118391 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 93aadbcdd36f329b3301f67c88ec2c47ff178556..ea7f9c57671f16b93257c92c8442f39c803bfbe3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0fbc8ffe1635936d10750c9cb1faf72609a51cca..24cf3c4c5a66f9dccbc1717613473c076e04eeb5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4b555cdb79c2e15eb5fc9daf3c39754b9cb14e72..93f0a2b4345780d28b7cbb8c88eb7428fb713ce3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e44af81215778f20d1a26d87b3949dc2fa8990e3..a301b26039a375683d1a6c3a6811946db82bd3b7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 73b12e7a82bb491245101e4e3ec43ee238e60086..2858a76ff3c388ba908ac0ac57cc7488ffa47d15 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2ed0b915f7e8bcb7668540521eb7fd558f3d677d..b306e688b766d2ff2abb1ae47b6f296eb2169594 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 954bde3dc4b7c96958ff8d741e5f420e94200b32..6db108ef116ce2379e6e3ae1af6ff98188f542be 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6565fe19d03cd0da53e94f0ca3ec16c7eabccb49..d3b8a507a14a944e069ceb58f21fd64db24645da 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fa8d0e3332c4e9dfcf4883eaa371e52e9354b21e..6b542992c099af1d388fc610f9af75e04fb3c965 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a7f7959deee691d5161cecf82590c1cba2948c69..c1165191e9c12a20b653dbafecb42c340a541f8f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3147b3a35c2d5f1f494460d4fd43aee7dbb1240a..127d51b92448227e2f9a1d846882b32ec17ffa80 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1bbc785bf1164e7fc80158b5758724c1e70fd77c..27abac563cc830b0fcc4117cfb0691e49dd2c94f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bb67495464bb94b5772ae0f229885f2693ff0b80..0b418dc0cb6e77026d23ec69621044c206d49cfd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4bfa29364601c8d413d6e2ea13c90efd439b6ea8..7050db6c1860d00d5d19d4d21c4ea78bd6da710c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9913d015d9f3651ddb7a9501698a5c9b2fd959be..291645e52fdd5244f3f16312e2addcfdd38dd51d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ee21746f770229c2457b404b4e85171ce33b6cfa..0c0d4db2ae97cd4e8bb7bc45467e84beb11c42f9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5b0139411c1c83beb7e97a49418cc39976ab5664..209c7c6d1d60992265ceab5d2fc1b48a510ac4e9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 831e15b369a35d9f82b2586b5da443cfa4d63565..2db4a0ce79078833ca0e743196495bb347642434 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6b7aae7d1e1d8dcc29dd46da0844013652d79e11..e09496804e1f7cf170f087d3e73c26510d9d606d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 511c024390c650cce13e5c6077c63f771c368aa1..fd89ccdb3d250c2dd89bfccd705e196c4de3b8a8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ddbaf763c7c2d95a99090245163ba7b2c1a4fbd6..5cb36686f5ab8e7be33103041aa36f831aa7d609 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8440672778d976488c7440250ba81c6df731cfb8..4e1bc2bda6ddf87df98ab76bce89c3eae13ea4aa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d079a4e632832608a1e660e356241a7e617a5da3..282c14726b2cb5c2bc580d7694fd017e59b96ed2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 94c6f9f4db9e7a11ebc7bcc5865953915ff678ea..09cb53673a3ef0ced2f9dc9765b53a5965781316 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 87e214f17aa3b03d6c4d970a78091c7a353ba1c1..8de79955566e04f6f966585b13051dbfde0e0eae 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 70a7e75b8630bbecc81c818c6f76a401c71cffdd..ee3ffa18c67ea9a94dd50f2860fe4aff29ce61a6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c335a155d6f71f98af232341c8c9e09b6c55113a..79f7b71e8bca10f01c2c24c9ea5c4af1a01cb56c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fb6151b7ef2724d592a422497851d6cceadc44c6..02fbc8259e5c7664d493abb8226acb89e5e6b9bd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c82817d1cb655aafbb265af393a72c60417b1c20..66b3ab29ac04c01639619b232afa0d8a4a228454 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 466e3ad49b975892fa4be92f3fedbc19de203599..0aecce29ae2643fd910aa4bf1bcff2369fbdcc53 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e7567d122504da1359c747566649c69189156035..985fd9b205e74bb6456ce1d7f2e9825bec70f7b4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9f9c793e2b64294840a7140bca8fb1aa3e2e7e5e..23d196c8b4a65574ed9a6fe403f67c33f7df11ce 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f90274d996474b1b6d389e88e3e78d9412a9299a..ec98b96ee154fcd7a16f3091cdf0894e17d7ecab 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d8c39f388c65f001757fc19dbc46abeebaccf4fb..18350132b502a11c57e3f31a2c13f64f413f505c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4bf33ac016f39c8e05992f70e005e51a9f17b404..52db97389cf1cd1471c43980559245fbbe59419e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 503046b987054896fe215a3797b8c29941560938..016bb315e6dea198b5a1b2f9e50fe1f01986b8ac 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 30ab80523e669e08ebfd6c53264db59bec1e3c0f..ec308e66a16df0fe9ad228a033c073ff03457e19 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9b5e847bfc14311baa38f5ee5f160a317495f656..783b24fa7d68d4924c3264a732608bfa85e25b66 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bfbbbb3e5f96f0c578a2c154c406ff6ed9af8c24..e0a21d9fe887938ebde75c1b808313e5fe8f22a9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b67848837f64883137cd5c59f96ac6d986ebd666..964d51977b85e1bcd2cde5f293df8a45d51f51be 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 961690cbe94da5f7340d38da33cd2a6de6bb519b..086d066b788e983248ae7b805644cc84bc352ab9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c533c835dc88f945021fe6b7977f3aa990f83554..63c7f4e4f8a730f990769bd0b3564f19dee5dca3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 67e102993dd407b2f4b9301c45ea14f33b10878d..4333578a1f0daf594af3e3e1e8d696df35f5642d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 435af35c52916fa4ddad051c9381bbb530b1f77c..e7efd032d924c973684b8d655afe68828f7c8203 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3799abfa4ba04ad4dbc2c47436af8173d06448f8..5e845f8de9d1f8aee7dba46e9cfab6ca6d2d848c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 891cf45e928e745de73dab714b5412d03ce01241..8066744d7d4a4d982f377e21487c960f894f1d84 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index aa0efe31cac86ca4c85e1e3c421594eeae7b797e..7fe4dc7d94a8ddb2e62900ffd5e9024c5d19eb90 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 434bae7495d7ed7332194c881e5bdfdcbc1cd876..3f01a71bd26c73a52ffc7627657a16e21a3ced88 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b0fec1fca0b89dad30482e665c51e8fce884ca23..9dd2a97b957c109b32bdd1b01e854c1309f35480 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6286e46e2056141355b46de5b518d32bfa6fd0bd..aa15b652ceda2cc39574d1b0155ca8c65e851508 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 70dfe4e38b35c1d7718069b3b7a4548662a6adec..668af1b8f954c8179033f18c9918ed7dfac8aa2a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f409c9e5d34f36c612c73365faa2b46cc7da1aad..5209bcbde4fb834a0bc1d42dceadec7beea06c57 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 79eceb91cbc226b8bb458e9e2a7afa4f1da065fc..3e8e326300c7a1ad5b0478555e794306462abad4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7f9b8cbea22f227f3f168aa7a7e19cf2a5a66f3c..b5bd9abe14de6dc5cac5e03d5eeffc078605d874 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7b082b4c09a4a9210335c4e7a00b24efac39b6a3..215ed9c8f2371b764c1baf1ef283f212c737e5c1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 082a99703c81e4775f5eb6ad7b70c244cf993d52..084d13e78460d12b5ec65f6c24ac70e1bb57838d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 450570ff6bcc703200bf146f61900bafdd0068aa..37accaa32efd080f0046cc9befd4afe0f341def0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 03e9402115efac39dbcb289e9936e07593a4ce59..8a1d46c918d1e20bc3c85f3ead6e937b63aaf4c5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 96e1f3f6a624227c7e076f1ed216daf1fa83d304..73cea1947edef5a524867bf50f455e993960115b 100644 (file)
@@ -1,6 +1,6 @@
-@echo off\r
+@echo off
 
-rem Copyright (C) 2009 SonarSource SA
+rem Copyright (C) 2008-2011 SonarSource
 rem mailto:contact AT sonarsource DOT com
 rem 
 rem Sonar is free software; you can redistribute it and/or
index 9e5ec345416afc9f0124b875dbf8e30ad982d597..0155f378f2be33606a3269ec0790723dc54788b9 100644 (file)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 # 
 # Sonar is free software; you can redistribute it and/or
index 3efa2935547ec9eed51fdacd17b1e40a8ef88d0b..b8409fbaa64cae3f75c508aed66516d1051dd6b8 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-Copyright (C) 2009 SonarSource SA
+Copyright (C) 2008-2011 SonarSource
 mailto:contact AT sonarsource DOT com
 
 Sonar is free software; you can redistribute it and/or
index 423eb04f9d6dc748fb8f5eedc7e3fd19b72a481b..369e07b68d3a015e54e3ee12ef670189f12eeec9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fd92dd066c155b6df03b4ffb0d47a2ee7a0a6fe2..c92b5069e6e49a870bc2567ce1becc30685e35f7 100644 (file)
@@ -1,75 +1,75 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.application;\r
-\r
-import java.io.File;\r
-import java.io.IOException;\r
-import java.net.URISyntaxException;\r
-import java.util.Properties;\r
-\r
-public final class StartServer {\r
-  private static final String DEFAULT_WEB_HOST = "0.0.0.0";\r
-  private static final int DEFAULT_WEB_PORT = 9000;\r
-  private static final String DEFAULT_WEB_CONTEXT = "/";\r
-  private static final int DEFAULT_AJP13_PORT = -1;\r
-\r
-  private StartServer() {\r
-  }\r
-\r
-  public static void main(String[] args) throws Exception {\r
-    configureLogback();\r
-    configureHome();\r
-\r
-    Properties configuration = getConfiguration();\r
-    String host = configuration.getProperty("sonar.web.host", DEFAULT_WEB_HOST);\r
-    int port = Integer.parseInt(configuration.getProperty("sonar.web.port", "" + DEFAULT_WEB_PORT));\r
-    String context = configuration.getProperty("sonar.web.context", DEFAULT_WEB_CONTEXT);\r
-    int ajp13Port = Integer.parseInt(configuration.getProperty("sonar.ajp13.port", "" + DEFAULT_AJP13_PORT));\r
-    JettyEmbedder jetty = new JettyEmbedder(host, port, context, ajp13Port, StartServer.class.getResource("/jetty.xml"));\r
-    configureRequestLogs(jetty, configuration);\r
-\r
-    jetty.start();\r
-    Thread.currentThread().join();\r
-  }\r
-\r
-  private static void configureRequestLogs(JettyEmbedder jetty, Properties configuration) {\r
-    String filenamePattern = configuration.getProperty("sonar.web.jettyRequestLogs");\r
-    if (filenamePattern!=null) {\r
-      jetty.configureRequestLogs(filenamePattern);\r
-    }\r
-  }\r
-\r
-  private static Properties getConfiguration() throws IOException {\r
-    Properties properties = new Properties();\r
-    properties.load(StartServer.class.getResourceAsStream("/conf/sonar.properties"));\r
-    return properties;\r
-  }\r
-\r
-  private static void configureHome() throws URISyntaxException {\r
-    File confFile = new File(StartServer.class.getResource("/conf/sonar.properties").toURI());\r
-    System.setProperty("sonar.home", confFile.getParentFile().getParentFile().getAbsolutePath());\r
-  }\r
-\r
-  private static void configureLogback() throws URISyntaxException {\r
-    File confFile = new File(StartServer.class.getResource("/conf/logback.xml").toURI());\r
-    System.setProperty("logback.configurationFile", confFile.getAbsolutePath()); \r
-    System.setProperty("logback.ContextSelector", "JNDI");\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.application;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.Properties;
+
+public final class StartServer {
+  private static final String DEFAULT_WEB_HOST = "0.0.0.0";
+  private static final int DEFAULT_WEB_PORT = 9000;
+  private static final String DEFAULT_WEB_CONTEXT = "/";
+  private static final int DEFAULT_AJP13_PORT = -1;
+
+  private StartServer() {
+  }
+
+  public static void main(String[] args) throws Exception {
+    configureLogback();
+    configureHome();
+
+    Properties configuration = getConfiguration();
+    String host = configuration.getProperty("sonar.web.host", DEFAULT_WEB_HOST);
+    int port = Integer.parseInt(configuration.getProperty("sonar.web.port", "" + DEFAULT_WEB_PORT));
+    String context = configuration.getProperty("sonar.web.context", DEFAULT_WEB_CONTEXT);
+    int ajp13Port = Integer.parseInt(configuration.getProperty("sonar.ajp13.port", "" + DEFAULT_AJP13_PORT));
+    JettyEmbedder jetty = new JettyEmbedder(host, port, context, ajp13Port, StartServer.class.getResource("/jetty.xml"));
+    configureRequestLogs(jetty, configuration);
+
+    jetty.start();
+    Thread.currentThread().join();
+  }
+
+  private static void configureRequestLogs(JettyEmbedder jetty, Properties configuration) {
+    String filenamePattern = configuration.getProperty("sonar.web.jettyRequestLogs");
+    if (filenamePattern!=null) {
+      jetty.configureRequestLogs(filenamePattern);
+    }
+  }
+
+  private static Properties getConfiguration() throws IOException {
+    Properties properties = new Properties();
+    properties.load(StartServer.class.getResourceAsStream("/conf/sonar.properties"));
+    return properties;
+  }
+
+  private static void configureHome() throws URISyntaxException {
+    File confFile = new File(StartServer.class.getResource("/conf/sonar.properties").toURI());
+    System.setProperty("sonar.home", confFile.getParentFile().getParentFile().getAbsolutePath());
+  }
+
+  private static void configureLogback() throws URISyntaxException {
+    File confFile = new File(StartServer.class.getResource("/conf/logback.xml").toURI());
+    System.setProperty("logback.configurationFile", confFile.getAbsolutePath()); 
+    System.setProperty("logback.ContextSelector", "JNDI");
+  }
+}
index 9f0fcdb93f73adcfc59f53c9707b4599ef7732a0..614e9752bdb94f975b5946cf193819a8eb15d419 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c61a238df04b0cb2953a57b2abcec0280fabab89..1bf933ea5c7098a86ca212317f9f694b683d7596 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8b75b61c97a1d6b612d716d49eff106d3c8a761e..2624d291438cddfdf4c93019351787554fad8f66 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 065c193c7d28b9c70bf3140895e5b86ef360d243..5dbd4f6edcac83836d00a85fa830abf890eac524 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d400bc8c40d2d9178cb6c2e87975acbd0750d8a8..cd3d8bf2cc7a3104fe0ec9e598c02cc8e2266396 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7c23a7aa9ec71440b10c47dfb346a2d4f95307bd..bbd3a83a680f77affdcf37025f7749655c40660a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b8a13d50173c89c5edf79780108a476fc9832872..dc737c8de2e1989e40ef08e1aee646a9e53c827b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 945940a487362489c9e7b8db485adb810fc23896..698db7d9de46434c90c8289f6b0ddbebdc399ed5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 413621334a090da2982ed5bcc390ace4efad5eed..85e5614c0d7745ada7947b761c32e42b3e08744b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index df943c51fd518d181014c69884c0693b28478aba..e95f6ee29279c6b3d818a5601a8c04557241f713 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3046aa96eb44d019c1526c3ba7b4bfb06913023f..cfe58e7aec4ffcb161bff8a9c8c5bd5dd6e35741 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5aa54d0cfc4754929b96d4659eefa56b28afa637..f431e17cae90d5a205ea2ab74d22fefd997c3884 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fe86e2c5414215b4ed055b1e3d1cb4a76aff2fb9..5272ab80cb15b2b31eaf8ed4dd713a38f2bb7fe2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 49e1244c191b1951994054da43c930e4deef837a..5188311250cc2978160adf4f7edf9e4163597755 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4a4acf8bf3213bc09433de24d583a9f27c417d8b..1689bc4269f7149a0c52b499f96e59145c671271 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a88afd1d37a672cb844e556e597137719c3027d2..6dbec54a2c76b6ceb868c4114a378bdf168f48a7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index af983b059d675202a9a10860dc8912450312bf85..a10a74012b0066e780f7cd551ed7353a67813e85 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0c80290fb53d10af431d354ca4a7d3f803a12b22..0dadf78842df89750dfb499f0b17c716c036b31e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1f1f1a3be9dccca7b6396d05adc641878fb68089..73c79ad8548baf875b9d4dd176ef0922a34f6a97 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 12404e585342aa5f2965c4695084f2642d209ffc..dd16c99d89eecf9d30fb0bde18271972e0c4548d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7fde1c352b71a3b9f8fda07c52e09163fc94850e..208cf78cb3a349a5160d2a9e2b9b4b2523584c7c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1f0acf8c19ece9c5451930765c5be51a288d7785..fff85d35e34818ed7a1a84cfb6761d0d11d39b3e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2059f562c698957fe237844e95e4b0806080698a..cb814196efea33d6d60db6d1e5be4f1587570793 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9f0e0c4ddc35ed886f439fde0a0e1c50875676c2..1cd325a55090f5911522896347ebd44b73bd1df1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4226a14fe7c1dd498d77bc9af79bc9ef35bc404e..ddae656f1d8d181ad48a69e52a82cfe050bc37b6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a0601ae30603eca68c56e29fe60546573fff87a7..4a03586a2e8ac7928320862d88b884564d036327 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 77359f427e3d18505ab2c771616aae7ba65c58d0..6b9fe08d3b130ca92b89c59c405d1bd3e0c67d66 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 395ffd2f38b171ae088d55ae98ea7d9af2e796a0..eeb15175918c7d28fe94d452e4c5b995b55b9091 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a88337a08246c17f70baecd1a60ca266dd8afab3..b8accd4e6d19bb4c82a947a14ca72c90cd8e9362 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 784b01ae8b5e057a534f6d6d471facfd03064f3c..9b53416b16e3e12141452d4a4200ed60fdcc27fb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7a42b11fe8bc398b184b1c2b509c93f05f17813e..166211ae75535a5eb4f89559b1af4d0aed3c779d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ee91b71c5959563674c5ad15f2de114d01f6b0ff..e9ec1e8cf7cea6beff7df728e3bfa4cb3f464c3c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 292b98c5180a0d5811cd8d600afb0e69b5f773c9..0cb1a95b53ca219beeb1df8d912c8563db464288 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 80ab6940d41fc75fa431074025b31ec77031c258..7ae7f4026fb2632d72f64bf3a1b08cf5bd69b5c9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 54ea3b5f5e31ff573466235bef922ac22e1da39d..f660f7a83e23f1adcb41892a41d2e9a00ebb9749 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 909adedf847d66512e4504b4345b81b1724f4f56..c2e4472be338a06e089e25461db6422f4292df16 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index eb374de1094de3ef861d4f17b0a63761e0a1f5ad..8c9ab0e9fdeb9c7faca5984eec6f9d2751708cc8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 242b0def5dde5b02ba36fa051063a4323bd9b80b..00f05439bd7bbda756d9673b7e93c8447e85af24 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 85b7c29e80dd555726ddf64fe144529942293345..ec2a38426d370706d5eb4725c54a61521f59171c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f627cfdcd4214dd1bc863f9566c8f2d14da46e42..71c95af82b85c99e78ba216bec9a0d44fcfddc82 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 20cd4bd0a6a311153130aa3af823f9b835d5acd5..ddb0d59c970284c4c304cdf7a93e6cecb5ce213f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 85acf01d449ad912ca08d8f252a4172e12559012..6993ca0b78d70c4588ed49eba8da77481bff2128 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 34eafc5a2b48b322d5275ba4a35a6efa947e10c9..e81019f902165fe26ab7fb320720cae1557edfba 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e3902a16b6a300787ee99c5e57dd4e1b5f0601a0..805a2b696e3ddbdc3e9a78bc1a0481a72c1f2580 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 136ac380cd7138da84c69c1b44dab5a879527510..e5892e9ce33ca717e529bafa2c7270b26b627eae 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 72010ede518d42f7bf9ce7feb4279a98731a6a10..ce6fbaed375c88766985d40a1bb5580766672eee 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f29551c1e299748fbc0379ada244fb4efa6b7b55..296571bc28276e6d63feb1ff24e3cd32592ce2ae 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f8df73fd11977934c4f0760d8db11244e406a4bb..a89991610e43f8080be5d4cc8b4812562e1b04a7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 640503ecdd8191b4fde02e737932f26b52a61ace..0365c6c8b2fb00e0fbcdd5d6f390f52fed1e1ca5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0389ebb4209bce54f651e763b28aec72387a35d5..2e6ae32a4c9f1062d93ac6da5b1b9beb4c93fd96 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5cc2b1aa3e586775016fe71a82145adf36aac4ad..74835f2ffabd1dc8c230ff9f80777b38068e718f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 66ec62ce999b4b23924aa65c3c1058ec1305fcd8..3699420acc4b91a76764832ec2b0eab98ea69a65 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ec8ca8c925e76786400eb8912d81a6b7a8bc18e5..f80e487d8686e3cc868b7342dc34adfe1f943391 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index caffd0dac07b91b342113cb30cfec0875e07d0ec..cef245960c93619d560c8bd31d6e39829595fba7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 203f4043ff630f0fd91294544fea3b6084b3be09..e84eee1cae4762eea15a5668671c2374b33e4409 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c2f30edd2eb4cc57a18885edda3333f9b328ff4c..f43f0ed037f7fc03cb1332a0d049e75096d0913a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dad3c8f542877e87cbfd44af15567236ff4ae7d6..9ddd6da6bb57af4af9f2d3e52f5fa6c63e9c0f24 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1b1857c7fc93e56cf32d1c575d820f4dc5e63709..0e8f700237c3a3bbb5a53b4f495f99f6a4cb1029 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 13fa2554aeb3ba6cc2d974f5d513a8c846c599c2..0613954e4ccaaa261140facaf19000012631c0c1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 82b5b6983a15c6e23a2c2a7abb36754cee0400fd..74b7179b16abe4bb0e39f6b37f4a67f6bf6e303d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 266502c5129000ced39e05c0119658f06e14b60f..a20548145a39e5777f1b0520d375168d9a52a27c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 58ca8564335863209bb6dbaf219fbbf00b92726f..49560b6126e97ce95e86720d281cdeed8be10367 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fd5debd5b5cba4e5d6d13cd379ac5c53ee1a0731..3ae372ddb16f885207270be962c412fb3dbc1b33 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 93805ca6b5f87712a99c9ef19a3ad133e4b495fa..9c42b329378485106d91c95b514e50bb727c1362 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6c105c0fb17ef6fcd05fe4d45c51702cd22d0226..707015d2d5a4d41b8c9cc0545df464efa0c13c64 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5c04142aadc5370c588e16121c13a6c76c31a3cd..8f3040d55b47e1fad1eec48bdae50e11dfc4302d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b105143ed97d0a97bf36338a98e99898d9b2e951..687ccbbbc6b9dd9c47f00d361447ef730394092c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2bf84aa767cf9c051f916d20d7c0686bb0cdba7d..9de4aa3df64fb648471161880c5acf619ea88cd3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5439d9b12c466e0bc74725dcb9437c87a73a52e7..2be1e1fc189802da788b69d7e44e9c94b8ba9f65 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 24918b4326e645c5bfed25146890d1eea758bdae..6aa9e70bc09f4742b063befe9a4698b4426619e5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dba2db3e37599aebf5840cd93aeccb64f6622fbe..096a7e5080154fdf82b765655daea9eb0137cd6e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b9e25d6bc4d3782430969d9c9204673b84fcc061..2534f697f712effef46201d08afe1d3a1ab67547 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7ddb33cfef768dcf6efd9a2a01f62b48d8164116..e7787f5e05b69b2a69731870c8804eac37693a6d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a35b692270a950f322aa1824b12aecad17bdefd9..734f4e644244230681626cd36d49add12761512d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bdefef5c6c88f0ba566a0776377521df7bf4c7a8..3fd5b097cdfc2b66cb462f5247eda8458d1f45e5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 247f0d09c0da54dec787d949aa8160caa48b35b8..632fbc8e0ca4ca1e702bf9cbf0be28ec3e498cf3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8030c946b19fb1d5bb396e0d7d70f3b522446282..ef3b087ffac887a56f91ddc2e1dafec88a33be18 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7e4d8d2d6f9b532b3e85f1b80ab0568f54fcb872..a52d5d829c3c5408b61a93ad19f483a7bd6228f7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 53eb38959b276a591783d62c787788353f1bb1bf..4a456bc85d200b050a8e904e7f5086a4268991bd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7d5abcac22e37e6638e44ce03b57706ff7e52e59..5ee91abceaf2a5ec7262828c03778d054621a731 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 30ab9900ae3a6851c7232a8ae16401c6ebc5e6e2..b28a4c33431c0cbba3bc17cfdad32f62a3458b6c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3094860d388895a1f6612099614ab857e9e3f75b..ab9a0aad137612298f0a5bdd0fe155fa6edc8263 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0812899219535ae5c5024fc6bf0c4c2cecc0e32a..ddc719c283792f7369b2cd0a20250c4b9cacd77e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1f3301424ed3993e06ee4422bca22c06a49d84f2..2b2137eb28819e01ce888c9d4bc346a9ad72f0c9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2013424d30c55ac30a15a01320f41a6ef8616d71..5bc4b328842b94964086a81f55bcb6f291e2f925 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 06c1673e95fe80533366520cb44fddcea702d55c..c4fc0d34063e301f3a188c5516310404f7b6937b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b72947d275e348f83400fd2b3115c0e7a4c92113..62a10db48e76f9b0672a3d452ed4579a24db17c5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6a6f084b8423ef8a494306794191f74b7632cb43..29f23920f0d98dece8010a922f5e9a6cbd07d932 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index eb59d8d41390adf1e9edd450abb5b3981b490baf..d524ce8f23253b5bd5518ae6373c6a233ed81437 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4f0fbde65736e3f1c54138436e0218b5b4138e18..b504b0a44b7175ffb7c771634a57e91bfefc8eed 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e37fc09523e13dcc58a008309f3dcd46fce9f10c..965f4f8d85f191535030d0c0239e119ab2949d88 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6854db8f52d5e5c045b131a247a696e47571dfa7..bf9ed29317c4d82b09cc3e2a5dbdd6eecc4e2b81 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ef88932c7e1a0d3e4e41d3c7a53b1c2065cb58fe..4083aaccb18a611e8d63ee6c6bdb0944f19b8493 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ec61785d170aa959a5a05ed92883cefc5356c344..3491738c922429689c7a54a16d34838ff27b2019 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 13a299b38b3df42ebb9cb26b5628305233953735..81dd495a9f58e5cf83eccb5cb276d9a03f7caf97 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cc92ff24a4cba246557a4bd8b49a68e57e6baf52..fc3dc73c41d77ab452675b3e4a71760a01e245f5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 55f30b322571a39fb089c340cf0a70120e819423..7d90a707941fd38c0a294922afa09d0fd88b52cc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8f9c1bcd582b299150b850e65ff06df70c09415e..05cc65747039831b87c74f3d3e606ca052d9cac6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 135fed227a429ab0505f8266a9f13285d774d04f..49effe0b450b6983c248a02a63c678742ce971ad 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 037d30987b74948a55c53b558696a07bb9c2a048..74e1b67c47f093a91ecbeedd94ce5e19deaa3b38 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index def743acaf0b14ea77a5aee79a5c52f53c7e738a..d14d30d7ae47733703b4aba5195e55ed9d2ffa6d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f9aa127c386d1ae6b09c3cfd60ac349b0c6c734d..2231bea710add36affdfe7ecdbb97157de62ce63 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e6f1e78d657ca201ca01ea12025d53dbf99a12d0..e6680f5fb3b10af1f8ccba2052c4947e3af2ad6e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 198ad995f619db57e471c2e020b8c3cfab3654fd..b646a023435a149e9917685fd0bc5740cbf9b1f7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 59b3f810807baef73f5cdcd20a072da0a3834ca1..5422def73a3b45617a72cc97ee10c625aa438572 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6ebb050737345387a10f1bc576b3cf2b27386927..aaab3cf97c829cd8173fd907c53a6c3cbfa28e22 100644 (file)
@@ -1,70 +1,70 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package org.sonar.channel;\r
-\r
-import java.util.List;\r
-\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-public class ChannelDispatcher<OUTPUT> extends Channel<OUTPUT> {\r
-\r
-  private static final Logger logger = LoggerFactory.getLogger(ChannelDispatcher.class);\r
-  private final boolean failIfNoChannelToConsumeOneCharacter;\r
-\r
-  @SuppressWarnings("rawtypes")\r
-  private final Channel[] channels;\r
-\r
-  @SuppressWarnings("rawtypes")\r
-  public ChannelDispatcher(List<Channel> tokenizers) {\r
-    this(tokenizers, false);\r
-  }\r
-\r
-  @SuppressWarnings("rawtypes")\r
-  public ChannelDispatcher(List<Channel> tokenizers, boolean failIfNoChannelToConsumeOneCharacter) {\r
-    this.channels = tokenizers.toArray(new Channel[0]); // NOSONAR, lack of performance is not an issue here\r
-    this.failIfNoChannelToConsumeOneCharacter = failIfNoChannelToConsumeOneCharacter;\r
-  }\r
-\r
-  public boolean consume(CodeReader code, OUTPUT output) {\r
-    int nextChar = code.peek();\r
-    while (nextChar != -1) {\r
-      boolean channelConsumed = false;\r
-      for (Channel<OUTPUT> channel : channels) {\r
-        if (channel.consume(code, output)) {\r
-          channelConsumed = true;\r
-          break;\r
-        }\r
-      }\r
-      if ( !channelConsumed) {\r
-        String message = "None of the channel has been able to handle character '" + (char) code.peek() + "' (decimal value " + code.peek()\r
-            + ") at line " + code.getLinePosition() + ", column " + code.getColumnPosition();\r
-        if (failIfNoChannelToConsumeOneCharacter) {\r
-          throw new IllegalStateException(message);\r
-        }\r
-        logger.debug(message);\r
-        code.pop();\r
-      }\r
-      nextChar = code.peek();\r
-    }\r
-    return true;\r
-  }\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package org.sonar.channel;
+
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ChannelDispatcher<OUTPUT> extends Channel<OUTPUT> {
+
+  private static final Logger logger = LoggerFactory.getLogger(ChannelDispatcher.class);
+  private final boolean failIfNoChannelToConsumeOneCharacter;
+
+  @SuppressWarnings("rawtypes")
+  private final Channel[] channels;
+
+  @SuppressWarnings("rawtypes")
+  public ChannelDispatcher(List<Channel> tokenizers) {
+    this(tokenizers, false);
+  }
+
+  @SuppressWarnings("rawtypes")
+  public ChannelDispatcher(List<Channel> tokenizers, boolean failIfNoChannelToConsumeOneCharacter) {
+    this.channels = tokenizers.toArray(new Channel[0]); // NOSONAR, lack of performance is not an issue here
+    this.failIfNoChannelToConsumeOneCharacter = failIfNoChannelToConsumeOneCharacter;
+  }
+
+  public boolean consume(CodeReader code, OUTPUT output) {
+    int nextChar = code.peek();
+    while (nextChar != -1) {
+      boolean channelConsumed = false;
+      for (Channel<OUTPUT> channel : channels) {
+        if (channel.consume(code, output)) {
+          channelConsumed = true;
+          break;
+        }
+      }
+      if ( !channelConsumed) {
+        String message = "None of the channel has been able to handle character '" + (char) code.peek() + "' (decimal value " + code.peek()
+            + ") at line " + code.getLinePosition() + ", column " + code.getColumnPosition();
+        if (failIfNoChannelToConsumeOneCharacter) {
+          throw new IllegalStateException(message);
+        }
+        logger.debug(message);
+        code.pop();
+      }
+      nextChar = code.peek();
+    }
+    return true;
+  }
 }
\ No newline at end of file
index 1b1f4c9f3d0c560ef51922cac16048bc7d696d75..fc43af06b04e1245f460828aecc846564765f6cd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0b5a72822ba75ae29a931571be92b5f4d3089b58..5515e7eb284606e0dfcf65d42913abf6fd795d8b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 73a2172fbebf48a933e7e45e12e40c055660fe17..2c93f35fc0bca0bf65660ccc46bff8ebf4d3f5ac 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4976a0ea6baa6d60a71c4f461dabcfa784056e4f..bd543207ea9342478e55e1c88d21ff1efbfb8651 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 65c2c1db2046a52228bbe1d7062a3ad08f8b5521..76030df244fb91474d7db80ef9a467c729ba656f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e74d2b766434b680f18b17f2a15c89cb83fdd447..c506b9f9dee6d84e107eed6468913ae0a8f087e9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 840a7f46f033704c7aee2d40f7d3b0ee7184a88d..b028184c7c53bfe8ed4909951024a5af2bdf22c3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0064443fd0562ed6e2daec73f18024c0a9842aa7..a748cfa6f839749a40650443bbff095c42085ec2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d368a616240a056a145ec3ba4c21189f7aad7e79..4e2bf0852c628a98f25805f59c0fb89236791b6a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a79a64817f895494710a5fde6db77671f8bf6586..4bf20a305d4d32ad11a1af8d7008747b30f54030 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 16ada04cce878a6035ad424d128e0db1e47f9a7e..dae56836d13404dad7331f697619f731f2afa932 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index deaa4f3bfaf601ca07b38b84d772882574cf4059..eb21d9c1995524fec20b6e611d704777fbeb41f8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 274192d5dcce56ede7de4a14bf5fa8416a91566f..cc0e434ce54dfd84544972d95e0765de28256f02 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 935e8e8592d73212cbe36a8768765f2d8cc32d8b..8479948680f98775576d9d4fe992fde69f599a4d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4d1aa0d7d316d299db43ccf15538c98f7c6985b4..229e6e1f2eab3befa4a56d566c63ab2073bc9a01 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8f92f3d4765dbdf09fcde85c9d96f03f6386de94..41ba1baf1e247f617c480a0db8f1de81d7b1e63f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bdeb121b3a59a6dee7756a70643d80913d5ccff0..b3acde75945b2b97419d19c3ca621f7f08966ae6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 905c59b4099e1b6cc51d352eb94f92f38fcc597f..7f730e7e27bf51f8b72386f2f86ad286fa79c67c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fc545a24163234edf0e2d32b43414fec7b893ec4..f307430d3778f295163d3fc8b0bfa8e983ac1b6b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d0ae45c084ec54e9438ba1bf7b5a777485d62b2e..9028de7c17f416479ae803189fc2f13d105ee682 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a1051e09c70921accf33da0b99b817ac255d4b9c..8bc37539516441ca9b01a039da69df7e6f9ad8ba 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 46f8e80d3907d5090afbccf946d970d7dceddba7..56d8a91f1dc3278c98b9b9a6958b0f770d2bf4cf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ce146f9ec74f09d5aa9559eb18043a2cdf591b41..b01d1c71872480ccd103ad4e0810ae85ef9bda53 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e54470b977d3e46d820e61df463edba12b735500..e1d309cb66bb676e608594421995c3517624f896 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a348fa81cff27acfd5f94a31134b50143bbd2670..830006117024a9f4528b3fcbff8d44a3c47b7edd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d965b6c652fc2031008960a578ee79155c27ac48..c472a72e802a475a5c0c540482be677d852225ce 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bc97ba942672e3d7d991cf013d6c4f7cfd12efb6..c7d57a8aa408b7fc04cb756fdf56b9a8ee022d09 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4e86ed7eec07c7328bf703f3b95af2602b6dbe6b..4874ba794e80509f7f88fc549ccb68e7e1d21ef2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ea530abc037441c56cbd152928c4de54f47f0ae7..51c0302900c98c86b94748e2c7302b4c4a6ca017 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2d65143c106eed9ffdac3bbf2e0befff7fac305a..611a57d1a4c139d36142925b7aebdec9c744a8b3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f26a710e80b9ac878a277c3e84157e8cc011bdac..8425724fb704a662fd430ce592107183e7476b99 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5f11b86758452787f3fed9c4407baec4df7908b2..ce9dfb5e0c85fa3b57e9c4d78f2906b50cc6116d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ad12bf829c3f9b8ff2be6d99f190143577767638..0d6d70fa4813ada94b2cace1b00313b1e00fc5c1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 346855eed462083a72c3748bfd80b81596d24961..554e0613fac8ae0e230a35b8e110868810bbbc23 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 17fd02cf15155501a07fbe18b0f8dfb145a35338..4fe0445a5d45cdda073885ab11d484334055256f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b3ce2bbfed12048817624a5407ad14e7ac3be198..34c9ae359a876c223c590927ce5225375342bc60 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e5bc1b5af1cccbbd09133af24bb26eef7ebdcaa1..0186a12effb31b796eb588d69ea4bbadb7999273 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ccf39096475c0b24ec57c953878bc896ce327654..64e6387b2ca977f39c3417adc5261473aeb44a18 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9d4dd3239d76d2d54cf51427940c5845d0e5b66e..3152b41161f809c98ac035825b73f247b5ffb00e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2c0c6c934687af569cbebbba77218a4c0c379a1d..25c45dae1f896dc183cc27eb5d91f19d2d8f091f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8fb767d623f9c31597f2d42ce030e3345562959e..b09e9553f4d0da234b7c31ea712a0a9efd85d1df 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 94eb919dcc7582233b7fdb434d2a319b05af912c..4233a16f68eb5ae83a0088ed5d7459d5b72fcf89 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d0cb456e0c0359e2121330a8eee890515af7caff..681ff71244d47cb06d929b054bec8b74a125e8e4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index eaf572caecc47b829b2809c1e76d1f28acee35f2..ac0d0e49a21d08a1183d99949b9e70f0a57c1af8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7830575ea3f9db169cc587f74dac436f90836d67..17e188f8fa0ac837b16c9fe8de9cb3f4945c4ed2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e7cdfa79639f670b2ea64f881c10b6a88b579740..a0e3492cf83bcfe161804c3b73235e3d7fcd59ca 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ee01df95b5bbf95c1020f879cab0fb1706a42cc1..103c18668974cb81580475b1870481bb7f4b3b19 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 60c2b3be7372288a493842076444d2be752b76d3..9685819f46be13e66a1cd238a57edc6bb867e38e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 31b7e316de486b1c7481b81238f3b17446c9a273..d3e672e0b44d66aec00cbb7c36c1bb21d0d39960 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8f6d7412b9189757bdeff88f5ed17d5430d3012a..f4f55e9938fceaec0a2f30cfdae44a9acfb9d131 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 67f7ee7cc285c1046ad77f67fa6da0c552f647fd..ee2d73617eae313ddfea02776c7b8e1ea92c8ab7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8547a69a2bc4c7895fdb3c52dc9827d2e8f4af40..85bd5d0993ceb7665845f7f9e28660705fb28a61 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5c64e5e6e621459c33bfe0c43e776b605517c676..f76b1871411d2929f5a7f249f338db9688197b1e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6effeaa3698ff7b82f30e6806f7b75a50aeaa892..c5b1d1283a9d6df409c13a4579e70e6a0a99929c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a3c5e9b8c77687aa2228b958804d0ec20a1b8e18..66e4a1ef937e362c2f1b4a26bd85a39799e70af5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index eb1fe8f0a0df4d4b4e913c05dccf05ebc9ab5170..4dc8f597eb6799b0a20c5f0a16ccf723f1b98ce9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0c45b78734d81297439e1011e5f96cf614ef4263..a8f6b5e5245276ca5566021cb0d2acd1e9b13f7d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2bd6e05484f338bd7ca0c9715345de24130fecbc..2a7f24b08af7cb9225ad55504b0f358c0beb2cd3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dcf9e92962772190122a1ff8b3a5f09f9c6daa32..a1b66de97352b3996b4bcb2d1f793f2fc93dd1fa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 08a560e05859f8eff053b6bdd585433ae933a66a..678d3ef3553115d170e1db603ae8dad8885f0344 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5a5968f59d84d1c1b4d8f58dc47b7357417a4a0d..17098b639751ee805726aa6ae7d44b01f239986f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cb975763cc2e1eec65b39feadc35da5ab33729fc..6e5bf81eb7a29851e25b1f5846a66b80de99d083 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 32a6f65d1d66f1b01ca087ebe24936fd07862316..3015ae39c72013142044e909841ff60b9f6eaca2 100644 (file)
@@ -1,80 +1,80 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package org.sonar.colorizer;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.sonar.channel.CodeReader;\r
-\r
-import static org.hamcrest.MatcherAssert.assertThat;\r
-import static org.hamcrest.Matchers.is;\r
-import static org.junit.Assert.assertEquals;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-public class MultilinesDocTokenizerTest {\r
-\r
-  private HtmlCodeBuilder codeBuilder;\r
-\r
-  @Before\r
-  public void init() {\r
-    codeBuilder = new HtmlCodeBuilder();\r
-  }\r
-\r
-  @Test\r
-  public void testStandardComment() {\r
-    MultilinesDocTokenizer tokenizer = new MultiLineDocTokenizerImpl("{[||", "");\r
-    assertThat(tokenizer.hasNextToken(new CodeReader("{[|| And here is strange  multi-line comment"), new HtmlCodeBuilder()), is(true));\r
-    assertThat(tokenizer.hasNextToken(new CodeReader("// this is not a strange multi-line comment"), new HtmlCodeBuilder()), is(false));\r
-  }\r
-\r
-  @Test\r
-  public void testLongStartToken() {\r
-    MultilinesDocTokenizer tokenizer = new MultiLineDocTokenizerImpl("/***", "**/");\r
-    assertTrue(tokenizer.consume(new CodeReader("/*** multi-line comment**/ private part"), codeBuilder));\r
-    assertEquals("/*** multi-line comment**/", codeBuilder.toString());\r
-  }\r
-  \r
-  @Test\r
-  public void testStartTokenEndTokenOverlapping() {\r
-    MultilinesDocTokenizer tokenizer = new MultiLineDocTokenizerImpl("/*", "*/");\r
-    assertTrue(tokenizer.consume(new CodeReader("/*// multi-line comment*/ private part"), codeBuilder));\r
-    assertEquals("/*// multi-line comment*/", codeBuilder.toString());\r
-  }\r
-  \r
-  @Test\r
-  public void testMultilinesComment() {\r
-    CodeReader reader = new CodeReader("/* multi-line comment\n*/ private part");\r
-    MultilinesDocTokenizer tokenizer = new MultiLineDocTokenizerImpl("/*", "*/");\r
-    assertTrue(tokenizer.consume(reader, codeBuilder));\r
-    assertEquals("/* multi-line comment", codeBuilder.toString());\r
-    reader.pop();\r
-    assertTrue(tokenizer.consume(reader, codeBuilder));\r
-    assertEquals("/* multi-line comment*/", codeBuilder.toString());\r
-  }\r
-\r
-  public class MultiLineDocTokenizerImpl extends MultilinesDocTokenizer {\r
-\r
-    public MultiLineDocTokenizerImpl(String startToken, String endToken) {\r
-      super(startToken, endToken, "", "");\r
-    }\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package org.sonar.colorizer;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.sonar.channel.CodeReader;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+public class MultilinesDocTokenizerTest {
+
+  private HtmlCodeBuilder codeBuilder;
+
+  @Before
+  public void init() {
+    codeBuilder = new HtmlCodeBuilder();
+  }
+
+  @Test
+  public void testStandardComment() {
+    MultilinesDocTokenizer tokenizer = new MultiLineDocTokenizerImpl("{[||", "");
+    assertThat(tokenizer.hasNextToken(new CodeReader("{[|| And here is strange  multi-line comment"), new HtmlCodeBuilder()), is(true));
+    assertThat(tokenizer.hasNextToken(new CodeReader("// this is not a strange multi-line comment"), new HtmlCodeBuilder()), is(false));
+  }
+
+  @Test
+  public void testLongStartToken() {
+    MultilinesDocTokenizer tokenizer = new MultiLineDocTokenizerImpl("/***", "**/");
+    assertTrue(tokenizer.consume(new CodeReader("/*** multi-line comment**/ private part"), codeBuilder));
+    assertEquals("/*** multi-line comment**/", codeBuilder.toString());
+  }
+  
+  @Test
+  public void testStartTokenEndTokenOverlapping() {
+    MultilinesDocTokenizer tokenizer = new MultiLineDocTokenizerImpl("/*", "*/");
+    assertTrue(tokenizer.consume(new CodeReader("/*// multi-line comment*/ private part"), codeBuilder));
+    assertEquals("/*// multi-line comment*/", codeBuilder.toString());
+  }
+  
+  @Test
+  public void testMultilinesComment() {
+    CodeReader reader = new CodeReader("/* multi-line comment\n*/ private part");
+    MultilinesDocTokenizer tokenizer = new MultiLineDocTokenizerImpl("/*", "*/");
+    assertTrue(tokenizer.consume(reader, codeBuilder));
+    assertEquals("/* multi-line comment", codeBuilder.toString());
+    reader.pop();
+    assertTrue(tokenizer.consume(reader, codeBuilder));
+    assertEquals("/* multi-line comment*/", codeBuilder.toString());
+  }
+
+  public class MultiLineDocTokenizerImpl extends MultilinesDocTokenizer {
+
+    public MultiLineDocTokenizerImpl(String startToken, String endToken) {
+      super(startToken, endToken, "", "");
+    }
+  }
+
+}
index bbcb5c360e1ee6368afc6ce9b2d259f0b0cb9b4e..186b8126a85288bfbf6d53a62c06001ee27d41ab 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 303e731b49d3d931c1e0a3930bd994e78233195f..8f84ea738fa33eaf729564c05f662021a3507fcf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c551b289e03b0f782aee9af5df48d89fc7e196e4..ae43db41a4fae48b4be907d05bafc8c9e3976085 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 681e810c12742fcde3495a04043a18ea8761bc3e..7385be2e098e7cd4ac9ca309c105c176adc28323 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e2f6e30d0dc34f31911cf29e9dbd5f50d16ad2d6..cbb50901388044b529e5a1297b81a31a22524b4b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3e0099a4a94652c7503ee9088442531904bc6d19..ba4afc7120db3a1eea65874718c9395a8852e660 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cd945c5425bcd7b74434573af2f929133ee50800..70b49625d699a83087eba7b61efcf2b26794bd3d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index efafbcc508de6c49b84f56e20460650ddc11e72d..f464c73adb68b45f7182d4ee5805abb9b09b972b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4cead063e31912c8f46828ab9f9318a61e643c23..d53ea7f6f6154f74f6213ce888c3807ea4afbc09 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ac3b0f6afab7bd5a38f2c93b0b1a742dee07b9c6..9df43699ec8c2fbbbf217f351bd10d73f73c858b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2944b8547e564185dc60c2ebaf180306a85d59fb..8e871d084c2d1baf81d49bc102d1d7132b15eca3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7b42df06bb713d09bbd52312700d9bafbb529f53..6e2ab843b58d4652719e6e1a5e92eafebf477c78 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1e0b747bb6107fa4ed505cf180d25d5298deac6d..cf31ad3a52513a88bc5677067c2ea92fb8856653 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 12eaf9c68c5fcf6129285886f8faddf16dc4629b..e3165f329158b567b153264bbccb4730c8763e94 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a7a04c7cf24bfa11e0b3bbc7667a6a58bff43773..cbddb4210880c80bc586fb4bdcf789c8bdda8b9b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3c0d50e7bcdd8cb4c0c4d395b941b8ea2aec309f..2b0318c14b000500a5361153f633b58674381946 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a1e51e95d9a26edfafb9fc0b2879a1c3f0ec63ae..0d4f65e89f437244615f0c10543874b08cdf4d78 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 22b6772d8749973f7ca4b0817100d4788601c6ba..a842173f3a2067cc66660b2167173032c44f8833 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1fe44ab9e7bea7025cee68a8eabd5f92da72d9e0..2f7f241cf5f99f29846f55da813bf331a9b23f0a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 03c4934e4aa5a9135d361463b304ce3d9263b26f..4deef0f3c64f357f07ff14c59a9b8279a5048b7a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4c8c71b0b72dcdfbc554f7d4e0ea2521b19e1dfb..5f09d281a970be790c2a401094de2f5d19dfd4be 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.jpa.dao;\r
-\r
-import org.sonar.api.database.DatabaseSession;\r
-import org.sonar.api.database.model.AsyncMeasureSnapshot;\r
-import org.sonar.api.database.model.MeasureModel;\r
-import org.sonar.api.database.model.ResourceModel;\r
-import org.sonar.api.database.model.Snapshot;\r
-\r
-import javax.persistence.NoResultException;\r
-import javax.persistence.Query;\r
-import java.util.Date;\r
-import java.util.List;\r
-\r
-public class AsyncMeasuresDao extends BaseDao {\r
-\r
-  public AsyncMeasuresDao(DatabaseSession session) {\r
-    super(session);\r
-  }\r
-\r
-  public MeasureModel getAsyncMeasure(Long asyncMeasureId) {\r
-    return getSession().getEntityManager().find(MeasureModel.class, asyncMeasureId);\r
-  }\r
-\r
-  public void deleteAsyncMeasure(MeasureModel asyncMeasure) {\r
-    deleteAsyncMeasureSnapshots(asyncMeasure.getId());\r
-    getSession().remove(asyncMeasure);\r
-  }\r
-\r
-  public Snapshot getPreviousSnapshot(Snapshot s) {\r
-    try {\r
-      return (Snapshot) getSession().createQuery(\r
-          "SELECT s FROM Snapshot s " +\r
-              "WHERE s.createdAt<:date " +\r
-              "AND s.scope=:scope " +\r
-              "AND s.resourceId=:resourceId " +\r
-              "ORDER BY s.createdAt DESC")\r
-          .setParameter("date", s.getCreatedAt())\r
-          .setParameter("scope", s.getScope())\r
-          .setParameter("resourceId", s.getResourceId())\r
-          .setMaxResults(1)\r
-          .getSingleResult();\r
-    } catch (NoResultException ex) {\r
-      return null;\r
-    }\r
-  }\r
-\r
-  public List<Snapshot> getNextSnapshotsUntilDate(MeasureModel measure, Date date) {\r
-    Query query = getSession().createQuery(\r
-        "SELECT s FROM Snapshot s " +\r
-            "WHERE s.resourceId=:projectId " +\r
-            "AND s.createdAt>=:beginDate " +\r
-            (date != null ? "AND s.createdAt<:endDate " : "") +\r
-            "AND s.scope=:scope " +\r
-            "ORDER BY s.createdAt ASC ")\r
-        .setParameter("projectId", measure.getProjectId())\r
-        .setParameter("beginDate", measure.getMeasureDate())\r
-        .setParameter("scope", ResourceModel.SCOPE_PROJECT);\r
-    if (date != null) {\r
-      query.setParameter("endDate", date);\r
-    }\r
-    return query.getResultList();\r
-  }\r
-\r
-  public AsyncMeasureSnapshot createAsyncMeasureSnapshot(Long asyncMeasureId, Integer snapshotId, Date AsyncMeasureDate, Date snapshotDate, Integer metricId, Integer projectId) {\r
-    AsyncMeasureSnapshot asyncMeasureSnapshot = new AsyncMeasureSnapshot(asyncMeasureId, snapshotId, AsyncMeasureDate, snapshotDate, metricId, projectId);\r
-    getSession().save(asyncMeasureSnapshot);\r
-    return asyncMeasureSnapshot;\r
-  }\r
-\r
-  public void updateAsyncMeasureSnapshot(AsyncMeasureSnapshot asyncMeasureSnapshot, Snapshot snapshot) {\r
-    if (snapshot != null) {\r
-      asyncMeasureSnapshot.setSnapshotId(snapshot.getId());\r
-      asyncMeasureSnapshot.setSnapshotDate(snapshot.getCreatedAt());\r
-    } else {\r
-      asyncMeasureSnapshot.setSnapshotId(null);\r
-      asyncMeasureSnapshot.setSnapshotDate(null);\r
-    }\r
-    getSession().merge(asyncMeasureSnapshot);\r
-  }\r
-\r
-  public void removeSnapshotFromAsyncMeasureSnapshot(AsyncMeasureSnapshot asyncMeasureSnapshot) {\r
-    asyncMeasureSnapshot.setSnapshotId(null);\r
-    asyncMeasureSnapshot.setSnapshotDate(null);\r
-    getSession().merge(asyncMeasureSnapshot);\r
-  }\r
-\r
-\r
-  public AsyncMeasureSnapshot getNextAsyncMeasureSnapshot(Integer projetcId, Integer metricId, Date date) {\r
-    try {\r
-      return (AsyncMeasureSnapshot) getSession().createQuery(\r
-          "SELECT ams FROM AsyncMeasureSnapshot ams " +\r
-              "WHERE ams.projectId=:projectId " +\r
-              "AND ams.metricId=:metricId " +\r
-              "AND ams.measureDate>:date " +\r
-              "ORDER BY ams.measureDate ASC")\r
-          .setParameter("projectId", projetcId)\r
-          .setParameter("metricId", metricId)\r
-          .setParameter("date", date)\r
-          .setMaxResults(1)\r
-          .getSingleResult();\r
-    } catch (NoResultException ex) {\r
-      return null;\r
-    }\r
-  }\r
-\r
-  public List<AsyncMeasureSnapshot> getNextAsyncMeasureSnapshotsUntilDate(MeasureModel asyncMeasure, Date endDate) {\r
-    Query query = getSession().createQuery(\r
-        "SELECT ams FROM AsyncMeasureSnapshot ams " +\r
-            "WHERE ams.projectId=:projectId " +\r
-            "AND ams.metricId=:metricId " +\r
-            (endDate != null ? "AND ams.measureDate<:endDate " : "") +\r
-            "AND ams.snapshotDate>=:measureDate " +\r
-            "ORDER BY ams.snapshotDate ASC ")\r
-        .setParameter("projectId", asyncMeasure.getProjectId())\r
-        .setParameter("metricId", asyncMeasure.getMetricId())\r
-        .setParameter("measureDate", asyncMeasure.getMeasureDate());\r
-    if (endDate != null) {\r
-      query.setParameter("endDate", endDate);\r
-    }\r
-    return query.getResultList();\r
-  }\r
-\r
-  public List<AsyncMeasureSnapshot> getPreviousAsyncMeasureSnapshots(Integer projectId, Date beginDate, Date endDate) {\r
-    Query query = getSession().createQuery(\r
-        "SELECT ams FROM AsyncMeasureSnapshot ams " +\r
-            "WHERE ams.projectId=:projectId " +\r
-            "AND ams.measureDate<=:endDate " +\r
-            (beginDate != null ? "AND ams.measureDate>:beginDate " : "") +\r
-            "AND ams.snapshotId IS NULL " +\r
-            "ORDER BY ams.measureDate ASC")\r
-        .setParameter("projectId", projectId)\r
-        .setParameter("endDate", endDate);\r
-    if (beginDate != null) {\r
-      query.setParameter("beginDate", beginDate);\r
-    }\r
-    return query.getResultList();\r
-  }\r
-\r
-  public List<AsyncMeasureSnapshot> getAsyncMeasureSnapshotsFromSnapshotId(Integer snapshotId, List<Integer> metricIdsToExclude) {\r
-    Query query = getSession().createQuery(\r
-        "SELECT ams FROM AsyncMeasureSnapshot ams " +\r
-            "WHERE ams.snapshotId=:snapshotId " +\r
-            (!metricIdsToExclude.isEmpty() ? "AND ams.metricId NOT IN (:metricIdsToExclude) " : "") +\r
-            "ORDER BY ams.measureDate ASC")\r
-        .setParameter("snapshotId", snapshotId);\r
-    if (!metricIdsToExclude.isEmpty()) {\r
-      query.setParameter("metricIdsToExclude", metricIdsToExclude);\r
-    }\r
-    return query.getResultList();\r
-  }\r
-\r
-  public AsyncMeasureSnapshot getLastAsyncMeasureSnapshot(Integer projetcId, Integer metricId, Date date) {\r
-    try {\r
-      return (AsyncMeasureSnapshot) getSession().createQuery(\r
-          "SELECT ams FROM AsyncMeasureSnapshot ams " +\r
-              "WHERE ams.projectId=:projectId " +\r
-              "AND ams.metricId=:metricId " +\r
-              "AND ams.measureDate<:date " +\r
-              "ORDER BY ams.measureDate DESC")\r
-          .setParameter("projectId", projetcId)\r
-          .setParameter("metricId", metricId)\r
-          .setParameter("date", date)\r
-          .setMaxResults(1)\r
-          .getSingleResult();\r
-    } catch (NoResultException ex) {\r
-      return null;\r
-    }\r
-  }\r
-\r
-  public void deleteAsyncMeasureSnapshots(Long asyncMeasureId) {\r
-    getSession().createQuery(\r
-        "DELETE FROM AsyncMeasureSnapshot ams WHERE ams.measureId=:measureId")\r
-        .setParameter("measureId", asyncMeasureId)\r
-        .executeUpdate();\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.jpa.dao;
+
+import org.sonar.api.database.DatabaseSession;
+import org.sonar.api.database.model.AsyncMeasureSnapshot;
+import org.sonar.api.database.model.MeasureModel;
+import org.sonar.api.database.model.ResourceModel;
+import org.sonar.api.database.model.Snapshot;
+
+import javax.persistence.NoResultException;
+import javax.persistence.Query;
+import java.util.Date;
+import java.util.List;
+
+public class AsyncMeasuresDao extends BaseDao {
+
+  public AsyncMeasuresDao(DatabaseSession session) {
+    super(session);
+  }
+
+  public MeasureModel getAsyncMeasure(Long asyncMeasureId) {
+    return getSession().getEntityManager().find(MeasureModel.class, asyncMeasureId);
+  }
+
+  public void deleteAsyncMeasure(MeasureModel asyncMeasure) {
+    deleteAsyncMeasureSnapshots(asyncMeasure.getId());
+    getSession().remove(asyncMeasure);
+  }
+
+  public Snapshot getPreviousSnapshot(Snapshot s) {
+    try {
+      return (Snapshot) getSession().createQuery(
+          "SELECT s FROM Snapshot s " +
+              "WHERE s.createdAt<:date " +
+              "AND s.scope=:scope " +
+              "AND s.resourceId=:resourceId " +
+              "ORDER BY s.createdAt DESC")
+          .setParameter("date", s.getCreatedAt())
+          .setParameter("scope", s.getScope())
+          .setParameter("resourceId", s.getResourceId())
+          .setMaxResults(1)
+          .getSingleResult();
+    } catch (NoResultException ex) {
+      return null;
+    }
+  }
+
+  public List<Snapshot> getNextSnapshotsUntilDate(MeasureModel measure, Date date) {
+    Query query = getSession().createQuery(
+        "SELECT s FROM Snapshot s " +
+            "WHERE s.resourceId=:projectId " +
+            "AND s.createdAt>=:beginDate " +
+            (date != null ? "AND s.createdAt<:endDate " : "") +
+            "AND s.scope=:scope " +
+            "ORDER BY s.createdAt ASC ")
+        .setParameter("projectId", measure.getProjectId())
+        .setParameter("beginDate", measure.getMeasureDate())
+        .setParameter("scope", ResourceModel.SCOPE_PROJECT);
+    if (date != null) {
+      query.setParameter("endDate", date);
+    }
+    return query.getResultList();
+  }
+
+  public AsyncMeasureSnapshot createAsyncMeasureSnapshot(Long asyncMeasureId, Integer snapshotId, Date AsyncMeasureDate, Date snapshotDate, Integer metricId, Integer projectId) {
+    AsyncMeasureSnapshot asyncMeasureSnapshot = new AsyncMeasureSnapshot(asyncMeasureId, snapshotId, AsyncMeasureDate, snapshotDate, metricId, projectId);
+    getSession().save(asyncMeasureSnapshot);
+    return asyncMeasureSnapshot;
+  }
+
+  public void updateAsyncMeasureSnapshot(AsyncMeasureSnapshot asyncMeasureSnapshot, Snapshot snapshot) {
+    if (snapshot != null) {
+      asyncMeasureSnapshot.setSnapshotId(snapshot.getId());
+      asyncMeasureSnapshot.setSnapshotDate(snapshot.getCreatedAt());
+    } else {
+      asyncMeasureSnapshot.setSnapshotId(null);
+      asyncMeasureSnapshot.setSnapshotDate(null);
+    }
+    getSession().merge(asyncMeasureSnapshot);
+  }
+
+  public void removeSnapshotFromAsyncMeasureSnapshot(AsyncMeasureSnapshot asyncMeasureSnapshot) {
+    asyncMeasureSnapshot.setSnapshotId(null);
+    asyncMeasureSnapshot.setSnapshotDate(null);
+    getSession().merge(asyncMeasureSnapshot);
+  }
+
+
+  public AsyncMeasureSnapshot getNextAsyncMeasureSnapshot(Integer projetcId, Integer metricId, Date date) {
+    try {
+      return (AsyncMeasureSnapshot) getSession().createQuery(
+          "SELECT ams FROM AsyncMeasureSnapshot ams " +
+              "WHERE ams.projectId=:projectId " +
+              "AND ams.metricId=:metricId " +
+              "AND ams.measureDate>:date " +
+              "ORDER BY ams.measureDate ASC")
+          .setParameter("projectId", projetcId)
+          .setParameter("metricId", metricId)
+          .setParameter("date", date)
+          .setMaxResults(1)
+          .getSingleResult();
+    } catch (NoResultException ex) {
+      return null;
+    }
+  }
+
+  public List<AsyncMeasureSnapshot> getNextAsyncMeasureSnapshotsUntilDate(MeasureModel asyncMeasure, Date endDate) {
+    Query query = getSession().createQuery(
+        "SELECT ams FROM AsyncMeasureSnapshot ams " +
+            "WHERE ams.projectId=:projectId " +
+            "AND ams.metricId=:metricId " +
+            (endDate != null ? "AND ams.measureDate<:endDate " : "") +
+            "AND ams.snapshotDate>=:measureDate " +
+            "ORDER BY ams.snapshotDate ASC ")
+        .setParameter("projectId", asyncMeasure.getProjectId())
+        .setParameter("metricId", asyncMeasure.getMetricId())
+        .setParameter("measureDate", asyncMeasure.getMeasureDate());
+    if (endDate != null) {
+      query.setParameter("endDate", endDate);
+    }
+    return query.getResultList();
+  }
+
+  public List<AsyncMeasureSnapshot> getPreviousAsyncMeasureSnapshots(Integer projectId, Date beginDate, Date endDate) {
+    Query query = getSession().createQuery(
+        "SELECT ams FROM AsyncMeasureSnapshot ams " +
+            "WHERE ams.projectId=:projectId " +
+            "AND ams.measureDate<=:endDate " +
+            (beginDate != null ? "AND ams.measureDate>:beginDate " : "") +
+            "AND ams.snapshotId IS NULL " +
+            "ORDER BY ams.measureDate ASC")
+        .setParameter("projectId", projectId)
+        .setParameter("endDate", endDate);
+    if (beginDate != null) {
+      query.setParameter("beginDate", beginDate);
+    }
+    return query.getResultList();
+  }
+
+  public List<AsyncMeasureSnapshot> getAsyncMeasureSnapshotsFromSnapshotId(Integer snapshotId, List<Integer> metricIdsToExclude) {
+    Query query = getSession().createQuery(
+        "SELECT ams FROM AsyncMeasureSnapshot ams " +
+            "WHERE ams.snapshotId=:snapshotId " +
+            (!metricIdsToExclude.isEmpty() ? "AND ams.metricId NOT IN (:metricIdsToExclude) " : "") +
+            "ORDER BY ams.measureDate ASC")
+        .setParameter("snapshotId", snapshotId);
+    if (!metricIdsToExclude.isEmpty()) {
+      query.setParameter("metricIdsToExclude", metricIdsToExclude);
+    }
+    return query.getResultList();
+  }
+
+  public AsyncMeasureSnapshot getLastAsyncMeasureSnapshot(Integer projetcId, Integer metricId, Date date) {
+    try {
+      return (AsyncMeasureSnapshot) getSession().createQuery(
+          "SELECT ams FROM AsyncMeasureSnapshot ams " +
+              "WHERE ams.projectId=:projectId " +
+              "AND ams.metricId=:metricId " +
+              "AND ams.measureDate<:date " +
+              "ORDER BY ams.measureDate DESC")
+          .setParameter("projectId", projetcId)
+          .setParameter("metricId", metricId)
+          .setParameter("date", date)
+          .setMaxResults(1)
+          .getSingleResult();
+    } catch (NoResultException ex) {
+      return null;
+    }
+  }
+
+  public void deleteAsyncMeasureSnapshots(Long asyncMeasureId) {
+    getSession().createQuery(
+        "DELETE FROM AsyncMeasureSnapshot ams WHERE ams.measureId=:measureId")
+        .setParameter("measureId", asyncMeasureId)
+        .executeUpdate();
+  }
+
+}
index 26b1926b901edf79ee97a98be55d884d951c1a3e..e985ee3c61480a2fb6a193903adb7418b9004fd4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3c5f441bf438225a8824a30dfbbdc0487e725c56..f493c31795ad22024fb4c9cbe748405938373cc1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 078b5c65396da53d97ce9aeb637b2673938ae177..fad86b13ce380840d6918e90f5394457aaad4396 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 77303c1c9baaa4a2fb0a296256532ddb065aee5e..6501e981a32e5e0a5d6c506a808e9f1eb8dd8bc5 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.jpa.dao;\r
-\r
-import org.apache.commons.collections.CollectionUtils;\r
-import org.apache.commons.collections.Predicate;\r
-import org.sonar.api.database.DatabaseSession;\r
-import org.sonar.api.measures.Metric;\r
-\r
-import java.util.*;\r
-\r
-public class MeasuresDao extends BaseDao {\r
-\r
-  private final Map<String, Metric> metricsByName = new HashMap<String, Metric>();\r
-\r
-  public MeasuresDao(DatabaseSession session) {\r
-    super(session);\r
-  }\r
-\r
-  public Metric getMetric(Metric metric) {\r
-    return getMetricsByName().get(metric.getKey());\r
-  }\r
-\r
-  public List<Metric> getMetrics(List<Metric> metrics) {\r
-    List<Metric> result = new ArrayList<Metric>();\r
-    for (Metric metric : metrics) {\r
-      result.add(getMetric(metric));\r
-    }\r
-    return result;\r
-  }\r
-\r
-  public Metric getMetric(String metricName) {\r
-    return getMetricsByName().get(metricName);\r
-  }\r
-\r
-  public Collection<Metric> getMetrics() {\r
-    return getMetricsByName().values();\r
-  }\r
-\r
-  public Collection<Metric> getEnabledMetrics() {\r
-    return CollectionUtils.select(getMetricsByName().values(), new Predicate() {\r
-      public boolean evaluate(Object o) {\r
-        return ((Metric) o).getEnabled();\r
-      }\r
-    });\r
-  }\r
-\r
-  public Collection<Metric> getUserDefinedMetrics() {\r
-    return CollectionUtils.select(getMetricsByName().values(), new Predicate() {\r
-      public boolean evaluate(Object o) {\r
-        Metric m = (Metric) o;\r
-        return (m.getEnabled() && m.getOrigin() != Metric.Origin.JAV);\r
-      }\r
-    });\r
-  }\r
-\r
-  public void disableAutomaticMetrics() {\r
-    getSession().createQuery("update " + Metric.class.getSimpleName() + " m set m.enabled=false where m.userManaged=false").executeUpdate();\r
-    getSession().commit();\r
-    metricsByName.clear();\r
-  }\r
-\r
-  public void registerMetrics(Collection<Metric> metrics) {\r
-    if (metrics != null) {\r
-      for (Metric metric : metrics) {\r
-        metric.setEnabled(Boolean.TRUE);\r
-        persistMetric(metric);\r
-      }\r
-      getSession().commit();\r
-    }\r
-  }\r
-\r
-  public void persistMetric(Metric metric) {\r
-    Metric dbMetric = getMetric(metric);\r
-    if (dbMetric != null) {\r
-      dbMetric.merge(metric);\r
-      getSession().getEntityManager().merge(dbMetric);\r
-\r
-    } else {\r
-      getSession().getEntityManager().persist(metric);\r
-    }\r
-\r
-    metricsByName.clear();\r
-  }\r
-\r
-  public void disabledMetrics(Collection<Metric> metrics) {\r
-    for (Metric metric : metrics) {\r
-      metric.setEnabled(Boolean.FALSE);\r
-      getSession().getEntityManager().persist(metric);\r
-      metricsByName.put(metric.getName(), metric);\r
-    }\r
-  }\r
-\r
-  private Map<String, Metric> getMetricsByName() {\r
-    if (metricsByName.isEmpty()) {\r
-      List<Metric> metrics = getSession().getResults(Metric.class);\r
-      for (Metric metric : metrics) {\r
-        metricsByName.put(metric.getKey(), metric);\r
-      }\r
-    }\r
-    return metricsByName;\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.jpa.dao;
+
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections.Predicate;
+import org.sonar.api.database.DatabaseSession;
+import org.sonar.api.measures.Metric;
+
+import java.util.*;
+
+public class MeasuresDao extends BaseDao {
+
+  private final Map<String, Metric> metricsByName = new HashMap<String, Metric>();
+
+  public MeasuresDao(DatabaseSession session) {
+    super(session);
+  }
+
+  public Metric getMetric(Metric metric) {
+    return getMetricsByName().get(metric.getKey());
+  }
+
+  public List<Metric> getMetrics(List<Metric> metrics) {
+    List<Metric> result = new ArrayList<Metric>();
+    for (Metric metric : metrics) {
+      result.add(getMetric(metric));
+    }
+    return result;
+  }
+
+  public Metric getMetric(String metricName) {
+    return getMetricsByName().get(metricName);
+  }
+
+  public Collection<Metric> getMetrics() {
+    return getMetricsByName().values();
+  }
+
+  public Collection<Metric> getEnabledMetrics() {
+    return CollectionUtils.select(getMetricsByName().values(), new Predicate() {
+      public boolean evaluate(Object o) {
+        return ((Metric) o).getEnabled();
+      }
+    });
+  }
+
+  public Collection<Metric> getUserDefinedMetrics() {
+    return CollectionUtils.select(getMetricsByName().values(), new Predicate() {
+      public boolean evaluate(Object o) {
+        Metric m = (Metric) o;
+        return (m.getEnabled() && m.getOrigin() != Metric.Origin.JAV);
+      }
+    });
+  }
+
+  public void disableAutomaticMetrics() {
+    getSession().createQuery("update " + Metric.class.getSimpleName() + " m set m.enabled=false where m.userManaged=false").executeUpdate();
+    getSession().commit();
+    metricsByName.clear();
+  }
+
+  public void registerMetrics(Collection<Metric> metrics) {
+    if (metrics != null) {
+      for (Metric metric : metrics) {
+        metric.setEnabled(Boolean.TRUE);
+        persistMetric(metric);
+      }
+      getSession().commit();
+    }
+  }
+
+  public void persistMetric(Metric metric) {
+    Metric dbMetric = getMetric(metric);
+    if (dbMetric != null) {
+      dbMetric.merge(metric);
+      getSession().getEntityManager().merge(dbMetric);
+
+    } else {
+      getSession().getEntityManager().persist(metric);
+    }
+
+    metricsByName.clear();
+  }
+
+  public void disabledMetrics(Collection<Metric> metrics) {
+    for (Metric metric : metrics) {
+      metric.setEnabled(Boolean.FALSE);
+      getSession().getEntityManager().persist(metric);
+      metricsByName.put(metric.getName(), metric);
+    }
+  }
+
+  private Map<String, Metric> getMetricsByName() {
+    if (metricsByName.isEmpty()) {
+      List<Metric> metrics = getSession().getResults(Metric.class);
+      for (Metric metric : metrics) {
+        metricsByName.put(metric.getKey(), metric);
+      }
+    }
+    return metricsByName;
+  }
+}
index ba1eb21cf8057e1b047c264c4fd510267c7e1397..86ea45a7aa9cb8c69f779592a0e446502008ec14 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b90e8afe852b4b8a9d19874653e39516101c9aad..4870ad168e7e7ab781c21f8a41ebb967effce237 100644 (file)
@@ -1,65 +1,65 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.jpa.dao;\r
-\r
-import org.sonar.api.database.DatabaseSession;\r
-import org.sonar.api.database.model.RuleFailureModel;\r
-import org.sonar.api.database.model.Snapshot;\r
-import org.sonar.api.profiles.RulesProfile;\r
-import org.sonar.api.rules.ActiveRule;\r
-import org.sonar.api.rules.ActiveRuleParam;\r
-import org.sonar.api.rules.Rule;\r
-import org.sonar.api.rules.RuleParam;\r
-\r
-import java.util.Iterator;\r
-import java.util.List;\r
-\r
-public class RulesDao extends BaseDao {\r
-\r
-  public RulesDao(DatabaseSession session) {\r
-    super(session);\r
-  }\r
-\r
-  public List<Rule> getRules() {\r
-    return getSession().getResults(Rule.class, "enabled", true);\r
-  }\r
-\r
-  public List<Rule> getRulesByRepository(String repositoryKey) {\r
-    return getSession().getResults(Rule.class, "pluginName", repositoryKey, "enabled", true);\r
-  }\r
-\r
-  /**\r
-   * @deprecated since 2.5 use {@link #getRulesByRepository(String)} instead.\r
-   */\r
-  @Deprecated\r
-  public List<Rule> getRulesByPlugin(String pluginKey) {\r
-    return getRulesByRepository(pluginKey);\r
-  }\r
-\r
-  public Rule getRuleByKey(String repositoryKey, String ruleKey) {\r
-    return getSession().getSingleResult(Rule.class, "key", ruleKey, "pluginName", repositoryKey, "enabled", true);\r
-  }\r
-\r
-\r
-  public RuleParam getRuleParam(Rule rule, String paramKey) {\r
-    return getSession().getSingleResult(RuleParam.class, "rule", rule, "key", paramKey);\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.jpa.dao;
+
+import org.sonar.api.database.DatabaseSession;
+import org.sonar.api.database.model.RuleFailureModel;
+import org.sonar.api.database.model.Snapshot;
+import org.sonar.api.profiles.RulesProfile;
+import org.sonar.api.rules.ActiveRule;
+import org.sonar.api.rules.ActiveRuleParam;
+import org.sonar.api.rules.Rule;
+import org.sonar.api.rules.RuleParam;
+
+import java.util.Iterator;
+import java.util.List;
+
+public class RulesDao extends BaseDao {
+
+  public RulesDao(DatabaseSession session) {
+    super(session);
+  }
+
+  public List<Rule> getRules() {
+    return getSession().getResults(Rule.class, "enabled", true);
+  }
+
+  public List<Rule> getRulesByRepository(String repositoryKey) {
+    return getSession().getResults(Rule.class, "pluginName", repositoryKey, "enabled", true);
+  }
+
+  /**
+   * @deprecated since 2.5 use {@link #getRulesByRepository(String)} instead.
+   */
+  @Deprecated
+  public List<Rule> getRulesByPlugin(String pluginKey) {
+    return getRulesByRepository(pluginKey);
+  }
+
+  public Rule getRuleByKey(String repositoryKey, String ruleKey) {
+    return getSession().getSingleResult(Rule.class, "key", ruleKey, "pluginName", repositoryKey, "enabled", true);
+  }
+
+
+  public RuleParam getRuleParam(Rule rule, String paramKey) {
+    return getSession().getSingleResult(RuleParam.class, "rule", rule, "key", paramKey);
+  }
+
+}
index ec54f8f059ab5509e505de8a241f284448da5c33..b0c0ec5614de1c402369bf1e1a78a25f4779d611 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0f860ae4e324da72b9ff8885bda7620304686e0e..8a265b594303b853ec00b4997c945e38e3e115da 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e05c3b92329349abb1f20e5c3a867b8bb3760ea4..48d0633108446101cf44adb375c37e2ab31e59d0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b6bb3a68392cd6f5b34727ed4153346ef2ac43df..b8440a7efa3f5fd6eca3a8b4bdbe404e4414e194 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f59c2ee42401eea8b3f2d99459317bb056a98ba9..8e480719c2ae837c1ae5fa3dcaf28f10067cebee 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 180dec0b1ee48cd5510fe28be6b48fed6e7c991e..694e133579383f086fb858bcd49c6321907a7b38 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ebec6753619249e12346c118c1e503a53c846fba..990e617e1d05e9bb7c408422c3f1bfc22143d0c0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7fa1abfa2d11a755c4a89ca12b198bb9a9cbb7e8..b62af9d9b45bdd4df87df5e9c42753186bd086a5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 12094ba074574a405468bcaca668f016a73681ff..a04390c2b3e882d9bf49f05346c062270615eb35 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7d7318e51ebf31889ca7a1140dc40d6bcc9c7376..b7741722b9da7b5202dc0e77be0c8349782795f3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 921cbcab6d3b8a0bc85a3269ec2a757fb03542c5..f4c958a145219072f49b889d5424b55268689a90 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6f90114d5a8ef6232f5a7de585dff66e69b29c39..28dd8140c9beef20293125785055f7456115ee71 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9ea59cd7b8920c8ebcbf1ed41eb88a258cf4e643..3dcc9908278eb157e4352a229452c0fd6f8a1a9c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8612b5c3f03c40b846413de8235f5afa47df50ca..d2298d8d8ab33b19f7be061e1e257a3d9fc12098 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 93aa1191504caca465517e80959e26dbe192d26c..72abcf6755a45a799bbddfa4cd6ce1d838eb244c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 46ec6d5cf26a02f17f8c93559a6d8c9d4b845521..e8ae03ef3368b7d3fcdc8d502a569cfa5e82ce91 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8257f4c5cb22858da7210c2d894960c4601d0aab..06feec22d5ee239a98bef0835a5af639bdb2815d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8ea912e1b792dc7119147264ecbc778f4efaac57..8236ca120d2a758ac068e33cc370b5c764986ec1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 151284a4d6782b1a935e5132405559b45e03b7a1..d30892f14b4317a7830c499763ec4617fd55318e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5a3501176704392929e57bce527317e5e22a8862..b407bacfe2a4bd94554de5372fb959413cace969 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5d00ddb02df8917af3471b7b53c1f45d5f768fb9..5e9cfa2f09f6ded7cda80cda64ae8f4c7c67c093 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8bd845565b2c16505c28b3c6bce805c2dfb29a88..66a0581b319d97438257a601da8bfaf0dddc694e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 26a54faedff44173a39690083ac9458a8960cbe3..74c8b41a4911e269107ee1cb291238318de82bdb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a856d0729fdc3d7e326aa473973a1b983c01a92b..c7739d0a278ba2381473f544e90ff7e3f8ced534 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bf5876dec33e2a24149f8025a8a490b88aa39c12..0f69e2624b0231977baa5c607297fed644cb8ffc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 001ca44f69038e314fa7dbda11ec3fb56db03502..675567e85b7ac27e3fec68f857691ad6073dfe2e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a67fd0cf71303f4e0f77dd9b16e1926d10608a82..813740c7e6ca074bf009f2a708fbe17317bcad68 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0eb9d239161afa541c1a59db8af39f78fcf4bb24..33d76615ad078829fd1984fc0ab14c307d27025f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9a6cec853c55b6bb95f1e1b8abb81a3a5bc31c71..cfb615d5da57b6c8e2dcb5796a7fcfcfaca15d58 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 222bf4053edd873979dd429f54cbd355be656238..0b96ed82e26e1ef9e1ceee6c14d7dcb63a8abe8c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7d2c2b8176aa6112b8f50c8f686bf270db13c16b..0d5ce6b71b9b17592391be5c5b964893a8fb1c65 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b614dfbe8d2553b8f6e525f6724fd15fe8fae386..5e45216c2cac7616625bad68792aa9b1cd88d923 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6e1aa0d93dea0486649b58be7c0dc085b7343311..475e469851ec7c7defec8f9d78e136dd642eed0e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 878c492c89bebd2162573b4731dccc12b10d4517..48492ca30fe247cf06a2259d4a0119482fdc5992 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6a6d3cad2ca8be5808058d67936c0870062fe047..0698e5c9bd11f0379473e345611d81ad8745db87 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3c70c3fd62ca21732ed0edf9b09f1793160578a4..ea86260a583c81e99df96f4a1145fb3776960822 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.jpa.dao;\r
-\r
-import org.junit.Test;\r
-import org.sonar.api.database.model.AsyncMeasureSnapshot;\r
-import org.sonar.api.database.model.MeasureModel;\r
-import org.sonar.api.database.model.ResourceModel;\r
-import org.sonar.api.database.model.Snapshot;\r
-import org.sonar.jpa.test.AbstractDbUnitTestCase;\r
-\r
-import java.text.ParseException;\r
-import java.text.SimpleDateFormat;\r
-import java.util.Arrays;\r
-import java.util.Date;\r
-import java.util.List;\r
-\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-\r
-public class AsyncMeasuresDaoTest extends AbstractDbUnitTestCase {\r
-\r
-  private static final int PROJECT_ID = 1;\r
-  private static final int METRIC_ID = 1;\r
-\r
-  @Test\r
-  public void testGetNextAsyncMeasureSnapshot() {\r
-    setupData("sharedFixture", "testGetNextAsyncMeasureSnapshot");\r
-\r
-    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());\r
-    AsyncMeasureSnapshot asyncMeasure = asyncMeasuresDao.getNextAsyncMeasureSnapshot(\r
-        PROJECT_ID, METRIC_ID, stringToDate("2008-12-04 08:00:00.00"));\r
-\r
-    assertThat(asyncMeasure.getId(), is(3));\r
-  }\r
-\r
-  @Test\r
-  public void testGetNextSnapshotsUntilDate() {\r
-    setupData("sharedFixture", "testGetNextSnapshotsUntilDate");\r
-\r
-    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());\r
-    MeasureModel asyncMeasure = getSession().getEntityManager().find(MeasureModel.class, 1l);\r
-    List<Snapshot> snapshotIds = asyncMeasuresDao.getNextSnapshotsUntilDate(\r
-        asyncMeasure, stringToDate("2008-12-06 12:00:00.00"));\r
-\r
-    assertThat(snapshotIds.size(), is(2));\r
-    assertThat(snapshotIds.get(0).getId(), is(2));\r
-    assertThat(snapshotIds.get(1).getId(), is(4));\r
-  }\r
-\r
-  @Test\r
-  public void testGetPreviousSnapshot() {\r
-    setupData("sharedFixture", "testGetPreviousSnapshot");\r
-    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());\r
-    Snapshot s = new Snapshot();\r
-    s.setCreatedAt(stringToDate("2008-12-04 08:00:00.00"));\r
-    s.setScope(ResourceModel.SCOPE_PROJECT);\r
-    ResourceModel resource1 = getSession().getEntity(ResourceModel.class, 1);\r
-    ResourceModel resource2 = getSession().getEntity(ResourceModel.class, 2);\r
-\r
-    s.setResource(resource1);\r
-    assertThat(asyncMeasuresDao.getPreviousSnapshot(s).getId(), is(1));\r
-\r
-    s.setResource(resource2);\r
-    assertThat(asyncMeasuresDao.getPreviousSnapshot(s).getId(), is(5));\r
-  }\r
-\r
-  @Test\r
-  public void testGetNextAsyncMeasureSnapshotsUntilDate() {\r
-    setupData("sharedFixture", "testGetNextAsyncMeasureSnapshotsUntilDate");\r
-\r
-    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());\r
-    MeasureModel asyncMeasure = getSession().getEntityManager().find(MeasureModel.class, 3l);\r
-    List<AsyncMeasureSnapshot> asyncMeasureSnapshots = asyncMeasuresDao.getNextAsyncMeasureSnapshotsUntilDate(\r
-        asyncMeasure, stringToDate("2008-12-06 08:00:00.00"));\r
-\r
-    assertThat(asyncMeasureSnapshots.size(), is(2));\r
-    assertThat(asyncMeasureSnapshots.get(0).getId(), is(2));\r
-    assertThat(asyncMeasureSnapshots.get(1).getId(), is(3));\r
-  }\r
-\r
-  @Test\r
-  public void testDeleteAsyncMeasure() {\r
-    setupData("sharedFixture", "testDeleteAsyncMeasure");\r
-\r
-    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());\r
-    MeasureModel asyncMeasure = getSession().getEntityManager().find(MeasureModel.class, 1l);\r
-    asyncMeasuresDao.deleteAsyncMeasure(asyncMeasure);\r
-\r
-    getSession().commit();\r
-    checkTables("testDeleteAsyncMeasure", "project_measures", "async_measure_snapshots");\r
-  }\r
-\r
-  @Test\r
-  public void testGetAsyncMeasureSnapshotsFromSnapshotId() {\r
-    setupData("sharedFixture", "testGetAsyncMeasureSnapshotsFromSnapshotId");\r
-\r
-    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());\r
-    Integer snapshotId = 1;\r
-    List<AsyncMeasureSnapshot> asyncMeasureSnapshots = asyncMeasuresDao.getAsyncMeasureSnapshotsFromSnapshotId(\r
-        snapshotId, Arrays.asList(1));\r
-    assertThat(asyncMeasureSnapshots.size(), is(1));\r
-    assertThat(asyncMeasureSnapshots.get(0).getId(), is(2));\r
-  }\r
-\r
-  @Test\r
-  public void testGetLastAsyncMeasureSnapshot() {\r
-    setupData("sharedFixture", "testGetLastAsyncMeasureSnapshot");\r
-\r
-    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());\r
-    AsyncMeasureSnapshot asyncMeasureSnapshot = asyncMeasuresDao.getLastAsyncMeasureSnapshot(\r
-        PROJECT_ID, METRIC_ID, stringToDate("2008-12-04 12:00:00.00"));\r
-    assertThat(asyncMeasureSnapshot.getId(), is(2));\r
-  }\r
-\r
-  @Test\r
-  public void testDeleteAsyncMeasureSnapshots() {\r
-    setupData("sharedFixture", "testDeleteAsyncMeasureSnapshots");\r
-\r
-    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());\r
-    asyncMeasuresDao.deleteAsyncMeasureSnapshots(1l);\r
-\r
-    checkTables("testDeleteAsyncMeasureSnapshots", "async_measure_snapshots");\r
-  }\r
-\r
-  @Test\r
-  public void testGetPreviousAsyncMeasureSnapshots() {\r
-    setupData("sharedFixture", "testGetPreviousAsyncMeasureSnapshots");\r
-\r
-    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());\r
-    List<AsyncMeasureSnapshot> asyncMeasureSnapshots = asyncMeasuresDao.getPreviousAsyncMeasureSnapshots(\r
-        PROJECT_ID, stringToDate("2008-12-04 08:00:00.00"), stringToDate("2008-12-08 08:00:00.00"));\r
-    assertThat(asyncMeasureSnapshots.size(), is(2));\r
-    assertThat(asyncMeasureSnapshots.get(0).getId(), is(5));\r
-    assertThat(asyncMeasureSnapshots.get(1).getId(), is(6));\r
-  }\r
-\r
-\r
-  private static Date stringToDate(String sDate) {\r
-    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SS");\r
-    try {\r
-      return sdf.parse(sDate);\r
-    } catch (ParseException e) {\r
-      throw new RuntimeException("Bad date format.");\r
-    }\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.jpa.dao;
+
+import org.junit.Test;
+import org.sonar.api.database.model.AsyncMeasureSnapshot;
+import org.sonar.api.database.model.MeasureModel;
+import org.sonar.api.database.model.ResourceModel;
+import org.sonar.api.database.model.Snapshot;
+import org.sonar.jpa.test.AbstractDbUnitTestCase;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class AsyncMeasuresDaoTest extends AbstractDbUnitTestCase {
+
+  private static final int PROJECT_ID = 1;
+  private static final int METRIC_ID = 1;
+
+  @Test
+  public void testGetNextAsyncMeasureSnapshot() {
+    setupData("sharedFixture", "testGetNextAsyncMeasureSnapshot");
+
+    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
+    AsyncMeasureSnapshot asyncMeasure = asyncMeasuresDao.getNextAsyncMeasureSnapshot(
+        PROJECT_ID, METRIC_ID, stringToDate("2008-12-04 08:00:00.00"));
+
+    assertThat(asyncMeasure.getId(), is(3));
+  }
+
+  @Test
+  public void testGetNextSnapshotsUntilDate() {
+    setupData("sharedFixture", "testGetNextSnapshotsUntilDate");
+
+    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
+    MeasureModel asyncMeasure = getSession().getEntityManager().find(MeasureModel.class, 1l);
+    List<Snapshot> snapshotIds = asyncMeasuresDao.getNextSnapshotsUntilDate(
+        asyncMeasure, stringToDate("2008-12-06 12:00:00.00"));
+
+    assertThat(snapshotIds.size(), is(2));
+    assertThat(snapshotIds.get(0).getId(), is(2));
+    assertThat(snapshotIds.get(1).getId(), is(4));
+  }
+
+  @Test
+  public void testGetPreviousSnapshot() {
+    setupData("sharedFixture", "testGetPreviousSnapshot");
+    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
+    Snapshot s = new Snapshot();
+    s.setCreatedAt(stringToDate("2008-12-04 08:00:00.00"));
+    s.setScope(ResourceModel.SCOPE_PROJECT);
+    ResourceModel resource1 = getSession().getEntity(ResourceModel.class, 1);
+    ResourceModel resource2 = getSession().getEntity(ResourceModel.class, 2);
+
+    s.setResource(resource1);
+    assertThat(asyncMeasuresDao.getPreviousSnapshot(s).getId(), is(1));
+
+    s.setResource(resource2);
+    assertThat(asyncMeasuresDao.getPreviousSnapshot(s).getId(), is(5));
+  }
+
+  @Test
+  public void testGetNextAsyncMeasureSnapshotsUntilDate() {
+    setupData("sharedFixture", "testGetNextAsyncMeasureSnapshotsUntilDate");
+
+    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
+    MeasureModel asyncMeasure = getSession().getEntityManager().find(MeasureModel.class, 3l);
+    List<AsyncMeasureSnapshot> asyncMeasureSnapshots = asyncMeasuresDao.getNextAsyncMeasureSnapshotsUntilDate(
+        asyncMeasure, stringToDate("2008-12-06 08:00:00.00"));
+
+    assertThat(asyncMeasureSnapshots.size(), is(2));
+    assertThat(asyncMeasureSnapshots.get(0).getId(), is(2));
+    assertThat(asyncMeasureSnapshots.get(1).getId(), is(3));
+  }
+
+  @Test
+  public void testDeleteAsyncMeasure() {
+    setupData("sharedFixture", "testDeleteAsyncMeasure");
+
+    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
+    MeasureModel asyncMeasure = getSession().getEntityManager().find(MeasureModel.class, 1l);
+    asyncMeasuresDao.deleteAsyncMeasure(asyncMeasure);
+
+    getSession().commit();
+    checkTables("testDeleteAsyncMeasure", "project_measures", "async_measure_snapshots");
+  }
+
+  @Test
+  public void testGetAsyncMeasureSnapshotsFromSnapshotId() {
+    setupData("sharedFixture", "testGetAsyncMeasureSnapshotsFromSnapshotId");
+
+    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
+    Integer snapshotId = 1;
+    List<AsyncMeasureSnapshot> asyncMeasureSnapshots = asyncMeasuresDao.getAsyncMeasureSnapshotsFromSnapshotId(
+        snapshotId, Arrays.asList(1));
+    assertThat(asyncMeasureSnapshots.size(), is(1));
+    assertThat(asyncMeasureSnapshots.get(0).getId(), is(2));
+  }
+
+  @Test
+  public void testGetLastAsyncMeasureSnapshot() {
+    setupData("sharedFixture", "testGetLastAsyncMeasureSnapshot");
+
+    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
+    AsyncMeasureSnapshot asyncMeasureSnapshot = asyncMeasuresDao.getLastAsyncMeasureSnapshot(
+        PROJECT_ID, METRIC_ID, stringToDate("2008-12-04 12:00:00.00"));
+    assertThat(asyncMeasureSnapshot.getId(), is(2));
+  }
+
+  @Test
+  public void testDeleteAsyncMeasureSnapshots() {
+    setupData("sharedFixture", "testDeleteAsyncMeasureSnapshots");
+
+    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
+    asyncMeasuresDao.deleteAsyncMeasureSnapshots(1l);
+
+    checkTables("testDeleteAsyncMeasureSnapshots", "async_measure_snapshots");
+  }
+
+  @Test
+  public void testGetPreviousAsyncMeasureSnapshots() {
+    setupData("sharedFixture", "testGetPreviousAsyncMeasureSnapshots");
+
+    AsyncMeasuresDao asyncMeasuresDao = new AsyncMeasuresDao(getSession());
+    List<AsyncMeasureSnapshot> asyncMeasureSnapshots = asyncMeasuresDao.getPreviousAsyncMeasureSnapshots(
+        PROJECT_ID, stringToDate("2008-12-04 08:00:00.00"), stringToDate("2008-12-08 08:00:00.00"));
+    assertThat(asyncMeasureSnapshots.size(), is(2));
+    assertThat(asyncMeasureSnapshots.get(0).getId(), is(5));
+    assertThat(asyncMeasureSnapshots.get(1).getId(), is(6));
+  }
+
+
+  private static Date stringToDate(String sDate) {
+    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SS");
+    try {
+      return sdf.parse(sDate);
+    } catch (ParseException e) {
+      throw new RuntimeException("Bad date format.");
+    }
+  }
+
+}
index 9ef3ad410340a1fb449adfa47c5a70e6a0cff4aa..7b936b5ee9f0e44bd2ee62f21fe22583db64b534 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.jpa.dao;\r
-\r
-import org.junit.Test;\r
-import org.sonar.api.database.model.Snapshot;\r
-import org.sonar.jpa.test.AbstractDbUnitTestCase;\r
-\r
-public class AsyncMeasuresServiceTest extends AbstractDbUnitTestCase {\r
-\r
-  @Test\r
-  public void assignLatestMeasuresToLastSnapshot() {\r
-    setupData("sharedFixture", "assignLatestMeasuresToLastSnapshot");\r
-\r
-    AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());\r
-    Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 2);\r
-    asyncMeasuresService.refresh(snapshot);\r
-\r
-    checkTables("assignLatestMeasuresToLastSnapshot", "async_measure_snapshots");\r
-  }\r
-\r
-  @Test\r
-  public void assignNewMeasuresToLastSnapshot() {\r
-    setupData("sharedFixture", "assignNewMeasuresToLastSnapshot");\r
-\r
-    AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());\r
-    Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 2);\r
-    asyncMeasuresService.refresh(snapshot);\r
-\r
-    checkTables("assignNewMeasuresToLastSnapshot", "async_measure_snapshots");\r
-  }\r
-\r
-  @Test\r
-  public void assignMeasuresWhenNoPreviousSnapshot() {\r
-    setupData("sharedFixture", "assignMeasuresWhenNoPreviousSnapshot");\r
-\r
-    AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());\r
-    Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 1);\r
-    asyncMeasuresService.refresh(snapshot);\r
-\r
-    checkTables("assignMeasuresWhenNoPreviousSnapshot", "async_measure_snapshots");\r
-  }\r
-\r
-  @Test\r
-  public void assignLatestMeasuresWhenNoPreviousSnapshot() {\r
-    setupData("sharedFixture", "assignLatestMeasuresWhenNoPreviousSnapshot");\r
-\r
-    AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());\r
-    Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 1);\r
-    asyncMeasuresService.refresh(snapshot);\r
-\r
-    checkTables("assignLatestMeasuresWhenNoPreviousSnapshot", "async_measure_snapshots");\r
-  }\r
-\r
-  @Test\r
-  public void assignPastMeasuresToPastSnapshot() {\r
-    setupData("sharedFixture", "assignPastMeasuresToPastSnapshot");\r
-\r
-    AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());\r
-    Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 3);\r
-    asyncMeasuresService.refresh(snapshot);\r
-\r
-    checkTables("assignPastMeasuresToPastSnapshot", "async_measure_snapshots");\r
-  }\r
-\r
-  @Test\r
-  public void assignNewMeasureToFutureSnapshots() {\r
-    setupData("sharedFixture", "assignNewMeasureToFutureSnapshots");\r
-\r
-    AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());\r
-    asyncMeasuresService.registerMeasure(2l);\r
-\r
-    checkTables("assignNewMeasureToFutureSnapshots", "async_measure_snapshots");\r
-  }\r
-\r
-  @Test\r
-  public void assignMeasureToFutureSnapshotsWithDifferentMetric() {\r
-    setupData("sharedFixture", "assignMeasureToFutureSnapshotsWithDifferentMetric");\r
-\r
-    AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());\r
-    asyncMeasureService.registerMeasure(3l);\r
-\r
-    checkTables("assignMeasureToFutureSnapshotsWithDifferentMetric", "async_measure_snapshots");\r
-  }\r
-\r
-  @Test\r
-  public void assignAPastMeasureToNextSnapshotsWithDifferentMetric() {\r
-    setupData("sharedFixture", "assignAPastMeasureToNextSnapshotsWithDifferentMetric");\r
-\r
-    AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());\r
-    asyncMeasureService.registerMeasure(2l);\r
-\r
-    checkTables("assignAPastMeasureToNextSnapshotsWithDifferentMetric", "async_measure_snapshots");\r
-  }\r
-\r
-  @Test\r
-  public void addFutureSnapshot() {\r
-    setupData("sharedFixture", "addFutureSnapshot");\r
-\r
-    AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());\r
-    asyncMeasureService.registerMeasure(2l);\r
-\r
-    checkTables("addFutureSnapshot", "async_measure_snapshots");\r
-  }\r
-\r
-  @Test\r
-  public void addInvisibleMeasure() {\r
-    setupData("sharedFixture", "addInvisibleMeasure");\r
-\r
-    AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());\r
-    asyncMeasureService.registerMeasure(2l);\r
-\r
-    checkTables("addInvisibleMeasure", "async_measure_snapshots");\r
-  }\r
-\r
-  @Test\r
-  public void deleteMeasure() {\r
-    setupData("sharedFixture", "deleteMeasure");\r
-\r
-    AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());\r
-    asyncMeasureService.deleteMeasure(2l);\r
-\r
-    checkTables("deleteMeasure", "async_measure_snapshots");\r
-  }\r
-\r
-  @Test\r
-  public void deleteLastMeasure() {\r
-    setupData("sharedFixture", "deleteLastMeasure");\r
-\r
-    AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());\r
-    asyncMeasureService.deleteMeasure(1l);\r
-\r
-    checkTables("deleteLastMeasure", "async_measure_snapshots");\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.jpa.dao;
+
+import org.junit.Test;
+import org.sonar.api.database.model.Snapshot;
+import org.sonar.jpa.test.AbstractDbUnitTestCase;
+
+public class AsyncMeasuresServiceTest extends AbstractDbUnitTestCase {
+
+  @Test
+  public void assignLatestMeasuresToLastSnapshot() {
+    setupData("sharedFixture", "assignLatestMeasuresToLastSnapshot");
+
+    AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
+    Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 2);
+    asyncMeasuresService.refresh(snapshot);
+
+    checkTables("assignLatestMeasuresToLastSnapshot", "async_measure_snapshots");
+  }
+
+  @Test
+  public void assignNewMeasuresToLastSnapshot() {
+    setupData("sharedFixture", "assignNewMeasuresToLastSnapshot");
+
+    AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
+    Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 2);
+    asyncMeasuresService.refresh(snapshot);
+
+    checkTables("assignNewMeasuresToLastSnapshot", "async_measure_snapshots");
+  }
+
+  @Test
+  public void assignMeasuresWhenNoPreviousSnapshot() {
+    setupData("sharedFixture", "assignMeasuresWhenNoPreviousSnapshot");
+
+    AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
+    Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 1);
+    asyncMeasuresService.refresh(snapshot);
+
+    checkTables("assignMeasuresWhenNoPreviousSnapshot", "async_measure_snapshots");
+  }
+
+  @Test
+  public void assignLatestMeasuresWhenNoPreviousSnapshot() {
+    setupData("sharedFixture", "assignLatestMeasuresWhenNoPreviousSnapshot");
+
+    AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
+    Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 1);
+    asyncMeasuresService.refresh(snapshot);
+
+    checkTables("assignLatestMeasuresWhenNoPreviousSnapshot", "async_measure_snapshots");
+  }
+
+  @Test
+  public void assignPastMeasuresToPastSnapshot() {
+    setupData("sharedFixture", "assignPastMeasuresToPastSnapshot");
+
+    AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
+    Snapshot snapshot = getSession().getEntityManager().find(Snapshot.class, 3);
+    asyncMeasuresService.refresh(snapshot);
+
+    checkTables("assignPastMeasuresToPastSnapshot", "async_measure_snapshots");
+  }
+
+  @Test
+  public void assignNewMeasureToFutureSnapshots() {
+    setupData("sharedFixture", "assignNewMeasureToFutureSnapshots");
+
+    AsyncMeasuresService asyncMeasuresService = new AsyncMeasuresService(getSession());
+    asyncMeasuresService.registerMeasure(2l);
+
+    checkTables("assignNewMeasureToFutureSnapshots", "async_measure_snapshots");
+  }
+
+  @Test
+  public void assignMeasureToFutureSnapshotsWithDifferentMetric() {
+    setupData("sharedFixture", "assignMeasureToFutureSnapshotsWithDifferentMetric");
+
+    AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
+    asyncMeasureService.registerMeasure(3l);
+
+    checkTables("assignMeasureToFutureSnapshotsWithDifferentMetric", "async_measure_snapshots");
+  }
+
+  @Test
+  public void assignAPastMeasureToNextSnapshotsWithDifferentMetric() {
+    setupData("sharedFixture", "assignAPastMeasureToNextSnapshotsWithDifferentMetric");
+
+    AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
+    asyncMeasureService.registerMeasure(2l);
+
+    checkTables("assignAPastMeasureToNextSnapshotsWithDifferentMetric", "async_measure_snapshots");
+  }
+
+  @Test
+  public void addFutureSnapshot() {
+    setupData("sharedFixture", "addFutureSnapshot");
+
+    AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
+    asyncMeasureService.registerMeasure(2l);
+
+    checkTables("addFutureSnapshot", "async_measure_snapshots");
+  }
+
+  @Test
+  public void addInvisibleMeasure() {
+    setupData("sharedFixture", "addInvisibleMeasure");
+
+    AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
+    asyncMeasureService.registerMeasure(2l);
+
+    checkTables("addInvisibleMeasure", "async_measure_snapshots");
+  }
+
+  @Test
+  public void deleteMeasure() {
+    setupData("sharedFixture", "deleteMeasure");
+
+    AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
+    asyncMeasureService.deleteMeasure(2l);
+
+    checkTables("deleteMeasure", "async_measure_snapshots");
+  }
+
+  @Test
+  public void deleteLastMeasure() {
+    setupData("sharedFixture", "deleteLastMeasure");
+
+    AsyncMeasuresService asyncMeasureService = new AsyncMeasuresService(getSession());
+    asyncMeasureService.deleteMeasure(1l);
+
+    checkTables("deleteLastMeasure", "async_measure_snapshots");
+  }
+
+}
index 5502905e5e6e0114bd4eab83a1da13f9b1b6cc35..e0a98be7b7c7eaab30b7226835ff5587f99b1147 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.jpa.dao;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.sonar.api.database.model.ResourceModel;\r
-import org.sonar.api.measures.Metric;\r
-import org.sonar.jpa.test.AbstractDbUnitTestCase;\r
-\r
-import java.util.Arrays;\r
-import java.util.Collection;\r
-\r
-import static org.hamcrest.Matchers.is;\r
-import static org.hamcrest.Matchers.not;\r
-import static org.junit.Assert.assertThat;\r
-\r
-public class MeasuresDaoTest extends AbstractDbUnitTestCase {\r
-\r
-  private MeasuresDao service;\r
-  private ResourceModel project;\r
-\r
-  @Before\r
-  public void before() throws Exception {\r
-    service = new MeasuresDao(getSession());\r
-    project = new ResourceModel(ResourceModel.SCOPE_PROJECT, "foo:bar", ResourceModel.QUALIFIER_PROJECT_TRUNK, null, "Foo");\r
-    project.setName("project name");\r
-    getSession().save(project);\r
-  }\r
-\r
-  @Test\r
-  public void shouldReturnUserDefinedMetrics() {\r
-    for (Metric metric : createMetrics()) {\r
-      getSession().save(metric);\r
-    }\r
-\r
-    Collection<Metric> metrics = service.getUserDefinedMetrics();\r
-    assertThat(metrics.size(), is(2));\r
-    for (Metric metric : metrics) {\r
-      assertThat(metric.getOrigin(), not(Metric.Origin.JAV));\r
-    }\r
-  }\r
-\r
-  @Test\r
-  public void shouldRegisterMetrics() {\r
-    Collection<Metric> newMetrics = createMetrics();\r
-    service.registerMetrics(newMetrics);\r
-\r
-    Collection<Metric> metrics = service.getEnabledMetrics();\r
-    assertThat(metrics.size(), is(newMetrics.size()));\r
-  }\r
-\r
-  @Test\r
-  public void shouldDisabledMetrics() {\r
-    Collection<Metric> newMetrics = createMetrics();\r
-\r
-    service.disabledMetrics(newMetrics);\r
-\r
-    Collection<Metric> allMetrics = service.getMetrics();\r
-    assertThat(allMetrics.size(), is(newMetrics.size()));\r
-\r
-    Collection<Metric> disabledMetrics = service.getEnabledMetrics();\r
-    assertThat(disabledMetrics.size(), is(0));\r
-  }\r
-\r
-\r
-  private Collection<Metric> createMetrics() {\r
-    Metric m1 = new Metric("metric1");\r
-    m1.setEnabled(false);\r
-    m1.setOrigin(Metric.Origin.JAV);\r
-\r
-    Metric m2 = new Metric("metric2");\r
-    m2.setEnabled(true);\r
-    m2.setOrigin(Metric.Origin.JAV);\r
-\r
-    Metric m3 = new Metric("metric3");\r
-    m3.setEnabled(false);\r
-    m3.setOrigin(Metric.Origin.GUI);\r
-\r
-    Metric m4 = new Metric("metric4");\r
-    m4.setEnabled(true);\r
-    m4.setOrigin(Metric.Origin.GUI);\r
-\r
-    Metric m5 = new Metric("metric5");\r
-    m5.setEnabled(true);\r
-    m5.setOrigin(Metric.Origin.WS);\r
-\r
-    return Arrays.asList(m1, m2, m3, m4, m5);\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.jpa.dao;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.sonar.api.database.model.ResourceModel;
+import org.sonar.api.measures.Metric;
+import org.sonar.jpa.test.AbstractDbUnitTestCase;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.not;
+import static org.junit.Assert.assertThat;
+
+public class MeasuresDaoTest extends AbstractDbUnitTestCase {
+
+  private MeasuresDao service;
+  private ResourceModel project;
+
+  @Before
+  public void before() throws Exception {
+    service = new MeasuresDao(getSession());
+    project = new ResourceModel(ResourceModel.SCOPE_PROJECT, "foo:bar", ResourceModel.QUALIFIER_PROJECT_TRUNK, null, "Foo");
+    project.setName("project name");
+    getSession().save(project);
+  }
+
+  @Test
+  public void shouldReturnUserDefinedMetrics() {
+    for (Metric metric : createMetrics()) {
+      getSession().save(metric);
+    }
+
+    Collection<Metric> metrics = service.getUserDefinedMetrics();
+    assertThat(metrics.size(), is(2));
+    for (Metric metric : metrics) {
+      assertThat(metric.getOrigin(), not(Metric.Origin.JAV));
+    }
+  }
+
+  @Test
+  public void shouldRegisterMetrics() {
+    Collection<Metric> newMetrics = createMetrics();
+    service.registerMetrics(newMetrics);
+
+    Collection<Metric> metrics = service.getEnabledMetrics();
+    assertThat(metrics.size(), is(newMetrics.size()));
+  }
+
+  @Test
+  public void shouldDisabledMetrics() {
+    Collection<Metric> newMetrics = createMetrics();
+
+    service.disabledMetrics(newMetrics);
+
+    Collection<Metric> allMetrics = service.getMetrics();
+    assertThat(allMetrics.size(), is(newMetrics.size()));
+
+    Collection<Metric> disabledMetrics = service.getEnabledMetrics();
+    assertThat(disabledMetrics.size(), is(0));
+  }
+
+
+  private Collection<Metric> createMetrics() {
+    Metric m1 = new Metric("metric1");
+    m1.setEnabled(false);
+    m1.setOrigin(Metric.Origin.JAV);
+
+    Metric m2 = new Metric("metric2");
+    m2.setEnabled(true);
+    m2.setOrigin(Metric.Origin.JAV);
+
+    Metric m3 = new Metric("metric3");
+    m3.setEnabled(false);
+    m3.setOrigin(Metric.Origin.GUI);
+
+    Metric m4 = new Metric("metric4");
+    m4.setEnabled(true);
+    m4.setOrigin(Metric.Origin.GUI);
+
+    Metric m5 = new Metric("metric5");
+    m5.setEnabled(true);
+    m5.setOrigin(Metric.Origin.WS);
+
+    return Arrays.asList(m1, m2, m3, m4, m5);
+  }
+}
index 0b821d51dc2f411ccfce14c1c22e4688639b590d..38049f3416c867befaadefa52f10e19b2f4d8634 100644 (file)
@@ -1,58 +1,58 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.jpa.dao;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.sonar.api.database.model.ResourceModel;\r
-import org.sonar.api.profiles.RulesProfile;\r
-import org.sonar.jpa.test.AbstractDbUnitTestCase;\r
-\r
-import static org.junit.Assert.assertEquals;\r
-import static org.junit.Assert.assertNull;\r
-\r
-public class ProfilesDaoTest extends AbstractDbUnitTestCase {\r
-\r
-  private ProfilesDao profilesDao;\r
-\r
-  @Before\r
-  public void setup() {\r
-    profilesDao = new ProfilesDao(getSession());\r
-  }\r
-\r
-\r
-  @Test\r
-  public void testGetActiveProfile() {\r
-    RulesProfile testDefaultProfile = new RulesProfile("default", "java", true, true);\r
-    RulesProfile testProfile = new RulesProfile("not default", "java", false, false);\r
-    getSession().save(testDefaultProfile, testProfile);\r
-\r
-    ResourceModel testResourceWithProfile = new ResourceModel(ResourceModel.SCOPE_PROJECT, "withProfile", "qual", null, "test");\r
-    testResourceWithProfile.setRulesProfile(testProfile);\r
-    ResourceModel testResourceWithNoProfile = new ResourceModel(ResourceModel.SCOPE_PROJECT, "withoutProfile", "qual", null, "test");\r
-    getSession().save(testResourceWithProfile, testResourceWithNoProfile);\r
-\r
-    assertNull(profilesDao.getActiveProfile("wrongLanguage", "withoutProfile"));\r
-    assertEquals(testDefaultProfile.getId(), profilesDao.getActiveProfile("java", "wrongKey").getId());\r
-    assertEquals(testDefaultProfile.getId(), profilesDao.getActiveProfile("java", "withoutProfile").getId());\r
-    assertEquals(testProfile.getId(), profilesDao.getActiveProfile("java", "withProfile").getId());\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.jpa.dao;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.sonar.api.database.model.ResourceModel;
+import org.sonar.api.profiles.RulesProfile;
+import org.sonar.jpa.test.AbstractDbUnitTestCase;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+public class ProfilesDaoTest extends AbstractDbUnitTestCase {
+
+  private ProfilesDao profilesDao;
+
+  @Before
+  public void setup() {
+    profilesDao = new ProfilesDao(getSession());
+  }
+
+
+  @Test
+  public void testGetActiveProfile() {
+    RulesProfile testDefaultProfile = new RulesProfile("default", "java", true, true);
+    RulesProfile testProfile = new RulesProfile("not default", "java", false, false);
+    getSession().save(testDefaultProfile, testProfile);
+
+    ResourceModel testResourceWithProfile = new ResourceModel(ResourceModel.SCOPE_PROJECT, "withProfile", "qual", null, "test");
+    testResourceWithProfile.setRulesProfile(testProfile);
+    ResourceModel testResourceWithNoProfile = new ResourceModel(ResourceModel.SCOPE_PROJECT, "withoutProfile", "qual", null, "test");
+    getSession().save(testResourceWithProfile, testResourceWithNoProfile);
+
+    assertNull(profilesDao.getActiveProfile("wrongLanguage", "withoutProfile"));
+    assertEquals(testDefaultProfile.getId(), profilesDao.getActiveProfile("java", "wrongKey").getId());
+    assertEquals(testDefaultProfile.getId(), profilesDao.getActiveProfile("java", "withoutProfile").getId());
+    assertEquals(testProfile.getId(), profilesDao.getActiveProfile("java", "withProfile").getId());
+  }
+
+}
index 7d1b0e97a64f0154c7ab789a49595605a4256a38..f17496a6d554538dfc01c4399de5757732d6a6b9 100644 (file)
@@ -1,68 +1,68 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.jpa.dao;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.sonar.api.profiles.RulesProfile;\r
-import org.sonar.api.rules.*;\r
-import org.sonar.jpa.test.AbstractDbUnitTestCase;\r
-\r
-import java.util.Arrays;\r
-import java.util.List;\r
-\r
-import static org.hamcrest.CoreMatchers.*;\r
-import static org.junit.Assert.assertEquals;\r
-import static org.junit.Assert.assertThat;\r
-\r
-public class RulesDaoTest extends AbstractDbUnitTestCase {\r
-\r
-  private RulesDao rulesDao;\r
-\r
-  @Before\r
-  public void setup() {\r
-    rulesDao = new RulesDao(getSession());\r
-  }\r
-\r
-  @Test\r
-  public void shouldGetRules() {\r
-    setupData("shouldGetRules");\r
-\r
-    List<Rule> rules = rulesDao.getRules();\r
-    assertThat(rules, notNullValue());\r
-    assertThat(rules.size(), is(2));\r
-\r
-    assertEquals("rule_one", rules.get(0).getKey());\r
-    assertEquals(1, rules.get(0).getParams().size());\r
-  }\r
-\r
-  @Test\r
-  public void shouldGetRuleWithRuleKeyAndPluginKey() {\r
-    setupData("shouldGetRuleWithRuleKeyAndPluginKey");\r
-\r
-    Rule rule = rulesDao.getRuleByKey("plugin", "checkstyle.rule1");\r
-    assertThat(rule, notNullValue());\r
-    assertThat(rule.getId(), notNullValue());\r
-\r
-    Rule rule2 = rulesDao.getRuleByKey("plugin", "key not found");\r
-    assertThat(rule2, nullValue());\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.jpa.dao;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.sonar.api.profiles.RulesProfile;
+import org.sonar.api.rules.*;
+import org.sonar.jpa.test.AbstractDbUnitTestCase;
+
+import java.util.Arrays;
+import java.util.List;
+
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+public class RulesDaoTest extends AbstractDbUnitTestCase {
+
+  private RulesDao rulesDao;
+
+  @Before
+  public void setup() {
+    rulesDao = new RulesDao(getSession());
+  }
+
+  @Test
+  public void shouldGetRules() {
+    setupData("shouldGetRules");
+
+    List<Rule> rules = rulesDao.getRules();
+    assertThat(rules, notNullValue());
+    assertThat(rules.size(), is(2));
+
+    assertEquals("rule_one", rules.get(0).getKey());
+    assertEquals(1, rules.get(0).getParams().size());
+  }
+
+  @Test
+  public void shouldGetRuleWithRuleKeyAndPluginKey() {
+    setupData("shouldGetRuleWithRuleKeyAndPluginKey");
+
+    Rule rule = rulesDao.getRuleByKey("plugin", "checkstyle.rule1");
+    assertThat(rule, notNullValue());
+    assertThat(rule.getId(), notNullValue());
+
+    Rule rule2 = rulesDao.getRuleByKey("plugin", "key not found");
+    assertThat(rule2, nullValue());
+  }
+
+}
index 298f47757650edf817544bd80f433a35f5fee970..7da394f4fce5bfe59a0690950ee8ba30a44f06ac 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0f7db36bd7a8a23f6201fddbd6bc8e0029ae9c3a..4a67f441d2fcbaf47fb5f19d4467d19707d57ba3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 20cebfd9eb7f8142c98652178742e59485caee1b..440500dae0807187fa44ba4b9245f8ea1c1759b6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5d2a9a53043b478baa025b74e9259e6abcac5337..5554eba67da3c53e8493bb27117ba4a571482fed 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ad60fa7e0a1147144899f12c3d61ed6c8b5fabde..a071768653509a6f464c50143d8c22b361ab061a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ba15aa478548cca601fe6127f7a2ec18004a60ed..05d963f93234faa6a1eaa05f608ab4aeb16b5fd5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 89145bf73059160e33cd550352076653dd175569..23e3116e51874d4be169b3d12ab7f0ebefeab34b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3738d30f56c269ab414c59cd06e4066d486dd5bf..b7ed6cee9247377556b2a8059a6ae07d0bf73d7f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b16d92c5e4d836633d0332f02ac6733df349257c..6af5a72b60906549166e9d2dbde0d875ef44863e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c948023d82aad69710aff5a567d0394546c708b5..f57f58f3d860856df539110c4499821a518c1c83 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8be589fb5b227c6af91c536014190864eebf120d..21a2268f48bdb12ee8875e35ad70a61580f315a4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5d5cc9cfc8366b005fdc871482f7cc261d2e984c..f584eb4b72b1b96fcc70a6bee894662b7967465a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4094cca55c2c5ec7e6e33b13b69bfdc1d96e0865..014a7054f6b67701206f2e8ed9a880a8966c6974 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.jpa.session;\r
-\r
-import org.hamcrest.Matchers;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.junit.internal.matchers.IsCollectionContaining;\r
-import org.sonar.api.database.model.MeasureModel;\r
-import org.sonar.api.database.model.ResourceModel;\r
-import org.sonar.api.database.model.Snapshot;\r
-import org.sonar.api.measures.CoreMetrics;\r
-import org.sonar.api.measures.Metric;\r
-import org.sonar.jpa.dao.MeasuresDao;\r
-import org.sonar.jpa.test.AbstractDbUnitTestCase;\r
-\r
-import javax.persistence.NonUniqueResultException;\r
-import java.sql.Date;\r
-import java.util.List;\r
-\r
-import static org.junit.Assert.*;\r
-\r
-public class DatabaseSessionTest extends AbstractDbUnitTestCase {\r
-  private static final Long NB_INSERTS = 20000l;\r
-\r
-  private ResourceModel project1;\r
-  private ResourceModel project2;\r
-\r
-  @Before\r
-  public void setup() {\r
-    project1 = new ResourceModel(ResourceModel.SCOPE_PROJECT, "mygroup:myartifact", "JAV", null, "my name");\r
-    project2 = new ResourceModel(ResourceModel.SCOPE_PROJECT, "mygroup:myartifact1", "JAV", null, "my name 2");\r
-  }\r
-\r
-  @Test\r
-  public void performaceTestOnBatchInserts() throws Exception {\r
-\r
-    Snapshot snapshot = new Snapshot(project1, true, "", new Date(1));\r
-    getSession().save(project1, snapshot);\r
-    getSession().save(CoreMetrics.CLASSES);\r
-    getSession().commit();\r
-\r
-    Metric metric = new MeasuresDao(getSession()).getMetric(CoreMetrics.CLASSES_KEY);\r
-    for (int i = 0; i < NB_INSERTS; i++) {\r
-      MeasureModel pm = new MeasureModel(metric.getId(), 1.0).setSnapshotId(snapshot.getId());\r
-      getSession().save(pm);\r
-    }\r
-\r
-    getSession().commit();\r
-    assertEquals(NB_INSERTS, getHQLCount(MeasureModel.class));\r
-\r
-  }\r
-\r
-  @Test\r
-  public void testGetSingleResultWithNoResults() {\r
-    assertNull(getSession().getSingleResult(ResourceModel.class, "name", "test"));\r
-  }\r
-\r
-  @Test\r
-  public void testGetSingleResultWithNoCriterias() {\r
-    try {\r
-      assertNull(getSession().getSingleResult(ResourceModel.class, (Object[]) null));\r
-      fail("No IllegalStateException raised");\r
-    } catch (IllegalStateException ex) {\r
-      // error raised correctly\r
-    }\r
-  }\r
-\r
-  @Test\r
-  public void testGetSingleResultWithOneResult() {\r
-    getSession().save(project1);\r
-    ResourceModel hit = getSession().getSingleResult(ResourceModel.class, "name", "my name");\r
-    assertNotNull(hit);\r
-    assertEquals(project1, hit);\r
-  }\r
-\r
-  @Test\r
-  public void testGetSingleResultWithTwoResults() {\r
-    getSession().save(project1, project2);\r
-    try {\r
-      getSession().getSingleResult(ResourceModel.class, "qualifier", "JAV");\r
-      fail("No NonUniqueResultException raised");\r
-    } catch (NonUniqueResultException ex) {\r
-      // error raised correctly\r
-    }\r
-  }\r
-\r
-  @Test\r
-  public void testGetResultsWithNoResults() {\r
-    List<ResourceModel> hits = getSession().getResults(ResourceModel.class, "name", "foo");\r
-    assertTrue(hits.isEmpty());\r
-  }\r
-\r
-  @Test\r
-  public void testGetResultsWithMultipleResults() {\r
-    ResourceModel project3 = new ResourceModel(ResourceModel.SCOPE_PROJECT, "mygroup:myartifact3", "TEST", null, "my name 3");\r
-    getSession().save(project1, project2, project3);\r
-\r
-    List<ResourceModel> hits = getSession().getResults(ResourceModel.class, "qualifier", "JAV");\r
-    assertFalse(hits.isEmpty());\r
-    assertThat(hits, IsCollectionContaining.hasItems(project1, project2));\r
-    assertThat(hits, Matchers.not(IsCollectionContaining.hasItem(project3)));\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.jpa.session;
+
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.internal.matchers.IsCollectionContaining;
+import org.sonar.api.database.model.MeasureModel;
+import org.sonar.api.database.model.ResourceModel;
+import org.sonar.api.database.model.Snapshot;
+import org.sonar.api.measures.CoreMetrics;
+import org.sonar.api.measures.Metric;
+import org.sonar.jpa.dao.MeasuresDao;
+import org.sonar.jpa.test.AbstractDbUnitTestCase;
+
+import javax.persistence.NonUniqueResultException;
+import java.sql.Date;
+import java.util.List;
+
+import static org.junit.Assert.*;
+
+public class DatabaseSessionTest extends AbstractDbUnitTestCase {
+  private static final Long NB_INSERTS = 20000l;
+
+  private ResourceModel project1;
+  private ResourceModel project2;
+
+  @Before
+  public void setup() {
+    project1 = new ResourceModel(ResourceModel.SCOPE_PROJECT, "mygroup:myartifact", "JAV", null, "my name");
+    project2 = new ResourceModel(ResourceModel.SCOPE_PROJECT, "mygroup:myartifact1", "JAV", null, "my name 2");
+  }
+
+  @Test
+  public void performaceTestOnBatchInserts() throws Exception {
+
+    Snapshot snapshot = new Snapshot(project1, true, "", new Date(1));
+    getSession().save(project1, snapshot);
+    getSession().save(CoreMetrics.CLASSES);
+    getSession().commit();
+
+    Metric metric = new MeasuresDao(getSession()).getMetric(CoreMetrics.CLASSES_KEY);
+    for (int i = 0; i < NB_INSERTS; i++) {
+      MeasureModel pm = new MeasureModel(metric.getId(), 1.0).setSnapshotId(snapshot.getId());
+      getSession().save(pm);
+    }
+
+    getSession().commit();
+    assertEquals(NB_INSERTS, getHQLCount(MeasureModel.class));
+
+  }
+
+  @Test
+  public void testGetSingleResultWithNoResults() {
+    assertNull(getSession().getSingleResult(ResourceModel.class, "name", "test"));
+  }
+
+  @Test
+  public void testGetSingleResultWithNoCriterias() {
+    try {
+      assertNull(getSession().getSingleResult(ResourceModel.class, (Object[]) null));
+      fail("No IllegalStateException raised");
+    } catch (IllegalStateException ex) {
+      // error raised correctly
+    }
+  }
+
+  @Test
+  public void testGetSingleResultWithOneResult() {
+    getSession().save(project1);
+    ResourceModel hit = getSession().getSingleResult(ResourceModel.class, "name", "my name");
+    assertNotNull(hit);
+    assertEquals(project1, hit);
+  }
+
+  @Test
+  public void testGetSingleResultWithTwoResults() {
+    getSession().save(project1, project2);
+    try {
+      getSession().getSingleResult(ResourceModel.class, "qualifier", "JAV");
+      fail("No NonUniqueResultException raised");
+    } catch (NonUniqueResultException ex) {
+      // error raised correctly
+    }
+  }
+
+  @Test
+  public void testGetResultsWithNoResults() {
+    List<ResourceModel> hits = getSession().getResults(ResourceModel.class, "name", "foo");
+    assertTrue(hits.isEmpty());
+  }
+
+  @Test
+  public void testGetResultsWithMultipleResults() {
+    ResourceModel project3 = new ResourceModel(ResourceModel.SCOPE_PROJECT, "mygroup:myartifact3", "TEST", null, "my name 3");
+    getSession().save(project1, project2, project3);
+
+    List<ResourceModel> hits = getSession().getResults(ResourceModel.class, "qualifier", "JAV");
+    assertFalse(hits.isEmpty());
+    assertThat(hits, IsCollectionContaining.hasItems(project1, project2));
+    assertThat(hits, Matchers.not(IsCollectionContaining.hasItem(project3)));
+  }
+
+}
index f133296d10ff98f08f3b7997e67ec4d564c98c60..dfc0716eb0df76d1824269430b589a20a15a6507 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7f1c2eb5c3b7e7fd750631a8ce3b10f05e71b05d..ee374066c75ebf72d445329d12b1bc99a88f70d5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0f4eb82793de0c81de9f4438cab8f81ab693224b..6e9aa22013a626b6ff8a72d9c3b357e7445b391f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f4218432165b844c07858bb80b1f9c1f1f132200..2be04e25f1fbceb8ae3c317b3d30f3b985af331d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0bd135f622580ae1de98ff1c9a18fe288c9937c2..2973ea05320ec51a330e665046c5c6e285c890b6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9d6739b8aeb7f3bd461ffb7d01b9769a2d72df67..cd20e1799462f758fa2021b0db3b0183acc4042b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b3562281dfff6d46d41f5898c835115e98cbeae2..803fbcdb98cc50a05e3854ee9a45433a7e272505 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 92a1f1f2e8e7179ce84e26b2c4b65e8fa21ef4b1..2423f51b8e64288359116ce95d8394ca2a29e839 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 12902792d60a3c7eb0c7db2f680c2560af055856..71c871818f1d3b5ecce95b48a74ecdcd752ba83f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9f8574d9e832d3a262af672592b48e04925bd97e..78b36dfa0a8c5e9b17be9796d2b4610b1e4a2a69 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index de0a12a738cbc85277969e2f1dc055572feccb99..1c28fca8493f6373449a13bf1c95e4530e90c092 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5885b2f5035c6e80425b73877900dcea253dabb1..242693eb4851b6859aae5058542d34a43dfe4706 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0c98a1fece3423efe946236e9a3973e559b4dd88..b89ec23ebc6cb5ceafe654a3f5451e8ef17e397d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e5084965d42c35186056d4b5fdd36e10a637ba8d..ee849c5018065cb5dbe4959fcfcc9908b884534e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b33c3a11ddc1bcb46b32f307b6c04fefcf3b00d0..45e5b5e9f0804aa20d2916a4dbcdccdeee070d55 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2a47f800bdcc8e4eb553f65a3ad17cef6023f2c3..58268e5167b752b1cd77ece81a8ebbb4f91aed17 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0482cf447fdfe2cfca56d722deebead562ed2284..7f893ff5b7bb000403744d38ab3ba27f980dc0de 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4e7d359643a4e72431342cefb3f68f172c7338aa..3502c5ed307ff44e5dcc486674805f8249e16a8c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 08d21bb6fe332cb26c4e71090486c322e195bb3b..74de09d275b8aa547012cabdaa0c3cd742d3d376 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e54554b84cc634db87f4cf15ca101f8b68cf63e0..55a5e11dd96ba3b5c81184c2bb8c28b04cfdaa04 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ac1ebf6795a4489b9da9c46c2730f5ae2234d38d..6c87a39200b3fb048f2b055e4ce23821046eb832 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a6df4a7e73f9a7056c5570b3aa95e48094b10637..313e64a4c80853a49449c91a7901e80075e88f5d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d72dc1db31c8bbc941b02bc98120afb3309b31f7..7f1aa486db30fe97eb796bc5f9a84f1714d5dd4e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 34dce3426359247800d40d05102d07d0bb74692e..b94082d9c7c2e6a60f1ccbcd51dec8fc6eac4881 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6a159a9bd275969c2db0fd584d724724a0a3b94d..4cc5029413d2dd9caf97fbe970a1fbad5a18c315 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index eade8969a014fd1d402fceeba5b68de6663f8730..3ce30317cb272c25553e47b7e6bffdd2c00ce73d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 76f6fb6ca4e78c7556df452b1f7086430ecd9ba8..e1fa871fdd259c1cb45832ca7d5be5e247c5d047 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 142942b8cedd7e68c9a07ed6b432165712688c57..06f9e2eb648bcf031f5507686484634017462263 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b08b584c3c5784b6a36a8db7c09e28e420bd5584..3ffaed0f0031e21088d292714db7578771f01f34 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6c8ab6284f9189d7f4f4cae6d90631662f981d8e..73d34649a630d8c1bf4bdf36368eec9a0f77e5ce 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9926a33081ec7e2703db22a3684b011e93f10c8e..99264e2a141031ef3c5f557747ab5ba9131ea41b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ec69f047174c42b0de8f1bd36986c033ab69a767..5f7e1c3c99b35283923e43b11a6ed187d47ea7ca 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3a853a6ab3f0594d623d2a2e7c5a97331c2e9943..c87b0cb88d8ac8b0fb221c302734ec934b1d02a9 100644 (file)
@@ -1,29 +1,29 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.rules;\r
-\r
-import org.sonar.api.profiles.RulesProfile;\r
-\r
-@Deprecated\r
-public interface ConfigurationExportable {\r
-\r
-  String exportConfiguration(RulesProfile profile);\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.rules;
+
+import org.sonar.api.profiles.RulesProfile;
+
+@Deprecated
+public interface ConfigurationExportable {
+
+  String exportConfiguration(RulesProfile profile);
+
+}
index c16337875e342a115beb6415a8defd0052f2aac4..3c32c98f31ceeb1fa311a471b023744bf757b277 100644 (file)
@@ -1,30 +1,30 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.rules;\r
-\r
-import java.util.List;\r
-import org.sonar.api.rules.Rule;\r
-\r
-@Deprecated\r
-public interface ConfigurationImportable {\r
-\r
-  List<ActiveRule> importConfiguration(String configuration, List<Rule> rules);\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.rules;
+
+import java.util.List;
+import org.sonar.api.rules.Rule;
+
+@Deprecated
+public interface ConfigurationImportable {
+
+  List<ActiveRule> importConfiguration(String configuration, List<Rule> rules);
+
+}
index 37345cead6ad447e9005fc817307160d11931457..8ed1a70e75c215c32547487c500dc02ad1e38c7e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c8a382ecd893c2c2aebaa54a48453de41e938519..cbae894a3b025d4a74e8440fb119f0ed48f9adf0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2cf6a8723074dcddf6e6ab69f77848d7762b2c04..7d852b446f08739d759325f047c0a2e644bb2311 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8156cac9723a10b95ac023628c23e028c1cb22da..2a09816b6c2d144fdf91fbcff9046a57a8e25f4d 100644 (file)
@@ -1,58 +1,58 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.rules;\r
-\r
-import org.sonar.api.BatchExtension;\r
-import org.sonar.api.ServerExtension;\r
-import org.sonar.api.profiles.RulesProfile;\r
-import org.sonar.api.resources.Language;\r
-\r
-import java.util.List;\r
-\r
-/**\r
- * @deprecated since 2.3\r
- */\r
-@Deprecated\r
-public interface RulesRepository<LANG extends Language> extends BatchExtension, ServerExtension {\r
-\r
-  /**\r
-   * @return the language the repository is associated\r
-   */\r
-  LANG getLanguage();\r
-\r
-  /**\r
-   * @return the list of rules of the repository\r
-   */\r
-  List<Rule> getInitialReferential();\r
-\r
-  /**\r
-   * The method to parse the base referential of rules and return a list of rules\r
-   *\r
-   * @param fileContent the initial referential\r
-   * @return a list of rules\r
-   */\r
-  List<Rule> parseReferential(String fileContent);\r
-\r
-  /**\r
-   * @return a list of profiles that are provided with the referential\r
-   */\r
-  List<RulesProfile> getProvidedProfiles();\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.rules;
+
+import org.sonar.api.BatchExtension;
+import org.sonar.api.ServerExtension;
+import org.sonar.api.profiles.RulesProfile;
+import org.sonar.api.resources.Language;
+
+import java.util.List;
+
+/**
+ * @deprecated since 2.3
+ */
+@Deprecated
+public interface RulesRepository<LANG extends Language> extends BatchExtension, ServerExtension {
+
+  /**
+   * @return the language the repository is associated
+   */
+  LANG getLanguage();
+
+  /**
+   * @return the list of rules of the repository
+   */
+  List<Rule> getInitialReferential();
+
+  /**
+   * The method to parse the base referential of rules and return a list of rules
+   *
+   * @param fileContent the initial referential
+   * @return a list of rules
+   */
+  List<Rule> parseReferential(String fileContent);
+
+  /**
+   * @return a list of profiles that are provided with the referential
+   */
+  List<RulesProfile> getProvidedProfiles();
+
+}
index 272b96428890d4a53c2778ea5c90f6452b2261e5..e2098c4c8727079649ee82be67315aadea384044 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 82889c80c66a4de237ac564e621f77cf6b9ef9b7..cf3b1798408c1d0e7838cbb99debea7d0871d687 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cd40e8a1f0e2c6beea63ba51eb30dcad36f09597..7e3cfbadf7d2376cd5480657481efc713ffbc1d5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8e6dbec7670c3cd66f970c372a8b73c546ffaf89..657d616e5c4057dfb9d066481d000e4ee6ad40c9 100644 (file)
@@ -1,47 +1,47 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.rules.xml;\r
-\r
-import com.thoughtworks.xstream.annotations.XStreamAlias;\r
-import com.thoughtworks.xstream.annotations.XStreamAsAttribute;\r
-\r
-@Deprecated\r
-@XStreamAlias("property")\r
-public class Property {\r
-\r
-  @XStreamAsAttribute\r
-  private String name;\r
-\r
-  @XStreamAsAttribute\r
-  private String value;\r
-\r
-  public Property(String name, String value) {\r
-    this.name = name;\r
-    this.value = value;\r
-  }\r
-\r
-  public String getName() {\r
-    return name;\r
-  }\r
-\r
-  public String getValue() {\r
-    return value;\r
-  }\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.rules.xml;
+
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
+
+@Deprecated
+@XStreamAlias("property")
+public class Property {
+
+  @XStreamAsAttribute
+  private String name;
+
+  @XStreamAsAttribute
+  private String value;
+
+  public Property(String name, String value) {
+    this.name = name;
+    this.value = value;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public String getValue() {
+    return value;
+  }
 }
\ No newline at end of file
index e424d1466a6f4028d03b011fd4bde95edc6ed3ef..a299af9b7c1d441222ca892e5dcb9346b2a6887c 100644 (file)
@@ -1,82 +1,82 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.rules.xml;\r
-\r
-import com.thoughtworks.xstream.annotations.XStreamAlias;\r
-import com.thoughtworks.xstream.annotations.XStreamAsAttribute;\r
-import com.thoughtworks.xstream.annotations.XStreamImplicit;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-@Deprecated\r
-@XStreamAlias("rule")\r
-public class Rule implements Comparable<String> {\r
-\r
-  @XStreamAsAttribute\r
-  private String key;\r
-\r
-  @XStreamAsAttribute\r
-  private String priority;\r
-\r
-  @XStreamImplicit\r
-  private List<Property> properties;\r
-\r
-  public Rule(String ref) {\r
-    this(ref, null);\r
-  }\r
-\r
-  public Rule(String ref, String priority) {\r
-    this.key = ref;\r
-    this.priority = priority;\r
-  }\r
-\r
-  public String getKey() {\r
-    return key;\r
-  }\r
-\r
-  public void setProperties(List<Property> properties) {\r
-    this.properties = properties;\r
-  }\r
-\r
-  public List<Property> getProperties() {\r
-    return properties;\r
-  }\r
-\r
-  public int compareTo(String o) {\r
-    return o.compareTo(key);\r
-  }\r
-\r
-  public String getPriority() {\r
-    return priority;\r
-  }\r
-\r
-  public void setPriority(String priority) {\r
-    this.priority = priority;\r
-  }\r
-\r
-  public void addProperty(Property property) {\r
-    if (properties == null) {\r
-      properties = new ArrayList<Property>();\r
-    }\r
-    properties.add(property);\r
-  }\r
-\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.rules.xml;
+
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
+import com.thoughtworks.xstream.annotations.XStreamImplicit;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Deprecated
+@XStreamAlias("rule")
+public class Rule implements Comparable<String> {
+
+  @XStreamAsAttribute
+  private String key;
+
+  @XStreamAsAttribute
+  private String priority;
+
+  @XStreamImplicit
+  private List<Property> properties;
+
+  public Rule(String ref) {
+    this(ref, null);
+  }
+
+  public Rule(String ref, String priority) {
+    this.key = ref;
+    this.priority = priority;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  public void setProperties(List<Property> properties) {
+    this.properties = properties;
+  }
+
+  public List<Property> getProperties() {
+    return properties;
+  }
+
+  public int compareTo(String o) {
+    return o.compareTo(key);
+  }
+
+  public String getPriority() {
+    return priority;
+  }
+
+  public void setPriority(String priority) {
+    this.priority = priority;
+  }
+
+  public void addProperty(Property property) {
+    if (properties == null) {
+      properties = new ArrayList<Property>();
+    }
+    properties.add(property);
+  }
+
 }
\ No newline at end of file
index 8edba7288f58a1400be1cd97b341159d4ac5c53b..365e6d888e52c31b1d9bd25110c6d7d68f9743c8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d1f91f1b4d31590886c599d025a7b7b40f5bea71..437cc5d7b5efd70aa498b219fbf060db777af1f0 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package org.sonar.api.batch;\r
-\r
-import static junit.framework.Assert.assertNull;\r
-import static org.hamcrest.MatcherAssert.assertThat;\r
-import static org.hamcrest.Matchers.is;\r
-import static org.mockito.Mockito.mock;\r
-\r
-import java.io.StringReader;\r
-\r
-import javax.xml.stream.XMLStreamException;\r
-\r
-import org.codehaus.staxmate.in.SMInputCursor;\r
-import org.hibernate.lob.ReaderInputStream;\r
-import org.junit.Test;\r
-import org.sonar.api.resources.JavaFile;\r
-import org.sonar.api.resources.Resource;\r
-import org.sonar.api.rules.RulesManager;\r
-\r
-public class AbstractViolationsStaxParserTest {\r
-\r
-  @Test\r
-  public void testParseLineIndex() {\r
-\r
-    assertThat(AbstractViolationsStaxParser.parseLineIndex("4"), is(4));\r
-    assertNull(AbstractViolationsStaxParser.parseLineIndex("toto"));\r
-    assertNull(AbstractViolationsStaxParser.parseLineIndex(""));\r
-    assertNull(AbstractViolationsStaxParser.parseLineIndex(null));\r
-    assertNull(AbstractViolationsStaxParser.parseLineIndex("-1"));\r
-  }\r
-\r
-  @Test\r
-  public void testDoNotSaveViolationsOnUnexistedResource() throws XMLStreamException {\r
-    SensorContext context = mock(SensorContext.class);\r
-    MyViolationParser violationParser = new MyViolationParser(context, null);\r
-    violationParser.setDoSaveViolationsOnUnexistedResource(false);\r
-    violationParser.parse(new ReaderInputStream(new StringReader("<root><file/></root>")));\r
-  }\r
-\r
-  @Test(expected = CursorForViolationsMethodHasBeenCalled.class)\r
-  public void testDoSaveViolationsOnUnexistedResource() throws XMLStreamException {\r
-    SensorContext context = mock(SensorContext.class);\r
-    MyViolationParser violationParser = new MyViolationParser(context, null);\r
-    violationParser.parse(new ReaderInputStream(new StringReader("<root><file/></root>")));\r
-  }\r
-\r
-  private class MyViolationParser extends AbstractViolationsStaxParser {\r
-\r
-    protected MyViolationParser(SensorContext context, RulesManager rulesManager) {\r
-      super(context, rulesManager);\r
-    }\r
-\r
-    protected SMInputCursor cursorForResources(SMInputCursor rootCursor) throws XMLStreamException {\r
-      return rootCursor.descendantElementCursor("file");\r
-    }\r
-\r
-    protected SMInputCursor cursorForViolations(SMInputCursor resourcesCursor) throws XMLStreamException {\r
-      throw new CursorForViolationsMethodHasBeenCalled();\r
-    }\r
-\r
-    protected Resource toResource(SMInputCursor resourceCursor) throws XMLStreamException {\r
-      return new JavaFile("org.sonar.MyClass");\r
-    }\r
-\r
-    protected String messageFor(SMInputCursor violationCursor) throws XMLStreamException {\r
-      return null;\r
-    }\r
-\r
-    protected String ruleKey(SMInputCursor violationCursor) throws XMLStreamException {\r
-      return null;\r
-    }\r
-\r
-    protected String keyForPlugin() {\r
-      return null;\r
-    }\r
-\r
-    protected String lineNumberForViolation(SMInputCursor violationCursor) throws XMLStreamException {\r
-      return null;\r
-    }\r
-  }\r
-\r
-  private class CursorForViolationsMethodHasBeenCalled extends RuntimeException {\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package org.sonar.api.batch;
+
+import static junit.framework.Assert.assertNull;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.mockito.Mockito.mock;
+
+import java.io.StringReader;
+
+import javax.xml.stream.XMLStreamException;
+
+import org.codehaus.staxmate.in.SMInputCursor;
+import org.hibernate.lob.ReaderInputStream;
+import org.junit.Test;
+import org.sonar.api.resources.JavaFile;
+import org.sonar.api.resources.Resource;
+import org.sonar.api.rules.RulesManager;
+
+public class AbstractViolationsStaxParserTest {
+
+  @Test
+  public void testParseLineIndex() {
+
+    assertThat(AbstractViolationsStaxParser.parseLineIndex("4"), is(4));
+    assertNull(AbstractViolationsStaxParser.parseLineIndex("toto"));
+    assertNull(AbstractViolationsStaxParser.parseLineIndex(""));
+    assertNull(AbstractViolationsStaxParser.parseLineIndex(null));
+    assertNull(AbstractViolationsStaxParser.parseLineIndex("-1"));
+  }
+
+  @Test
+  public void testDoNotSaveViolationsOnUnexistedResource() throws XMLStreamException {
+    SensorContext context = mock(SensorContext.class);
+    MyViolationParser violationParser = new MyViolationParser(context, null);
+    violationParser.setDoSaveViolationsOnUnexistedResource(false);
+    violationParser.parse(new ReaderInputStream(new StringReader("<root><file/></root>")));
+  }
+
+  @Test(expected = CursorForViolationsMethodHasBeenCalled.class)
+  public void testDoSaveViolationsOnUnexistedResource() throws XMLStreamException {
+    SensorContext context = mock(SensorContext.class);
+    MyViolationParser violationParser = new MyViolationParser(context, null);
+    violationParser.parse(new ReaderInputStream(new StringReader("<root><file/></root>")));
+  }
+
+  private class MyViolationParser extends AbstractViolationsStaxParser {
+
+    protected MyViolationParser(SensorContext context, RulesManager rulesManager) {
+      super(context, rulesManager);
+    }
+
+    protected SMInputCursor cursorForResources(SMInputCursor rootCursor) throws XMLStreamException {
+      return rootCursor.descendantElementCursor("file");
+    }
+
+    protected SMInputCursor cursorForViolations(SMInputCursor resourcesCursor) throws XMLStreamException {
+      throw new CursorForViolationsMethodHasBeenCalled();
+    }
+
+    protected Resource toResource(SMInputCursor resourceCursor) throws XMLStreamException {
+      return new JavaFile("org.sonar.MyClass");
+    }
+
+    protected String messageFor(SMInputCursor violationCursor) throws XMLStreamException {
+      return null;
+    }
+
+    protected String ruleKey(SMInputCursor violationCursor) throws XMLStreamException {
+      return null;
+    }
+
+    protected String keyForPlugin() {
+      return null;
+    }
+
+    protected String lineNumberForViolation(SMInputCursor violationCursor) throws XMLStreamException {
+      return null;
+    }
+  }
+
+  private class CursorForViolationsMethodHasBeenCalled extends RuntimeException {
+  }
+}
index 8e89d46dd4306e8eac98984bf7decb01f262654a..64d858e3e57e2d42b144e59f1cb13c9d5b47dbbb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 601ea23b8fdbed58c2f333c12da3e0af6e661002..2c5f3621ae980e0975a6e41b70ac635f8a9e7a7a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1c0f3983a6049011787d2b570e5ea9894480183c..fc178a97333b41e5064e57b3ce4958313afce431 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 26b12313de24ba09a25f6eaae215b2f4288ac1b1..a1532925339da87ce2e58453b2a79c361b18c028 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b219eee33fab23c3558b5c4d3638ae5e7de76bfa..bed430862f6acc796a62bbaf5f986548291b435d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a3a72999cfd6b65d3d3816aa0c33c41299732d03..a670c06be9d230cbecb9c7836523f1ea80af5a8f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 83d16557ed71e147d5df0844d3b97ed65f20024a..a41a970edd56cf361fa32ba15cd3c93789853e63 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 20d7ffc69105e320e97b23069fe8cfef4dfec99d..09ae338d88089323eede0b4463ecc86dbaae2193 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bf6c488d23737b6ea9cd6dc40b51c77133704a57..2c33c609db6a1673bc5c58acc7c3ba733a1c3ae6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3d59ff3cb527fd9479e7a833b224c9869bb08a63..cd7f527310b791d704862a8ee52b54c5a5ab8725 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index aafd4f1f522f978b9cd9a7ded07901c0c6a9653e..5a5ba20e23fdd830128b1398a9cba15a739e2b36 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3348f093f3c590f4180c28bae6052ba0293bf8b5..a20e9de2cd363b4bf312c46325d8bee705134391 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5618932fda55160b7a11b7765d9880949cc5b6b2..234567e9926f61f01c708e49f94af51bb81f5ee7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7e461ea1248abaebee424bc05667dc452a72ae32..1b88b783d4aca0a5ddf5b3e9e20d0f6b299b4a9e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 50dc9a78df2dad9a151f6665f17c684a13dc9ad9..8bf94a7fcf0d52a406ce5b2e1b06a4dec93b49df 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7828d928cb1083ab665b83f36756394cc191e582..02535aa7663597be522ee2851c4eb64c83441d81 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 67e99868bbb47ac7c8f272732ce911ef4d6d1839..2c8069efae409153454df7cc403c89b6c92eccb8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5f8f5de48d633e4008154a9b99609040f6d01e40..bae346a718ff3577bcf9e6fbdda86d63fb29e2ec 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 905ba0399b88b936f6d2749d4acaaebfe9d53271..d1ce879c470eb3001e8b0972ebd3d5c9e3db9b6e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 691a2084eaf29db2ed5ffa89c2ffb75bb6beecb4..0b032d77797ded5057869711b1245bdc890e1e02 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e83896a6197b0637cd38e24d87e1c561bb53aeb3..ad15e02eec519978579ad5789b649c74321c2d4a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 586961d0dcad1dc8b122464f75baf1e1667de465..1820670b7f327a21724c2635852282b6a308a5f4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 25a408ce0898d1d15b863a4674933b752372f65c..ab367b4253222b9f3dedeeb0e40051536e6d4e25 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 46a252bbf7a8fb38b40012260970127e51b972d3..f60f2f80044a76296772f1728d5adfb7251a9bd0 100644 (file)
@@ -1,43 +1,43 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package net.sourceforge.pmd.cpd;\r
-\r
-import net.sourceforge.pmd.util.filter.Filters;\r
-\r
-import java.io.FilenameFilter;\r
-\r
-public abstract class AbstractLanguage implements Language {\r
-       private final Tokenizer tokenizer;\r
-       private final FilenameFilter fileFilter;\r
-\r
-       public AbstractLanguage(Tokenizer tokenizer, String... extensions) {\r
-               this.tokenizer = tokenizer;\r
-               fileFilter = net.sourceforge.pmd.util.filter.Filters.toFilenameFilter(Filters.getFileExtensionOrDirectoryFilter(extensions));\r
-       }\r
-\r
-       public FilenameFilter getFileFilter() {\r
-               return fileFilter;\r
-       }\r
-\r
-       public Tokenizer getTokenizer() {\r
-               return tokenizer;\r
-       }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package net.sourceforge.pmd.cpd;
+
+import net.sourceforge.pmd.util.filter.Filters;
+
+import java.io.FilenameFilter;
+
+public abstract class AbstractLanguage implements Language {
+       private final Tokenizer tokenizer;
+       private final FilenameFilter fileFilter;
+
+       public AbstractLanguage(Tokenizer tokenizer, String... extensions) {
+               this.tokenizer = tokenizer;
+               fileFilter = net.sourceforge.pmd.util.filter.Filters.toFilenameFilter(Filters.getFileExtensionOrDirectoryFilter(extensions));
+       }
+
+       public FilenameFilter getFileFilter() {
+               return fileFilter;
+       }
+
+       public Tokenizer getTokenizer() {
+               return tokenizer;
+       }
+}
index 9f302512e002e892b37ce30de42ff36838b4ec1d..b3c094e4cd39d7e3c00835beb2549cd77aaa3a89 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0a3659857a09ca9a595e77c3be43dc9aa8ded0ea..595fa235b457178a18c8cdc88cc2414d72f67c95 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3d74c9deec6788bc133835970844738d750cf312..fa17bce8d2e291610da123d5f5415c68c977d613 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ae154776d1e04d5728a2661506dfb2a254a59218..13a97b24346e4f1e7ee61cb8c6cf45d81a1944e2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 19051059602c3f52e05fcf6805a35c1ae8837f34..f2c61bd25d2aa1d152a2d2c94a4cbf71072462e7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 743697472d1b1ca3dc50de4f18cddd124c3c37f2..6c530b690a3432333f4444f71fdf2d9a5f941269 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a609a81ceb07dbf62dede303128f12bbb837ff5b..f9f418d64c05bb8e2b282362f5e915ce9b5807a8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1fa87f75630d2aa721eacd07cccc301e4f8b0b0a..f2d371b45cbcb1418d05cf76850aa2512730cb43 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3a0282196c4c81824352698829b7592bae2f7746..2ce2ea4b42c9d6bb9f84728244789e1dc21add1b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 883354568a405463ce23d727cd34b157a40ea456..1da17017bf5ac0375fde4b32208e9de13fd30cbf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8706cd4dea8b8819041c7fc63eecd94c68e1e76c..54f8c216779643195fc4c2c064aec8a76662ffa1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dfbf2501cac4f8ee488b42fcbec8bf0fba3711a8..67731611a84228d40060368c8ebef941c4d12804 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e6f57bd9945bbd6751c94cac972e3964f413c34f..57ec6e503d7779df6396b161af39e412d7ea4046 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 452ddc6cac0cd4f8712fc931f68f2ec89ec53cc9..a5421f2e805e3c8b3673785cce9716777c98a5df 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1c0e6e03f57d20d27821a912aebbcf050ccc010c..c093ff15c5c4a697380fa2d11e3195481848507d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index aad959fe7f247388b171e61aa63b1d206f82c0ca..54005b298d1bf306b7d24bf75a1940ccb87a4e5e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ab4824448e5f031179735c4fd10ec4ef93ed53a4..15f78e80a1f9af083233b0254f60f6eb39e4a6e3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9f4258d9742624402e76dd9ef8799b64b135703c..e51205fe2f925a09d200bb0671a606b260f9f0c6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ada54ced4ad9fcde20c32d3fa64810d08de091fb..42f8764f2647a7c53447035b918b24a78a01e296 100644 (file)
@@ -1,62 +1,62 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package net.sourceforge.pmd.util;\r
-\r
-import java.io.File;\r
-import java.io.FilenameFilter;\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-/**\r
- * A utility class for finding files within a directory.\r
- */\r
-public class FileFinder {\r
-\r
-    private FilenameFilter filter;\r
-    private static final String FILE_SEP = System.getProperty("file.separator");\r
-\r
-    public List<File> findFilesFrom(String dir, FilenameFilter filter, boolean recurse) {\r
-        this.filter = filter;\r
-        List<File> files = new ArrayList<File>();\r
-        scanDirectory(new File(dir), files, recurse);\r
-        return files;\r
-    }\r
-\r
-    /**\r
-     * Implements a tail recursive file scanner\r
-     */\r
-    private void scanDirectory(File dir, List<File> list, boolean recurse) {\r
-        String[] candidates = dir.list(filter);\r
-        if (candidates == null) {\r
-            return;\r
-        }\r
-        for (int i = 0; i < candidates.length; i++) {\r
-            File tmp = new File(dir + FILE_SEP + candidates[i]);\r
-            if (tmp.isDirectory()) {\r
-                if (recurse) {\r
-                    scanDirectory(tmp, list, true);\r
-                }\r
-            } else {\r
-                list.add(new File(dir + FILE_SEP + candidates[i]));\r
-            }\r
-        }\r
-    }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package net.sourceforge.pmd.util;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A utility class for finding files within a directory.
+ */
+public class FileFinder {
+
+    private FilenameFilter filter;
+    private static final String FILE_SEP = System.getProperty("file.separator");
+
+    public List<File> findFilesFrom(String dir, FilenameFilter filter, boolean recurse) {
+        this.filter = filter;
+        List<File> files = new ArrayList<File>();
+        scanDirectory(new File(dir), files, recurse);
+        return files;
+    }
+
+    /**
+     * Implements a tail recursive file scanner
+     */
+    private void scanDirectory(File dir, List<File> list, boolean recurse) {
+        String[] candidates = dir.list(filter);
+        if (candidates == null) {
+            return;
+        }
+        for (int i = 0; i < candidates.length; i++) {
+            File tmp = new File(dir + FILE_SEP + candidates[i]);
+            if (tmp.isDirectory()) {
+                if (recurse) {
+                    scanDirectory(tmp, list, true);
+                }
+            } else {
+                list.add(new File(dir + FILE_SEP + candidates[i]));
+            }
+        }
+    }
+}
index 41d1d27760cc6fadacccea26c4383dfe7e3b136d..ce84dd3dc0d2f9b6d8a3e66b6d6d3cafc9b55f0a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6d5523ba8ceee7466352c74acaba2cf887cfec26..13e300689f9a2c2a8b89ec5afc82f0976c03f192 100644 (file)
@@ -1,76 +1,76 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package net.sourceforge.pmd.util.filter;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-/**\r
- * A base class for Filters which implements behavior using a List of other\r
- * Filters.\r
- * \r
- * @param <T>\r
- *            The underlying type on which the filter applies.\r
- */\r
-public abstract class AbstractCompoundFilter<T> implements Filter<T> {\r
-\r
-       protected List<Filter<T>> filters;\r
-\r
-       public AbstractCompoundFilter() {\r
-               filters = new ArrayList<Filter<T>>(2);\r
-       }\r
-\r
-       public AbstractCompoundFilter(Filter<T>... filters) {\r
-               this.filters = new ArrayList<Filter<T>>(filters.length);\r
-               for (Filter<T> filter : filters) {\r
-                       this.filters.add(filter);\r
-               }\r
-       }\r
-\r
-       public List<Filter<T>> getFilters() {\r
-               return filters;\r
-       }\r
-\r
-       public void setFilters(List<Filter<T>> filters) {\r
-               this.filters = filters;\r
-       }\r
-\r
-       public void addFilter(Filter<T> filter) {\r
-               filters.add(filter);\r
-       }\r
-\r
-       protected abstract String getOperator();\r
-\r
-       public String toString() {\r
-               StringBuilder builder = new StringBuilder();\r
-               builder.append("(");\r
-               for (int i = 0; i < filters.size(); i++) {\r
-                       if (i > 0) {\r
-                               builder.append(" ");\r
-                               builder.append(getOperator());\r
-                               builder.append(" ");\r
-                       }\r
-                       builder.append(filters.get(i));\r
-               }\r
-               builder.append(")");\r
-               return builder.toString();\r
-       }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package net.sourceforge.pmd.util.filter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A base class for Filters which implements behavior using a List of other
+ * Filters.
+ * 
+ * @param <T>
+ *            The underlying type on which the filter applies.
+ */
+public abstract class AbstractCompoundFilter<T> implements Filter<T> {
+
+       protected List<Filter<T>> filters;
+
+       public AbstractCompoundFilter() {
+               filters = new ArrayList<Filter<T>>(2);
+       }
+
+       public AbstractCompoundFilter(Filter<T>... filters) {
+               this.filters = new ArrayList<Filter<T>>(filters.length);
+               for (Filter<T> filter : filters) {
+                       this.filters.add(filter);
+               }
+       }
+
+       public List<Filter<T>> getFilters() {
+               return filters;
+       }
+
+       public void setFilters(List<Filter<T>> filters) {
+               this.filters = filters;
+       }
+
+       public void addFilter(Filter<T> filter) {
+               filters.add(filter);
+       }
+
+       protected abstract String getOperator();
+
+       public String toString() {
+               StringBuilder builder = new StringBuilder();
+               builder.append("(");
+               for (int i = 0; i < filters.size(); i++) {
+                       if (i > 0) {
+                               builder.append(" ");
+                               builder.append(getOperator());
+                               builder.append(" ");
+                       }
+                       builder.append(filters.get(i));
+               }
+               builder.append(")");
+               return builder.toString();
+       }
+}
index 678ef1d535fcd1d4887147b19fe9e89be9a12d13..e203bb58b6cc75c2c1f32c60df608475c452c778 100644 (file)
@@ -1,57 +1,57 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package net.sourceforge.pmd.util.filter;\r
-\r
-/**\r
- * A base class for Filters which implements behavior using delegation\r
- * to an underlying filter.\r
- * \r
- * @param <T>\r
- *            The underlying type on which the filter applies.\r
- */\r
-public abstract class AbstractDelegateFilter<T> implements Filter<T> {\r
-       protected Filter<T> filter;\r
-\r
-       public AbstractDelegateFilter() {\r
-       }\r
-\r
-       public AbstractDelegateFilter(Filter<T> filter) {\r
-               this.filter = filter;\r
-       }\r
-\r
-       public Filter<T> getFilter() {\r
-               return filter;\r
-       }\r
-\r
-       public void setFilter(Filter<T> filter) {\r
-               this.filter = filter;\r
-       }\r
-\r
-       // Subclass should override to do something other the simply delegate.\r
-       public boolean filter(T obj) {\r
-               return filter.filter(obj);\r
-       }\r
-\r
-       // Subclass should override to do something other the simply delegate.\r
-       public String toString() {\r
-               return filter.toString();\r
-       }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package net.sourceforge.pmd.util.filter;
+
+/**
+ * A base class for Filters which implements behavior using delegation
+ * to an underlying filter.
+ * 
+ * @param <T>
+ *            The underlying type on which the filter applies.
+ */
+public abstract class AbstractDelegateFilter<T> implements Filter<T> {
+       protected Filter<T> filter;
+
+       public AbstractDelegateFilter() {
+       }
+
+       public AbstractDelegateFilter(Filter<T> filter) {
+               this.filter = filter;
+       }
+
+       public Filter<T> getFilter() {
+               return filter;
+       }
+
+       public void setFilter(Filter<T> filter) {
+               this.filter = filter;
+       }
+
+       // Subclass should override to do something other the simply delegate.
+       public boolean filter(T obj) {
+               return filter.filter(obj);
+       }
+
+       // Subclass should override to do something other the simply delegate.
+       public String toString() {
+               return filter.toString();
+       }
+}
index b74c211f30a5b25c23072f1782b14b0f7822dd81..96ab80a3edddc9c212d532b09924878d6e8ca649 100644 (file)
@@ -1,54 +1,54 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package net.sourceforge.pmd.util.filter;\r
-\r
-/**\r
- * A logical AND of a list of Filters.  This implementation is short circuiting.\r
- * \r
- * @param <T>\r
- *            The underlying type on which the filter applies.\r
- */\r
-public class AndFilter<T> extends AbstractCompoundFilter<T> {\r
-\r
-       public AndFilter() {\r
-               super();\r
-       }\r
-\r
-       public AndFilter(Filter<T>... filters) {\r
-               super(filters);\r
-       }\r
-\r
-       public boolean filter(T obj) {\r
-               boolean match = true;\r
-               for (Filter<T> filter : filters) {\r
-                       if (!filter.filter(obj)) {\r
-                               match = false;\r
-                               break;\r
-                       }\r
-               }\r
-               return match;\r
-       }\r
-\r
-       @Override\r
-       protected String getOperator() {\r
-               return "and";\r
-       }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package net.sourceforge.pmd.util.filter;
+
+/**
+ * A logical AND of a list of Filters.  This implementation is short circuiting.
+ * 
+ * @param <T>
+ *            The underlying type on which the filter applies.
+ */
+public class AndFilter<T> extends AbstractCompoundFilter<T> {
+
+       public AndFilter() {
+               super();
+       }
+
+       public AndFilter(Filter<T>... filters) {
+               super(filters);
+       }
+
+       public boolean filter(T obj) {
+               boolean match = true;
+               for (Filter<T> filter : filters) {
+                       if (!filter.filter(obj)) {
+                               match = false;
+                               break;
+                       }
+               }
+               return match;
+       }
+
+       @Override
+       protected String getOperator() {
+               return "and";
+       }
+}
index 65a39c981a9da54283bdefd554a3ddfdf2ec23b7..4d632ec23b05773cbc749e7066c6f1c36ae86aa9 100644 (file)
@@ -1,37 +1,37 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package net.sourceforge.pmd.util.filter;\r
-\r
-import java.io.File;\r
-\r
-/**\r
- * Directory filter.\r
- */\r
-public class DirectoryFilter implements Filter<File> {\r
-       public static final DirectoryFilter INSTANCE = new DirectoryFilter();\r
-\r
-       private DirectoryFilter() {\r
-       }\r
-\r
-       public boolean filter(File file) {\r
-               return file.isDirectory();\r
-       }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package net.sourceforge.pmd.util.filter;
+
+import java.io.File;
+
+/**
+ * Directory filter.
+ */
+public class DirectoryFilter implements Filter<File> {
+       public static final DirectoryFilter INSTANCE = new DirectoryFilter();
+
+       private DirectoryFilter() {
+       }
+
+       public boolean filter(File file) {
+               return file.isDirectory();
+       }
+}
index 12c5658fcc83dd123371e4ee6a8641cf9b1a279f..f442e8e93efe89d53a86bf7b94530fdb957eb4d3 100644 (file)
@@ -1,62 +1,62 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package net.sourceforge.pmd.util.filter;\r
-\r
-import java.io.File;\r
-\r
-public class FileExtensionFilter implements Filter<File> {\r
-       protected final String[] extensions;\r
-       protected final boolean ignoreCase;\r
-\r
-       /**\r
-        * Matches any files with the given extensions, ignoring case\r
-        */\r
-       public FileExtensionFilter(String... extensions) {\r
-               this(true, extensions);\r
-       }\r
-\r
-       /**\r
-        * Matches any files with the given extensions, optionally ignoring case.\r
-        */\r
-       public FileExtensionFilter(boolean ignoreCase, String... extensions) {\r
-               this.extensions = extensions;\r
-               this.ignoreCase = ignoreCase;\r
-               if (ignoreCase) {\r
-                       for (int i = 0; i < this.extensions.length; i++) {\r
-                               this.extensions[i] = this.extensions[i].toUpperCase();\r
-                       }\r
-               }\r
-       }\r
-\r
-       public boolean filter(File file) {\r
-               boolean accept = extensions == null;\r
-               if (!accept) {\r
-                       for (String extension : extensions) {\r
-                               String name = file.getName();\r
-                               if (ignoreCase ? name.toUpperCase().endsWith(extension) : name.endsWith(extension)) {\r
-                                       accept = true;\r
-                                       break;\r
-                               }\r
-                       }\r
-               }\r
-               return accept;\r
-       }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package net.sourceforge.pmd.util.filter;
+
+import java.io.File;
+
+public class FileExtensionFilter implements Filter<File> {
+       protected final String[] extensions;
+       protected final boolean ignoreCase;
+
+       /**
+        * Matches any files with the given extensions, ignoring case
+        */
+       public FileExtensionFilter(String... extensions) {
+               this(true, extensions);
+       }
+
+       /**
+        * Matches any files with the given extensions, optionally ignoring case.
+        */
+       public FileExtensionFilter(boolean ignoreCase, String... extensions) {
+               this.extensions = extensions;
+               this.ignoreCase = ignoreCase;
+               if (ignoreCase) {
+                       for (int i = 0; i < this.extensions.length; i++) {
+                               this.extensions[i] = this.extensions[i].toUpperCase();
+                       }
+               }
+       }
+
+       public boolean filter(File file) {
+               boolean accept = extensions == null;
+               if (!accept) {
+                       for (String extension : extensions) {
+                               String name = file.getName();
+                               if (ignoreCase ? name.toUpperCase().endsWith(extension) : name.endsWith(extension)) {
+                                       accept = true;
+                                       break;
+                               }
+                       }
+               }
+               return accept;
+       }
+}
index 1a35080ee6d5b19657140517af87339e03054070..2acd458c6c6db2fa22580e2985cc8eea39d645f0 100644 (file)
@@ -1,31 +1,31 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package net.sourceforge.pmd.util.filter;\r
-\r
-/**\r
- * A Filter interface, used for filtering arbitrary objects.\r
- * \r
- * @param <T>\r
- *            The underlying type on which the filter applies.\r
- */\r
-public interface Filter<T> {\r
-       boolean filter(T obj);\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package net.sourceforge.pmd.util.filter;
+
+/**
+ * A Filter interface, used for filtering arbitrary objects.
+ * 
+ * @param <T>
+ *            The underlying type on which the filter applies.
+ */
+public interface Filter<T> {
+       boolean filter(T obj);
+}
index 5318e298e45afc067a9d380fe1988b17abea4626..9acd1a61660f6f6e5809d1a39757f28d7015ae78 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package net.sourceforge.pmd.util.filter;\r
-\r
-import java.io.File;\r
-import java.io.FilenameFilter;\r
-import java.util.ArrayList;\r
-import java.util.Collection;\r
-import java.util.List;\r
-\r
-/**\r
- * Utility class for working with Filters.  Contains builder style methods,\r
- * apply methods, as well as mechanisms for adapting Filters and FilenameFilters.\r
- */\r
-public class Filters {\r
-\r
-       /**\r
-        * Filter a given Collection.\r
-        * @param <T> Type of the Collection.\r
-        * @param filter A Filter upon the Type of objects in the Collection.\r
-        * @param collection The Collection to filter.\r
-        * @return A List containing only those objects for which the Filter returned <code>true</code>.\r
-        */\r
-       public static <T> List<T> filter(Filter<T> filter, Collection<T> collection) {\r
-               List<T> list = new ArrayList<T>();\r
-               for (T obj : collection) {\r
-                       if (filter.filter(obj)) {\r
-                               list.add(obj);\r
-                       }\r
-               }\r
-               return list;\r
-       }\r
-\r
-       /**\r
-        * Get a File Filter for files with the given extensions, ignoring case.\r
-        * @param extensions The extensions to filter.\r
-        * @return A File Filter.\r
-        */\r
-       public static Filter<File> getFileExtensionFilter(String... extensions) {\r
-               return new FileExtensionFilter(extensions);\r
-       }\r
-\r
-       /**\r
-        * Get a File Filter for directories.\r
-        * @return A File Filter.\r
-        */\r
-       public static Filter<File> getDirectoryFilter() {\r
-               return DirectoryFilter.INSTANCE;\r
-       }\r
-\r
-       /**\r
-        * Get a File Filter for directories or for files with the given extensions, ignoring case.\r
-        * @param extensions The extensions to filter.\r
-        * @return A File Filter.\r
-        */\r
-       public static Filter<File> getFileExtensionOrDirectoryFilter(String... extensions) {\r
-               return new OrFilter<File>(getFileExtensionFilter(extensions), getDirectoryFilter());\r
-       }\r
-\r
-       /**\r
-        * Given a String Filter, expose as a File Filter.  The File paths are\r
-        * normalized to a standard pattern using <code>/</code> as a path separator\r
-        * which can be used cross platform easily in a regular expression based\r
-        * String Filter.\r
-        * \r
-        * @param filter A String Filter.\r
-        * @return A File Filter.\r
-        */\r
-       public static Filter<File> toNormalizedFileFilter(final Filter<String> filter) {\r
-               return new Filter<File>() {\r
-                       public boolean filter(File file) {\r
-                               String path = file.getPath();\r
-                               path = path.replace('\\', '/');\r
-                               return filter.filter(path);\r
-                       }\r
-\r
-                       public String toString() {\r
-                               return filter.toString();\r
-                       }\r
-               };\r
-       }\r
-\r
-       /**\r
-        * Given a String Filter, expose as a Filter on another type.  The\r
-        * <code>toString()</code> method is called on the objects of the other\r
-        * type and delegated to the String Filter.\r
-        * @param <T> The desired type.\r
-        * @param filter The existing String Filter.\r
-        * @return A Filter on the desired type.\r
-        */\r
-       public static <T> Filter<T> fromStringFilter(final Filter<String> filter) {\r
-               return new Filter<T>() {\r
-                       public boolean filter(T obj) {\r
-                               return filter.filter(obj.toString());\r
-                       }\r
-\r
-                       public String toString() {\r
-                               return filter.toString();\r
-                       }\r
-               };\r
-       }\r
-\r
-       /**\r
-        * Given a File Filter, expose as a FilenameFilter.\r
-        * @param filter The File Filter.\r
-        * @return A FilenameFilter.\r
-        */\r
-       public static FilenameFilter toFilenameFilter(final Filter<File> filter) {\r
-               return new FilenameFilter() {\r
-                       public boolean accept(File dir, String name) {\r
-                               return filter.filter(new File(dir, name));\r
-                       }\r
-\r
-                       public String toString() {\r
-                               return filter.toString();\r
-                       }\r
-               };\r
-       }\r
-\r
-       /**\r
-        * Given a FilenameFilter, expose as a File Filter.\r
-        * @param filter The FilenameFilter.\r
-        * @return A File Filter.\r
-        */\r
-       public static Filter<File> toFileFilter(final FilenameFilter filter) {\r
-               return new Filter<File>() {\r
-                       public boolean filter(File file) {\r
-                               return filter.accept(file.getParentFile(), file.getName());\r
-                       }\r
-\r
-                       public String toString() {\r
-                               return filter.toString();\r
-                       }\r
-               };\r
-       }\r
-\r
-       /**\r
-        * Construct a String Filter using set of include and exclude regular\r
-        * expressions.  If there are no include regular expressions provide, then\r
-        * a regular expression is added which matches every String by default.\r
-        * A String is included as long as it matches an include regular expression\r
-        * and does not match an exclude regular expression.\r
-        * <p>\r
-        * In other words, exclude patterns override include patterns.\r
-        * \r
-        * @param includeRegexes The include regular expressions.  May be <code>null</code>.\r
-        * @param excludeRegexes The exclude regular expressions.  May be <code>null</code>.\r
-        * @return A String Filter.\r
-        */\r
-       public static Filter<String> buildRegexFilterExcludeOverInclude(List<String> includeRegexes,\r
-                       List<String> excludeRegexes) {\r
-               OrFilter<String> includeFilter = new OrFilter<String>();\r
-               if (includeRegexes == null || includeRegexes.size() == 0) {\r
-                       includeFilter.addFilter(new RegexStringFilter(".*"));\r
-               } else {\r
-                       for (String includeRegex : includeRegexes) {\r
-                               includeFilter.addFilter(new RegexStringFilter(includeRegex));\r
-                       }\r
-               }\r
-\r
-               OrFilter<String> excludeFilter = new OrFilter<String>();\r
-               if (excludeRegexes != null) {\r
-                       for (String excludeRegex : excludeRegexes) {\r
-                               excludeFilter.addFilter(new RegexStringFilter(excludeRegex));\r
-                       }\r
-               }\r
-\r
-               return new AndFilter<String>(includeFilter, new NotFilter<String>(excludeFilter));\r
-       }\r
-\r
-       /**\r
-        * Construct a String Filter using set of include and exclude regular\r
-        * expressions.  If there are no include regular expressions provide, then\r
-        * a regular expression is added which matches every String by default.\r
-        * A String is included as long as the case that there is an include which\r
-        * matches or there is not an exclude which matches.\r
-        * <p>\r
-        * In other words, include patterns override exclude patterns.\r
-        * \r
-        * @param includeRegexes The include regular expressions.  May be <code>null</code>.\r
-        * @param excludeRegexes The exclude regular expressions.  May be <code>null</code>.\r
-        * @return A String Filter.\r
-        */\r
-       public static Filter<String> buildRegexFilterIncludeOverExclude(List<String> includeRegexes,\r
-                       List<String> excludeRegexes) {\r
-               OrFilter<String> includeFilter = new OrFilter<String>();\r
-               if (includeRegexes != null) {\r
-                       for (String includeRegex : includeRegexes) {\r
-                               includeFilter.addFilter(new RegexStringFilter(includeRegex));\r
-                       }\r
-               }\r
-\r
-               OrFilter<String> excludeFilter = new OrFilter<String>();\r
-               if (excludeRegexes != null) {\r
-                       for (String excludeRegex : excludeRegexes) {\r
-                               excludeFilter.addFilter(new RegexStringFilter(excludeRegex));\r
-                       }\r
-               }\r
-\r
-               return new OrFilter<String>(includeFilter, new NotFilter<String>(excludeFilter));\r
-       }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package net.sourceforge.pmd.util.filter;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Utility class for working with Filters.  Contains builder style methods,
+ * apply methods, as well as mechanisms for adapting Filters and FilenameFilters.
+ */
+public class Filters {
+
+       /**
+        * Filter a given Collection.
+        * @param <T> Type of the Collection.
+        * @param filter A Filter upon the Type of objects in the Collection.
+        * @param collection The Collection to filter.
+        * @return A List containing only those objects for which the Filter returned <code>true</code>.
+        */
+       public static <T> List<T> filter(Filter<T> filter, Collection<T> collection) {
+               List<T> list = new ArrayList<T>();
+               for (T obj : collection) {
+                       if (filter.filter(obj)) {
+                               list.add(obj);
+                       }
+               }
+               return list;
+       }
+
+       /**
+        * Get a File Filter for files with the given extensions, ignoring case.
+        * @param extensions The extensions to filter.
+        * @return A File Filter.
+        */
+       public static Filter<File> getFileExtensionFilter(String... extensions) {
+               return new FileExtensionFilter(extensions);
+       }
+
+       /**
+        * Get a File Filter for directories.
+        * @return A File Filter.
+        */
+       public static Filter<File> getDirectoryFilter() {
+               return DirectoryFilter.INSTANCE;
+       }
+
+       /**
+        * Get a File Filter for directories or for files with the given extensions, ignoring case.
+        * @param extensions The extensions to filter.
+        * @return A File Filter.
+        */
+       public static Filter<File> getFileExtensionOrDirectoryFilter(String... extensions) {
+               return new OrFilter<File>(getFileExtensionFilter(extensions), getDirectoryFilter());
+       }
+
+       /**
+        * Given a String Filter, expose as a File Filter.  The File paths are
+        * normalized to a standard pattern using <code>/</code> as a path separator
+        * which can be used cross platform easily in a regular expression based
+        * String Filter.
+        * 
+        * @param filter A String Filter.
+        * @return A File Filter.
+        */
+       public static Filter<File> toNormalizedFileFilter(final Filter<String> filter) {
+               return new Filter<File>() {
+                       public boolean filter(File file) {
+                               String path = file.getPath();
+                               path = path.replace('\\', '/');
+                               return filter.filter(path);
+                       }
+
+                       public String toString() {
+                               return filter.toString();
+                       }
+               };
+       }
+
+       /**
+        * Given a String Filter, expose as a Filter on another type.  The
+        * <code>toString()</code> method is called on the objects of the other
+        * type and delegated to the String Filter.
+        * @param <T> The desired type.
+        * @param filter The existing String Filter.
+        * @return A Filter on the desired type.
+        */
+       public static <T> Filter<T> fromStringFilter(final Filter<String> filter) {
+               return new Filter<T>() {
+                       public boolean filter(T obj) {
+                               return filter.filter(obj.toString());
+                       }
+
+                       public String toString() {
+                               return filter.toString();
+                       }
+               };
+       }
+
+       /**
+        * Given a File Filter, expose as a FilenameFilter.
+        * @param filter The File Filter.
+        * @return A FilenameFilter.
+        */
+       public static FilenameFilter toFilenameFilter(final Filter<File> filter) {
+               return new FilenameFilter() {
+                       public boolean accept(File dir, String name) {
+                               return filter.filter(new File(dir, name));
+                       }
+
+                       public String toString() {
+                               return filter.toString();
+                       }
+               };
+       }
+
+       /**
+        * Given a FilenameFilter, expose as a File Filter.
+        * @param filter The FilenameFilter.
+        * @return A File Filter.
+        */
+       public static Filter<File> toFileFilter(final FilenameFilter filter) {
+               return new Filter<File>() {
+                       public boolean filter(File file) {
+                               return filter.accept(file.getParentFile(), file.getName());
+                       }
+
+                       public String toString() {
+                               return filter.toString();
+                       }
+               };
+       }
+
+       /**
+        * Construct a String Filter using set of include and exclude regular
+        * expressions.  If there are no include regular expressions provide, then
+        * a regular expression is added which matches every String by default.
+        * A String is included as long as it matches an include regular expression
+        * and does not match an exclude regular expression.
+        * <p>
+        * In other words, exclude patterns override include patterns.
+        * 
+        * @param includeRegexes The include regular expressions.  May be <code>null</code>.
+        * @param excludeRegexes The exclude regular expressions.  May be <code>null</code>.
+        * @return A String Filter.
+        */
+       public static Filter<String> buildRegexFilterExcludeOverInclude(List<String> includeRegexes,
+                       List<String> excludeRegexes) {
+               OrFilter<String> includeFilter = new OrFilter<String>();
+               if (includeRegexes == null || includeRegexes.size() == 0) {
+                       includeFilter.addFilter(new RegexStringFilter(".*"));
+               } else {
+                       for (String includeRegex : includeRegexes) {
+                               includeFilter.addFilter(new RegexStringFilter(includeRegex));
+                       }
+               }
+
+               OrFilter<String> excludeFilter = new OrFilter<String>();
+               if (excludeRegexes != null) {
+                       for (String excludeRegex : excludeRegexes) {
+                               excludeFilter.addFilter(new RegexStringFilter(excludeRegex));
+                       }
+               }
+
+               return new AndFilter<String>(includeFilter, new NotFilter<String>(excludeFilter));
+       }
+
+       /**
+        * Construct a String Filter using set of include and exclude regular
+        * expressions.  If there are no include regular expressions provide, then
+        * a regular expression is added which matches every String by default.
+        * A String is included as long as the case that there is an include which
+        * matches or there is not an exclude which matches.
+        * <p>
+        * In other words, include patterns override exclude patterns.
+        * 
+        * @param includeRegexes The include regular expressions.  May be <code>null</code>.
+        * @param excludeRegexes The exclude regular expressions.  May be <code>null</code>.
+        * @return A String Filter.
+        */
+       public static Filter<String> buildRegexFilterIncludeOverExclude(List<String> includeRegexes,
+                       List<String> excludeRegexes) {
+               OrFilter<String> includeFilter = new OrFilter<String>();
+               if (includeRegexes != null) {
+                       for (String includeRegex : includeRegexes) {
+                               includeFilter.addFilter(new RegexStringFilter(includeRegex));
+                       }
+               }
+
+               OrFilter<String> excludeFilter = new OrFilter<String>();
+               if (excludeRegexes != null) {
+                       for (String excludeRegex : excludeRegexes) {
+                               excludeFilter.addFilter(new RegexStringFilter(excludeRegex));
+                       }
+               }
+
+               return new OrFilter<String>(includeFilter, new NotFilter<String>(excludeFilter));
+       }
+}
index e82ca332a53b49b3e415f4ea4604ebdecdddb364..aeb77ce4bbed79b5381750a2be365a5b1f83e1ef 100644 (file)
@@ -1,45 +1,45 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package net.sourceforge.pmd.util.filter;\r
-\r
-/**\r
- * A logical NEGATION of a Filter.\r
- * \r
- * @param <T>\r
- *            The underlying type on which the filter applies.\r
- */\r
-public class NotFilter<T> extends AbstractDelegateFilter<T> {\r
-       public NotFilter() {\r
-               super();\r
-       }\r
-\r
-       public NotFilter(Filter<T> filter) {\r
-               super(filter);\r
-       }\r
-\r
-       public boolean filter(T obj) {\r
-               return !filter.filter(obj);\r
-       }\r
-\r
-       public String toString() {\r
-               return "not (" + filter + ")";\r
-       }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package net.sourceforge.pmd.util.filter;
+
+/**
+ * A logical NEGATION of a Filter.
+ * 
+ * @param <T>
+ *            The underlying type on which the filter applies.
+ */
+public class NotFilter<T> extends AbstractDelegateFilter<T> {
+       public NotFilter() {
+               super();
+       }
+
+       public NotFilter(Filter<T> filter) {
+               super(filter);
+       }
+
+       public boolean filter(T obj) {
+               return !filter.filter(obj);
+       }
+
+       public String toString() {
+               return "not (" + filter + ")";
+       }
+}
index df561b8f0117d7a780e7b244cbee0e11ac15287e..142d4131b26cdfa7fe3c5dfc8b9808505bfad483 100644 (file)
@@ -1,54 +1,54 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package net.sourceforge.pmd.util.filter;\r
-\r
-/**\r
- * A logical OR of a list of Filters. This implementation is short circuiting.\r
- * \r
- * @param <T>\r
- *            The underlying type on which the filter applies.\r
- */\r
-public class OrFilter<T> extends AbstractCompoundFilter<T> {\r
-\r
-       public OrFilter() {\r
-               super();\r
-       }\r
-\r
-       public OrFilter(Filter<T>... filters) {\r
-               super(filters);\r
-       }\r
-\r
-       public boolean filter(T obj) {\r
-               boolean match = false;\r
-               for (Filter<T> filter : filters) {\r
-                       if (filter.filter(obj)) {\r
-                               match = true;\r
-                               break;\r
-                       }\r
-               }\r
-               return match;\r
-       }\r
-\r
-       @Override\r
-       protected String getOperator() {\r
-               return "or";\r
-       }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package net.sourceforge.pmd.util.filter;
+
+/**
+ * A logical OR of a list of Filters. This implementation is short circuiting.
+ * 
+ * @param <T>
+ *            The underlying type on which the filter applies.
+ */
+public class OrFilter<T> extends AbstractCompoundFilter<T> {
+
+       public OrFilter() {
+               super();
+       }
+
+       public OrFilter(Filter<T>... filters) {
+               super(filters);
+       }
+
+       public boolean filter(T obj) {
+               boolean match = false;
+               for (Filter<T> filter : filters) {
+                       if (filter.filter(obj)) {
+                               match = true;
+                               break;
+                       }
+               }
+               return match;
+       }
+
+       @Override
+       protected String getOperator() {
+               return "or";
+       }
+}
index 7d2615db9ee6f91e7510d4502f6837051fdb0f54..b23b202d78377ea09b40524d9225f0774dca6631 100644 (file)
@@ -1,60 +1,60 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package net.sourceforge.pmd.util.filter;\r
-\r
-import java.util.regex.Pattern;\r
-\r
-/**\r
- * A filter to which uses a regular expression to match upon Strings.\r
- */\r
-public class RegexStringFilter implements Filter<String> {\r
-\r
-       protected String regex;\r
-\r
-       protected Pattern pattern;\r
-\r
-       public RegexStringFilter() {\r
-       }\r
-\r
-       public RegexStringFilter(String regex) {\r
-               this.regex = regex;\r
-       }\r
-\r
-       public String getRegex() {\r
-               return regex;\r
-       }\r
-\r
-       public void setRegex(String regex) {\r
-               this.regex = regex;\r
-               this.pattern = null;\r
-       }\r
-\r
-       public boolean filter(String obj) {\r
-               if (pattern == null) {\r
-                       pattern = Pattern.compile(regex);\r
-               }\r
-               return pattern.matcher(obj).matches();\r
-       }\r
-\r
-       public String toString() {\r
-               return "matches " + regex;\r
-       }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package net.sourceforge.pmd.util.filter;
+
+import java.util.regex.Pattern;
+
+/**
+ * A filter to which uses a regular expression to match upon Strings.
+ */
+public class RegexStringFilter implements Filter<String> {
+
+       protected String regex;
+
+       protected Pattern pattern;
+
+       public RegexStringFilter() {
+       }
+
+       public RegexStringFilter(String regex) {
+               this.regex = regex;
+       }
+
+       public String getRegex() {
+               return regex;
+       }
+
+       public void setRegex(String regex) {
+               this.regex = regex;
+               this.pattern = null;
+       }
+
+       public boolean filter(String obj) {
+               if (pattern == null) {
+                       pattern = Pattern.compile(regex);
+               }
+               return pattern.matcher(obj).matches();
+       }
+
+       public String toString() {
+               return "matches " + regex;
+       }
+}
index 7e1319d0cf34e549d354801034215f23e3afbd9b..8d193f30b6444484c28685658acae455b893d7d1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 34339a0a74c943e6b800b9e667be0f215ceee472..24abfc5ad55fd0bb11a3eeedc6b2cff7f0b95ce7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 738d03e116e854f094fd734f2cf3fcc21b46863a..dee15b8e52a2fbad37c8d80bf777fb43849c444e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8d35729b0e5b45934d249fa3af434b9d180753b4..a4f44aa335aebf60bb127dbe42920b346738536e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 80b50751cbb974caeb484142320979db77f0097d..c94b69fee1430f1c7433db2fed81e0efd8181b9c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8f5da22fbf385b247d114ec37af6ed71e1305416..219d0b8bd71ac7dce1f56a83f1e8c554557e77e6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b3ea1bf3433aa44d1edc24f63fa0d2350e4dda85..843c58454bd1fd53ce7e09972dc6d9ef2d879822 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 84353b485d7902efe97f65128b9d6b4930f292b6..0e781641f77457b545a38e8189d4783ec61ee5eb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index df6062ab5ffe67ea70b5b995dffd248286652ce9..36e263f1c4b914bce1638bc0f860dcf03c6d9e9f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 816a01422bc268e5410aaea86048cf3c8c7b14dc..ff11699877b5e3861e2abc2b9bee0dc5b8793d09 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 219adf38222d6c224f18ac8aee6f4248a71631b1..7c065fa0149ddd7785d4714e8337fcbe887e6a49 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1c3527d37ca4e8888a5296ce07264e66e6141dd8..0c5939a17673f6b069cc5931d18d9a6a8a1e9fe6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0e992922c1659787133ef1a3bc4215fd35dc43e1..404d31ff5ef3b7e3f587e9b307cca2cb5dd1131a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 26069308de82ccb301b2e471ca80b55b2868aedf..7124619255f1941e2bf41e52e1db9b9c8a052b86 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index df36cedb936a3601e0972bb202eaf1852562e5e4..7a7d8819808cea0443ce0bc3b628d9c6a6948fa4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 997d5ce9e949f6223cfa2fc417bb8458de931f00..c69a2708e62c93bb65f807c3cec56dbc78a944c1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 715bf8cba6c475f82071ea4c6933ed1188ab8ca3..aee2709996bd806020460444bfa34e12c409eb2d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1e627b0cc9b7324179d136f28ebc9252d2c41bb1..84f968f3d3b9023ec3d739806bfaeb6e8430a52d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 935315bbd74e674358bcf0278e8f9c275947729a..06d137fab24c140685dd9f0156ae657b007ed984 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 618d07feb3e390b1709837041e7ffe193b18aab3..a23cb74c9f0b3695c5b937fb1adc3943041bb5b6 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package org.sonar.graph;\r
-\r
-import java.util.ArrayList;\r
-import java.util.Collections;\r
-import java.util.Iterator;\r
-import java.util.List;\r
-import java.util.Set;\r
-\r
-import com.google.common.collect.HashMultiset;\r
-import com.google.common.collect.Multiset;\r
-\r
-public final class FeedbackCycle implements Iterable<FeedbackEdge>, Comparable<FeedbackCycle> {\r
-\r
-  private List<FeedbackEdge> orderedFeedbackEdges;\r
-  private int totalOccurrencesOfEdgesInCycle;\r
-  private final Cycle cycle;\r
-\r
-  private FeedbackCycle(Cycle cycle) {\r
-    orderedFeedbackEdges = new ArrayList<FeedbackEdge>();\r
-    totalOccurrencesOfEdgesInCycle = 0;\r
-    this.cycle = cycle;\r
-  }\r
-\r
-  private void add(FeedbackEdge feedbackEdge) {\r
-    orderedFeedbackEdges.add(feedbackEdge);\r
-  }\r
-\r
-  public static List<FeedbackCycle> buildFeedbackCycles(Set<Cycle> cycles) {\r
-    Multiset<Edge> edgesBag = createBagWithAllEdgesOfCycles(cycles);\r
-\r
-    List<FeedbackCycle> feedbackCycles = new ArrayList<FeedbackCycle>();\r
-    for (Cycle cycle : cycles) {\r
-      FeedbackCycle feedbackCycle = new FeedbackCycle(cycle);\r
-      int totalOccurrences = 0;\r
-      for (Edge edge : cycle.getEdges()) {\r
-        FeedbackEdge feedbackEdge = new FeedbackEdge(edge, edgesBag.count(edge));\r
-        feedbackCycle.add(feedbackEdge);\r
-        totalOccurrences += feedbackEdge.getOccurences();\r
-      }\r
-      feedbackCycle.setTotalOccurrencesOfEdgesInCycle(totalOccurrences);\r
-      Collections.sort(feedbackCycle.orderedFeedbackEdges);\r
-      feedbackCycles.add(feedbackCycle);\r
-    }\r
-    Collections.sort(feedbackCycles);\r
-\r
-    return feedbackCycles;\r
-  }\r
-\r
-  private static Multiset<Edge> createBagWithAllEdgesOfCycles(Set<Cycle> cycles) {\r
-    Multiset<Edge> edgesBag = HashMultiset.create();\r
-    for (Cycle cycle : cycles) {\r
-      for (Edge edge : cycle.getEdges()) {\r
-        edgesBag.add(edge);\r
-      }\r
-    }\r
-    return edgesBag;\r
-  }\r
-\r
-  private void setTotalOccurrencesOfEdgesInCycle(int totalOccurrencesOfEdgesInCycle) {\r
-    this.totalOccurrencesOfEdgesInCycle = totalOccurrencesOfEdgesInCycle;\r
-  }\r
-\r
-  public int getTotalOccurrencesOfEdgesInCycle() {\r
-    return totalOccurrencesOfEdgesInCycle;\r
-  }\r
-\r
-  public Iterator<FeedbackEdge> iterator() {\r
-    return orderedFeedbackEdges.iterator();\r
-  }\r
-\r
-  public int compareTo(FeedbackCycle feedbackCycle) {\r
-    if (getTotalOccurrencesOfEdgesInCycle() < feedbackCycle.getTotalOccurrencesOfEdgesInCycle()) {\r
-      return -1;\r
-    }\r
-    if (getTotalOccurrencesOfEdgesInCycle() == feedbackCycle.getTotalOccurrencesOfEdgesInCycle()) {\r
-      if (cycle.size() == feedbackCycle.cycle.size()) {\r
-        return orderedFeedbackEdges.get(0).compareTo(feedbackCycle.orderedFeedbackEdges.get(0));\r
-      }\r
-      return cycle.size() - feedbackCycle.cycle.size();\r
-    }\r
-    return 1;\r
-  }\r
-\r
-  public Cycle getCycle() {\r
-    return cycle;\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package org.sonar.graph;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import com.google.common.collect.HashMultiset;
+import com.google.common.collect.Multiset;
+
+public final class FeedbackCycle implements Iterable<FeedbackEdge>, Comparable<FeedbackCycle> {
+
+  private List<FeedbackEdge> orderedFeedbackEdges;
+  private int totalOccurrencesOfEdgesInCycle;
+  private final Cycle cycle;
+
+  private FeedbackCycle(Cycle cycle) {
+    orderedFeedbackEdges = new ArrayList<FeedbackEdge>();
+    totalOccurrencesOfEdgesInCycle = 0;
+    this.cycle = cycle;
+  }
+
+  private void add(FeedbackEdge feedbackEdge) {
+    orderedFeedbackEdges.add(feedbackEdge);
+  }
+
+  public static List<FeedbackCycle> buildFeedbackCycles(Set<Cycle> cycles) {
+    Multiset<Edge> edgesBag = createBagWithAllEdgesOfCycles(cycles);
+
+    List<FeedbackCycle> feedbackCycles = new ArrayList<FeedbackCycle>();
+    for (Cycle cycle : cycles) {
+      FeedbackCycle feedbackCycle = new FeedbackCycle(cycle);
+      int totalOccurrences = 0;
+      for (Edge edge : cycle.getEdges()) {
+        FeedbackEdge feedbackEdge = new FeedbackEdge(edge, edgesBag.count(edge));
+        feedbackCycle.add(feedbackEdge);
+        totalOccurrences += feedbackEdge.getOccurences();
+      }
+      feedbackCycle.setTotalOccurrencesOfEdgesInCycle(totalOccurrences);
+      Collections.sort(feedbackCycle.orderedFeedbackEdges);
+      feedbackCycles.add(feedbackCycle);
+    }
+    Collections.sort(feedbackCycles);
+
+    return feedbackCycles;
+  }
+
+  private static Multiset<Edge> createBagWithAllEdgesOfCycles(Set<Cycle> cycles) {
+    Multiset<Edge> edgesBag = HashMultiset.create();
+    for (Cycle cycle : cycles) {
+      for (Edge edge : cycle.getEdges()) {
+        edgesBag.add(edge);
+      }
+    }
+    return edgesBag;
+  }
+
+  private void setTotalOccurrencesOfEdgesInCycle(int totalOccurrencesOfEdgesInCycle) {
+    this.totalOccurrencesOfEdgesInCycle = totalOccurrencesOfEdgesInCycle;
+  }
+
+  public int getTotalOccurrencesOfEdgesInCycle() {
+    return totalOccurrencesOfEdgesInCycle;
+  }
+
+  public Iterator<FeedbackEdge> iterator() {
+    return orderedFeedbackEdges.iterator();
+  }
+
+  public int compareTo(FeedbackCycle feedbackCycle) {
+    if (getTotalOccurrencesOfEdgesInCycle() < feedbackCycle.getTotalOccurrencesOfEdgesInCycle()) {
+      return -1;
+    }
+    if (getTotalOccurrencesOfEdgesInCycle() == feedbackCycle.getTotalOccurrencesOfEdgesInCycle()) {
+      if (cycle.size() == feedbackCycle.cycle.size()) {
+        return orderedFeedbackEdges.get(0).compareTo(feedbackCycle.orderedFeedbackEdges.get(0));
+      }
+      return cycle.size() - feedbackCycle.cycle.size();
+    }
+    return 1;
+  }
+
+  public Cycle getCycle() {
+    return cycle;
+  }
+}
index 53fe891858319c5c2a40314266e7a0a44f277638..60e60fc4cc6551b1224a56ce79b0ef42c01f73ad 100644 (file)
@@ -1,75 +1,75 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.graph;\r
-\r
-public class FeedbackEdge implements Comparable<FeedbackEdge> {\r
-\r
-  private Edge edge;\r
-  private double relativeWeight;\r
-  private int occurences;\r
-  private final int hashcode;\r
-\r
-  public FeedbackEdge(Edge edge, int occurences) {\r
-    this.edge = edge;\r
-    this.hashcode = edge.hashCode();\r
-    this.occurences = occurences;\r
-    this.relativeWeight = (double) edge.getWeight() / occurences;\r
-  }\r
-\r
-  protected Edge getEdge() {\r
-    return edge;\r
-  }\r
-\r
-  protected int getWeight() {\r
-    return edge.getWeight();\r
-  }\r
-\r
-  protected double getRelativeWeight() {\r
-    return relativeWeight;\r
-  }\r
-\r
-  protected int getOccurences() {\r
-    return occurences;\r
-  }\r
-\r
-  public int compareTo(FeedbackEdge feedbackEdge) {\r
-    if (this.getRelativeWeight() < feedbackEdge.getRelativeWeight()) {\r
-      return -1;\r
-    }\r
-    if (this.getRelativeWeight() == feedbackEdge.getRelativeWeight()) {\r
-      return this.getEdge().getFrom().toString().compareTo(feedbackEdge.getEdge().getFrom().toString());\r
-    }\r
-    return 1;\r
-  }\r
-\r
-  @Override\r
-  public boolean equals(Object obj) {\r
-    if (!(obj instanceof FeedbackEdge) || this.hashCode() != obj.hashCode()) {\r
-      return false;\r
-    }\r
-    FeedbackEdge otherEdge = (FeedbackEdge) obj;\r
-    return edge.equals(otherEdge.edge);\r
-  }\r
-\r
-  @Override\r
-  public int hashCode() {\r
-    return hashcode;\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.graph;
+
+public class FeedbackEdge implements Comparable<FeedbackEdge> {
+
+  private Edge edge;
+  private double relativeWeight;
+  private int occurences;
+  private final int hashcode;
+
+  public FeedbackEdge(Edge edge, int occurences) {
+    this.edge = edge;
+    this.hashcode = edge.hashCode();
+    this.occurences = occurences;
+    this.relativeWeight = (double) edge.getWeight() / occurences;
+  }
+
+  protected Edge getEdge() {
+    return edge;
+  }
+
+  protected int getWeight() {
+    return edge.getWeight();
+  }
+
+  protected double getRelativeWeight() {
+    return relativeWeight;
+  }
+
+  protected int getOccurences() {
+    return occurences;
+  }
+
+  public int compareTo(FeedbackEdge feedbackEdge) {
+    if (this.getRelativeWeight() < feedbackEdge.getRelativeWeight()) {
+      return -1;
+    }
+    if (this.getRelativeWeight() == feedbackEdge.getRelativeWeight()) {
+      return this.getEdge().getFrom().toString().compareTo(feedbackEdge.getEdge().getFrom().toString());
+    }
+    return 1;
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (!(obj instanceof FeedbackEdge) || this.hashCode() != obj.hashCode()) {
+      return false;
+    }
+    FeedbackEdge otherEdge = (FeedbackEdge) obj;
+    return edge.equals(otherEdge.edge);
+  }
+
+  @Override
+  public int hashCode() {
+    return hashcode;
+  }
+}
index 3fde2eaa2e852190390fe09278a90b32cc76b2b2..051cdc92f1d1c5cf931486a557f157fe2e8c4cba 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2c27caad174731a4a40993343e296aa43eff7396..a37c358188b6e0a0734dca75c4ffff7fab451de7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bd11d99adfd39cab1e5a7f030d5a0360e7668a25..97b773ea330232d4622710f18b782eeda669f350 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c576b5a47ef40b9a3c31fe2ce45db41ad4057058..c3b44890943b315184854ac89e349525c45b3b8c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dd010d64d4b77bffb2701e44c14994f8cebc9f59..7ca0fd8747d1422bc878fe2a4912fb55ebc67bd2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a42366abbab67a8b7cc9315f5e350d5b4a26e5df..4b666acb4c254eda3f2d3474411a4679cefa38c0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0abcb4c9af24515ac81d78e60bdbe9bb3dd4a022..3e7b9a117a16018ab48fa9c6b10c9b8f77431632 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 12069d2dc88f319cf6b4269d0321496762fdd163..24fd45df840d11f35a6ab7f607cb458d5d448f6a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 617abe383f6b804d4bb53e5282e528c9bb6f50ba..8d57aacfc0e74bead86bf9f8115020a780901b16 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 55e8de64de63390ce369355e80d8b485fbcb413c..40d2d22c18e3c49703efe04f2df832917165a375 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1d9df9239d487622241de0f484c0303736cfd134..9efb36566aac3d34da9d90088033de8cb2b65389 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 06fbcba4160a6d7723372f2209350d120df4ec60..c070457ee0cc17608f922cf1c5bbd7d51d468f22 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f017d32dc2322758a185a4dc848db6bb4d6397f9..2a67b72cd9fed3c54866c4f2726900ece519f3c5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ea3ee61fe690a2ac34c5a684ca3b6c6a5316e49e..6a63b04ac6700d738bb24b107e5d55cfd4d9bdcf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 67ba883635bb9458ec5d9c1c5ff29c4ec25d1538..f865db73c4477cd7c42e824dfcf42fc6fb44b5fa 100644 (file)
@@ -1,81 +1,81 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.graph;\r
-\r
-import org.junit.Test;\r
-\r
-import static org.hamcrest.MatcherAssert.assertThat;\r
-import static org.hamcrest.Matchers.greaterThan;\r
-import static org.hamcrest.Matchers.is;\r
-\r
-public class FeedbackEdgeTest {\r
-\r
-  @Test\r
-  public void testWeights() {\r
-    FeedbackEdge fEdge = mockFeedbackEdge(14, 2);\r
-    assertThat(fEdge.getWeight(), is(14));\r
-    assertThat(fEdge.getRelativeWeight(), is(7.0));\r
-    assertThat(fEdge.getOccurences(), is(2));\r
-  }\r
-\r
-  @Test\r
-  public void testCompareTo() {\r
-    FeedbackEdge feedbackEdge1;\r
-    FeedbackEdge feedbackEdge2;\r
-    FeedbackEdge feedbackEdge3;\r
-\r
-    feedbackEdge1 = mockFeedbackEdge(14, 2);\r
-    feedbackEdge2 = mockFeedbackEdge(10, 2);\r
-    assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(1));\r
-\r
-    feedbackEdge1 = mockFeedbackEdge(10, 2);\r
-    feedbackEdge2 = mockFeedbackEdge(14, 2);\r
-    assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(-1));\r
-\r
-    feedbackEdge1 = mockFeedbackEdge(14, 2);\r
-    feedbackEdge2 = mockFeedbackEdge(14, 2);\r
-    assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(0));\r
-\r
-    feedbackEdge1 = mockFeedbackEdge(14, 2);\r
-    feedbackEdge2 = mockFeedbackEdge(13, 2);\r
-    assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(1));\r
-\r
-    feedbackEdge1 = mockFeedbackEdge(13, 2);\r
-    feedbackEdge2 = mockFeedbackEdge(14, 2);\r
-    assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(-1));\r
-\r
-    feedbackEdge1 = mockFeedbackEdge("A", "B", 14, 2);\r
-    feedbackEdge2 = mockFeedbackEdge("B", "C", 14, 2);\r
-    feedbackEdge3 = mockFeedbackEdge("C", "A", 14, 2);\r
-    assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(-1));\r
-    assertThat(feedbackEdge2.compareTo(feedbackEdge3), is(-1));\r
-    assertThat(feedbackEdge3.compareTo(feedbackEdge1), greaterThan(1));\r
-  }\r
-\r
-  private FeedbackEdge mockFeedbackEdge(int weight, int occurrences) {\r
-    return mockFeedbackEdge("from", "to", weight, occurrences);\r
-  }\r
-\r
-  private FeedbackEdge mockFeedbackEdge(String from, String to, int weight, int occurrences) {\r
-    Edge edge = new StringEdge(from, to, weight);\r
-    return new FeedbackEdge(edge, occurrences);\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.graph;
+
+import org.junit.Test;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.greaterThan;
+import static org.hamcrest.Matchers.is;
+
+public class FeedbackEdgeTest {
+
+  @Test
+  public void testWeights() {
+    FeedbackEdge fEdge = mockFeedbackEdge(14, 2);
+    assertThat(fEdge.getWeight(), is(14));
+    assertThat(fEdge.getRelativeWeight(), is(7.0));
+    assertThat(fEdge.getOccurences(), is(2));
+  }
+
+  @Test
+  public void testCompareTo() {
+    FeedbackEdge feedbackEdge1;
+    FeedbackEdge feedbackEdge2;
+    FeedbackEdge feedbackEdge3;
+
+    feedbackEdge1 = mockFeedbackEdge(14, 2);
+    feedbackEdge2 = mockFeedbackEdge(10, 2);
+    assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(1));
+
+    feedbackEdge1 = mockFeedbackEdge(10, 2);
+    feedbackEdge2 = mockFeedbackEdge(14, 2);
+    assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(-1));
+
+    feedbackEdge1 = mockFeedbackEdge(14, 2);
+    feedbackEdge2 = mockFeedbackEdge(14, 2);
+    assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(0));
+
+    feedbackEdge1 = mockFeedbackEdge(14, 2);
+    feedbackEdge2 = mockFeedbackEdge(13, 2);
+    assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(1));
+
+    feedbackEdge1 = mockFeedbackEdge(13, 2);
+    feedbackEdge2 = mockFeedbackEdge(14, 2);
+    assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(-1));
+
+    feedbackEdge1 = mockFeedbackEdge("A", "B", 14, 2);
+    feedbackEdge2 = mockFeedbackEdge("B", "C", 14, 2);
+    feedbackEdge3 = mockFeedbackEdge("C", "A", 14, 2);
+    assertThat(feedbackEdge1.compareTo(feedbackEdge2), is(-1));
+    assertThat(feedbackEdge2.compareTo(feedbackEdge3), is(-1));
+    assertThat(feedbackEdge3.compareTo(feedbackEdge1), greaterThan(1));
+  }
+
+  private FeedbackEdge mockFeedbackEdge(int weight, int occurrences) {
+    return mockFeedbackEdge("from", "to", weight, occurrences);
+  }
+
+  private FeedbackEdge mockFeedbackEdge(String from, String to, int weight, int occurrences) {
+    Edge edge = new StringEdge(from, to, weight);
+    return new FeedbackEdge(edge, occurrences);
+  }
+
+}
index 3b11829819ce5ba4e1780d63426d610dad44b5d3..d9a9e4b58f3a34b79fc2778245c939ab414500fb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 704b8f83402cfc58eb220cffd3d7ec148101b2ab..b20683d45c0f018dc91c3924f780ddeb8e7cb121 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3beddf482150ad21c849c16f841db1b53423ba62..e76a21403b201744acd2c21be331f84dba5b0390 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 87b8cae5eabce80711a058e7376550976fd62532..57e7fcb20768cb3b7219a5636e9d4be4dc0541c1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d3aee0fa49c19358dbaf637e397d0e96d90d2a9f..1fc95177240052038d63de6fd8aeeb4e2d1bbe8e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9ec02ad65cf5f8c3f0924cc4fdc6c90f252016da..b25d6feb051d89c1e1787905063b4a7465f1d673 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fad2bf18671099fedb44023252b8e5715e8c6778..b8e7459b2a80b5617c0bd245fdf0a13087979c7f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ab28ae0ce2f9a29e1ba518943883750e27a14512..8b9399cd05c28a7fce615cbe52e8a9b659cf3cab 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ef7b4ece17b6f829d1594b2fae02ed4819c3b075..7e528abebf18ddb7dd788061ead225942626d012 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3c83903ab7f69a6f3393086a54992c68794a0d48..b2ffcb965c638c0be5e4e0ee5f42f2a4f4789c79 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1f26758cb0f9ee4713f694770586992d4980fa65..3f4d3a99c2ce13a5c127b37fda6eb74ff7cb7355 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fcd516fa556178acec0bf51055a4dcf5476a89da..f77463e8554f196da40a4c247059736d5be21dd6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ccd7ad4ed045b0427f0409f4fe1a9bf0db1440ff..297fd6ffbc744a8a9b03da41790c5c0615dbc4c5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 00f62b6e00476df053183d0c6c0ae15f57f24234..5bbf8f98f28a7c81a9891a991ac92cc9ffbd0e6c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 585b55e6bd9d907a4737618c509801facc099c13..10e9f811224d911111dad5af9966b119606fd98b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 853bc0aaedf786b2463a1836a9d01be347762cf4..9c3bfcb47ecf8cd2f23fb65a55bce14e50fb80ec 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2e87908be2fa4b7174ee26ba22629fc0d28b33eb..deb58092632b5bbc678f52343e4b964b00fce201 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 35876a99bdc5c2d77ea85c4b68c763b535ddf333..78eddc6ba51349264af76f49811e82ffcebcf4e7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ddeeb92d9901519fae714b86cd7e51ae38032e50..89f09c9e586ffbc4f3c3c60da66a8f12c8980efa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9cea18f39c65de07de00e535329eca8b54a591ca..1426e4abb70898ed37a0ab981d793a9762329e5c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 916b086d01ab5de205ac269e1f819a9cc68b15a1..b3fd1eac6bb867ca8d9360d2a2b1944df48ef3e0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d482c3d8bb23abdba923884655e754583149a35f..59f046bf6ffd0652a17878598dc1f049f41a4e6e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ce7eb14fe8b49ebf5bf5837ca7692a93e3725567..65c478a49b7a80269c5a29cd814475a40e7eeb3b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index abbc8a5fa48a60599017a09275146e01f1a4be2a..b3cc844574ba219e9fcf053fbd2ca08d309db110 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 92eba48740ab1a763d7a4518e9ed42e59b1e910b..6ce1430a1c28923c4db99a977f5021ecd22f09f6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fad1e992dfec9264c5fee7fbd0fef6203c6bf974..46bfdc5c0f2f30805f47ed2da87623c562199375 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f98853e530638aa4a80880c1e2f54bfdb6e4cf01..5cf2aecc0eac860328390bcd65f1e854448ae3e8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c39c4ebedd26341fee89d0cda5451f1cbb6a9a87..4ff6247343ad7539474d91f39f59a33a02221959 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 51dd2a82d0ee9f404d2f9560cf29f950fefe242a..e78939fc39b3e09b058af3efa1e1dbc71ab9151d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 31fdb5f875be2de1f19b7c2673606015f1cfdb96..b0db20a47c6a1aaaa49aaad17bb167c3073a8b65 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8c9b821722ac64ab7f83f4cc885a58873a1797ed..058bc88625342de63e5eb130a136e4d1c725e1c1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d42f4c5f87ad0b92cf077f3081292cb9e2380516..b4e3d30236a35380c8fd7853354227c21e40ef95 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 45d4d79909a684a4dd17ef642126d8e6803a8672..ac4cf9a94f451f00cedc53efe33ab17e9bb3d013 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f8a64be01131239d7aea47e0fab8456dee540617..9bdd1c3218d38d015fcf88b2577d634c12e42435 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5bcd1700101a4d23099fc52af09376d3efe5b310..36e7e7a65a89a2405d91fcb775380a774c93e026 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8e295d94aa688547dcb578010f176bc8932165f5..9608a5d96ac87194d4b22b60dbec712a472051ed 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5038b9a714d89163bd2aadf5be52052df52492f2..70330026e1604d8ad3c45067009d2b8c457dc947 100644 (file)
@@ -1,61 +1,61 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api;\r
-\r
-import java.util.List;\r
-\r
-/**\r
- * A plugin is a group of extensions. See <code>org.sonar.api.Extension</code> interface to get all extension points.\r
- * <p/>\r
- * <p>The manifest property <code>Plugin-Class</code> must declare the name of the implementation class.\r
- * See META-INF/MANIFEST.MF.</p>\r
- *\r
- * @see org.sonar.api.Extension\r
- * @since 1.10\r
- */\r
-public interface Plugin {\r
-\r
-  /**\r
-   * Unique key within sonar plugins\r
-   * @deprecated since 2.2. The key must be set in the manifest.\r
-   */\r
-  @Deprecated\r
-  String getKey();\r
-\r
-  /**\r
-   * Descriptive name\r
-   * @deprecated since 2.2. The name must be set in the manifest.\r
-   */\r
-  @Deprecated\r
-  String getName();\r
-\r
-  /**\r
-   * description of the plugin, can contains html or ruby code\r
-   * @deprecated since 2.2. The description must be set in the manifest.\r
-   */\r
-  @Deprecated\r
-  String getDescription();\r
-\r
-  /**\r
-   * Classes of the implemented extensions.\r
-   */\r
-  List getExtensions();\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api;
+
+import java.util.List;
+
+/**
+ * A plugin is a group of extensions. See <code>org.sonar.api.Extension</code> interface to get all extension points.
+ * <p/>
+ * <p>The manifest property <code>Plugin-Class</code> must declare the name of the implementation class.
+ * See META-INF/MANIFEST.MF.</p>
+ *
+ * @see org.sonar.api.Extension
+ * @since 1.10
+ */
+public interface Plugin {
+
+  /**
+   * Unique key within sonar plugins
+   * @deprecated since 2.2. The key must be set in the manifest.
+   */
+  @Deprecated
+  String getKey();
+
+  /**
+   * Descriptive name
+   * @deprecated since 2.2. The name must be set in the manifest.
+   */
+  @Deprecated
+  String getName();
+
+  /**
+   * description of the plugin, can contains html or ruby code
+   * @deprecated since 2.2. The description must be set in the manifest.
+   */
+  @Deprecated
+  String getDescription();
+
+  /**
+   * Classes of the implemented extensions.
+   */
+  List getExtensions();
+
+}
index 28f5d0a22d9ac412614f7b751d114939580ec9be..774d7200fc24fcf4c7c1831aab5b7a3175d30d21 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index eef5ee38a4e4141060940901fde1b1078753ca1e..7e08e7ff6991481569c2d3719209b92f6ef32ad7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fe034f36a401716facb519061240f07604a18ced..b71fe2af2d428185db1754536f3af90190fcdd0c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6d7a2ed5699eec67740cc8123d982453d7718959..0c35e475bad8b9a56670826aeab7fe7fe51c594e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e5df16769331bc0c9acebfbcfeccef92e13d48d9..e947f1fd78e9c36bfbddf763b725bde294fb6fd4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0045af529b5301d9000b39bfefffad882ffd8ebb..8eef4cc57a709325cac31551f17bea62a7017438 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 552a9e7856df4919e191d4e90feb126343889fa1..05fa66cfce6828e3ca7227da6700af9cc1926dc5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7ba2f877974e231e406824a7a9894d963fb1bac2..df91617c705cbe0924a10fb38c960719b8260b1d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 303be1f6ab6fbf2c1d398aad5e9e6f1880a0e540..87d22a237542d7ba3b4544e090ff55eaa67751d0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b20016abef408f53fd10bd5c6c92731f94e0113d..3e57f9a91beaa20f3977941a1cf249fe59e1e0d9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8c64927a43338dc8823c5ebc8e52e4c99622c1a9..27ca7d1b36fe442e1eec5a9bd31fadfbd6b428cb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2406a8868c06b49ccd2926e291e2398c7b834928..4172b02a072182c7a17ec18f0de6a5514c479fb0 100644 (file)
@@ -1,88 +1,88 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.batch;\r
-\r
-import org.sonar.api.measures.CoreMetrics;\r
-import org.sonar.api.measures.MeasureUtils;\r
-import org.sonar.api.measures.Metric;\r
-import org.sonar.api.resources.Language;\r
-import org.sonar.api.resources.Project;\r
-import org.sonar.api.resources.Resource;\r
-\r
-import java.util.Arrays;\r
-import java.util.List;\r
-\r
-/**\r
- * @deprecated since 2.1, a formula has been implemented on the metric, so no need to have decorator anymore\r
- * @since 1.13\r
- */\r
-@Deprecated\r
-public abstract class AbstractFunctionComplexityDecorator implements Decorator {\r
-\r
-  private Language language;\r
-\r
-  /**\r
-   * @param language this will be use to defined whether the decorator should be executed on a project\r
-   */\r
-  public AbstractFunctionComplexityDecorator(Language language) {\r
-    this.language = language;\r
-  }\r
-\r
-  /**\r
-   * {@inheritDoc}\r
-   */\r
-  public boolean shouldExecuteOnProject(Project project) {\r
-    return language.equals(project.getLanguage());\r
-  }\r
-\r
-  /**\r
-   * Used to define upstream dependencies\r
-   */\r
-  @DependsUpon\r
-  public List<Metric> dependsUponFileAndComplexityMetrics() {\r
-    return Arrays.asList(CoreMetrics.FUNCTIONS, CoreMetrics.COMPLEXITY);\r
-  }\r
-\r
-  /**\r
-   * Used to define downstream dependencies\r
-   */\r
-  @DependedUpon\r
-  public Metric generateFileComplexityMetric() {\r
-    return CoreMetrics.FUNCTION_COMPLEXITY;\r
-  }\r
-\r
-  /**\r
-   * {@inheritDoc}\r
-   */\r
-  public void decorate(Resource resource, DecoratorContext context) {\r
-    if (!shouldDecorateResource(resource, context)) {\r
-      return;\r
-    }\r
-    Double functions = MeasureUtils.getValue(context.getMeasure(CoreMetrics.FUNCTIONS), null);\r
-    Double complexity = MeasureUtils.getValue(context.getMeasure(CoreMetrics.COMPLEXITY), null);\r
-    if (complexity != null && functions != null && functions > 0.0) {\r
-      context.saveMeasure(CoreMetrics.FUNCTION_COMPLEXITY, complexity / functions);\r
-    }\r
-  }\r
-\r
-  private boolean shouldDecorateResource(Resource resource, DecoratorContext context) {\r
-    return !MeasureUtils.hasValue(context.getMeasure(CoreMetrics.FUNCTION_COMPLEXITY));\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.batch;
+
+import org.sonar.api.measures.CoreMetrics;
+import org.sonar.api.measures.MeasureUtils;
+import org.sonar.api.measures.Metric;
+import org.sonar.api.resources.Language;
+import org.sonar.api.resources.Project;
+import org.sonar.api.resources.Resource;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @deprecated since 2.1, a formula has been implemented on the metric, so no need to have decorator anymore
+ * @since 1.13
+ */
+@Deprecated
+public abstract class AbstractFunctionComplexityDecorator implements Decorator {
+
+  private Language language;
+
+  /**
+   * @param language this will be use to defined whether the decorator should be executed on a project
+   */
+  public AbstractFunctionComplexityDecorator(Language language) {
+    this.language = language;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  public boolean shouldExecuteOnProject(Project project) {
+    return language.equals(project.getLanguage());
+  }
+
+  /**
+   * Used to define upstream dependencies
+   */
+  @DependsUpon
+  public List<Metric> dependsUponFileAndComplexityMetrics() {
+    return Arrays.asList(CoreMetrics.FUNCTIONS, CoreMetrics.COMPLEXITY);
+  }
+
+  /**
+   * Used to define downstream dependencies
+   */
+  @DependedUpon
+  public Metric generateFileComplexityMetric() {
+    return CoreMetrics.FUNCTION_COMPLEXITY;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  public void decorate(Resource resource, DecoratorContext context) {
+    if (!shouldDecorateResource(resource, context)) {
+      return;
+    }
+    Double functions = MeasureUtils.getValue(context.getMeasure(CoreMetrics.FUNCTIONS), null);
+    Double complexity = MeasureUtils.getValue(context.getMeasure(CoreMetrics.COMPLEXITY), null);
+    if (complexity != null && functions != null && functions > 0.0) {
+      context.saveMeasure(CoreMetrics.FUNCTION_COMPLEXITY, complexity / functions);
+    }
+  }
+
+  private boolean shouldDecorateResource(Resource resource, DecoratorContext context) {
+    return !MeasureUtils.hasValue(context.getMeasure(CoreMetrics.FUNCTION_COMPLEXITY));
+  }
+}
index 6ea9adeefeb0c6bf48a21d3ac354e9caacb6a4ac..f2d2285121b1b034cc0d5407b04577ea810b9d02 100644 (file)
@@ -1,83 +1,83 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-\r
-package org.sonar.api.batch;\r
-\r
-import org.sonar.api.measures.CoreMetrics;\r
-import org.sonar.api.measures.CountDistributionBuilder;\r
-import org.sonar.api.measures.Measure;\r
-import org.sonar.api.measures.Metric;\r
-import org.sonar.api.resources.Language;\r
-import org.sonar.api.resources.Project;\r
-import org.sonar.api.resources.Resource;\r
-\r
-/**\r
- * @deprecated since 2.1, a formula has been implemented on the metric, so no need to have decorator anymore\r
- * @since 2.0\r
- */\r
-@Deprecated\r
-public abstract class AbstractFunctionComplexityDistributionDecorator implements Decorator {\r
-\r
-  private CountDistributionBuilder builder = new CountDistributionBuilder(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION);\r
-  private Language language;\r
-\r
-  public AbstractFunctionComplexityDistributionDecorator(Language language) {\r
-    this.language = language;\r
-  }\r
-\r
-  @DependedUpon\r
-  public Metric generatesMetrics() {\r
-    return CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION;\r
-  }\r
-\r
-  public boolean shouldExecuteOnProject(Project project) {\r
-    return language.equals(project.getLanguage());\r
-  }\r
-\r
-  public void decorate(Resource resource, DecoratorContext context) {\r
-    if (shouldDecorateResource(context)) {\r
-      reset();\r
-      saveDistribution(context);\r
-    }\r
-  }\r
-\r
-  private void saveDistribution(DecoratorContext context) {\r
-    for (Measure childMeasure : context.getChildrenMeasures(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION)) {\r
-      builder.add(childMeasure);\r
-    }\r
-\r
-    if (!builder.isEmpty()) {\r
-      context.saveMeasure(builder.build());\r
-    }\r
-  }\r
-\r
-  private void reset() {\r
-    builder.clear();\r
-  }\r
-\r
-  private boolean shouldDecorateResource(DecoratorContext context) {\r
-    return context.getMeasure(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION) == null;\r
-  }\r
-\r
-  @Override\r
-  public String toString() {\r
-    return getClass().getSimpleName();\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
+package org.sonar.api.batch;
+
+import org.sonar.api.measures.CoreMetrics;
+import org.sonar.api.measures.CountDistributionBuilder;
+import org.sonar.api.measures.Measure;
+import org.sonar.api.measures.Metric;
+import org.sonar.api.resources.Language;
+import org.sonar.api.resources.Project;
+import org.sonar.api.resources.Resource;
+
+/**
+ * @deprecated since 2.1, a formula has been implemented on the metric, so no need to have decorator anymore
+ * @since 2.0
+ */
+@Deprecated
+public abstract class AbstractFunctionComplexityDistributionDecorator implements Decorator {
+
+  private CountDistributionBuilder builder = new CountDistributionBuilder(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION);
+  private Language language;
+
+  public AbstractFunctionComplexityDistributionDecorator(Language language) {
+    this.language = language;
+  }
+
+  @DependedUpon
+  public Metric generatesMetrics() {
+    return CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION;
+  }
+
+  public boolean shouldExecuteOnProject(Project project) {
+    return language.equals(project.getLanguage());
+  }
+
+  public void decorate(Resource resource, DecoratorContext context) {
+    if (shouldDecorateResource(context)) {
+      reset();
+      saveDistribution(context);
+    }
+  }
+
+  private void saveDistribution(DecoratorContext context) {
+    for (Measure childMeasure : context.getChildrenMeasures(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION)) {
+      builder.add(childMeasure);
+    }
+
+    if (!builder.isEmpty()) {
+      context.saveMeasure(builder.build());
+    }
+  }
+
+  private void reset() {
+    builder.clear();
+  }
+
+  private boolean shouldDecorateResource(DecoratorContext context) {
+    return context.getMeasure(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION) == null;
+  }
+
+  @Override
+  public String toString() {
+    return getClass().getSimpleName();
+  }
+}
index 0c796b83ec09ad90f26dee149d5e28b240137dd0..8adbf97d8edfee0c0c02a6d656ad3e347fab4264 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0bf31ec6289d22f5fbe8b9844122ce494e9374c1..2dc603c13df958405e8dbb9e7ef4246392ad0ca1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1f88ae1e07a75b4bc6706e2924b2f80a7420e672..806323bbdfba43d91308538c464ab31cb25cbd40 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f9b78d9291e64a23aa7305c4c6d0ff65562442a7..27c576fe2d2a0c099a7aa825cf51f10b88e1a48f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index eda71d16176fc2e62c8ed6e95bdb84a220bb78dc..bca75b9740c10f0c7b54b017ed750ebed94cf9f2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cd2d644af05e76e09cca7946cb8c7e378aae1566..50e670da5524b8bb7d9ac7f0fde9fc49a21a30a7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fa2e9bf7d519840d89fd42af6d8f7010c2659fe8..c20d2ead49f23f203d857e1c5618050379cb2fdc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3a2a02c13731c8b6ce4ab6cb07603d353fe7946e..429050ecc74218eb12ff23451b750a25bd426a1b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dc5c5b9dc58a783083eb9ae3fecd6a8a07b72c7d..8ee17e565b8ef22502a1513f2acc922c1f9cb9b2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fc93120794c3ffa60c1c63aec03fcf9d27d4ff4f..583d5746cffca8f9a035015939a987a2f20abd43 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3fa3da535c65b273fb4518efa247e39916c86c97..5bda1453f3c1f951e2e016da78cce0253ba4a923 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7b141fc7c7592dd03b1ab5384d75b2a38a741d6b..f02d8e213ceacb5d9b9ba3048a993f90b24221dc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2b76a94556c3b3a4f3c606d09ace8c6260b6ed0c..f6e4a3c00e0512b5ea3ba409ec1ad2958ad807e7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3444cef62413792c28790ef11dbefec2b8c13ed0..99fa3aa5b302463df896fb86eba39e4ac215da98 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5be1d69f32dce7e657f4572ea4f5b072da8d7bda..e80cb2085b8586614a3101ed255032fd0965a458 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cba406cc73e178b88d4b96bb4fcfc4a485583896..8d1732e469c25af41d06a1c66fe6101d7a2d75aa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1b7f2285b6c33463d89a8686169230d07b216d10..2d20e18b1cfaa529365a8a4b58801f6702958848 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 03337afa5e7e642e8399a2c76169bfb00e9c3bfd..9fffa244dbff2a94274ac49813bbe5befdc714c1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 12280f5923721ac1d993b040b4f51127e7ad5e67..b235b0cf6c59c70e18af9aa61384e440cefaa529 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 42216fb46f0e0ca7f32e83ffda01cb6eb697e3bd..590a48441715bb4e8e6e92bc78bb2aada4516573 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c39b7fae02e445ae4e06201f4a7dcff9803082f5..ee50d58e49e8fc86c78986175e6b4775e54ccf95 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8ac007a1e6ae013e1f44a81cfa2f93a6d4da1f94..872e6f7f027218a739686a27f1794c6ab172f096 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cf441562c1b3256c07ce1a9c4983500886d6ff57..b7974c57a2c0e6099941e6be7e1f23122a82f193 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e101640a6ee65ee6cf82f949f1f6d7cd9f180b76..f6dbdcd9f64ff63170c1fffeecb99bf7a19d26a0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4c62a97d5d20d2ad8d1b0d2ac147ed9772032d99..7862c224b29f4d589211b775ced805550f307f0e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e7387c1ad9f511de7be407e654d2fb021a9a6670..738c0f62234ac655bf41b60b660f2b17595463ef 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4047179fcaf5bcdb196db8bc6594f74d031eadec..13f8818d0bc775e4690a65659fcc68e928936bb5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 341674cd2276d9b01f58da5489f393d59b03d556..0bf1f9d0a6faf57eaf0a546efa69ccc927283ebe 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4f79260e8e72a437b1ebd6d54416f633ae4e96ff..26e69a20f437f13839cd5ebd95e57f1f38448724 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f6a7670fd70d2efe89f852417bc01d4737ff4784..e860e0473d864003a9a3008e4355711a272898b4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 661051b3437c20195b18a7cb2825d9f82d9d3765..11ffecb52b608b2eb21f6c62440de6b7c7802c0a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 10406c81f6e945e980274e01d593c84ac195f1ce..85778173c5dd007a8c75a930c504403ec68ae644 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cfcb7e81485e25f9a29ae39e4b2a4b40f6af4142..62de82a85710194a6eb59e3ae1a28d1e8344745f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 753eca570a0f8c937c2bcadec172411a18db9451..5d2707a35cfb891bf9fa80db887b6c89f7f8ccbc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 21a661007f00463badb807e6a53431e03a6a7d1d..1ebe7107fb0184456cec43d536fe93c76a7b230c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7af4babe623fcd39043605a673427ae2d85fc61c..06226c79128a450467fc8b4a1eb95c826988f78f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2e0d9f2883b8c731cad3dce80a343662e94d46e2..c7cabc3751cbbddeb6f49137f4bdb4db59a6d11c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5e338665c6ead8b916c4aef4c408c28b8cd9652d..2b8d64faf1481ed0d00ff1f7d2ea67a68b72701e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d583cae1575a68282d32fee990a0c583eb042922..df4f8f0840c667cf35f9157162b1b4a4d0b2d7ad 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4e4fb0cf122b718c53c79f021a94fc8d03d0fa42..a264acc937d4f580e90ce5d09b88403181b58372 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 603a913cb294192c15171423983aa7eb7d76715f..8b6ed15b8d6b50b22dc1b6fa36eb3a2f2fe35eac 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ae6d727c00d422a872f3b833aab8225acfd9811e..e36a22e8e3f6f9ad8ecb0fda8afc83de38dd2116 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c1424846765a5e911a013baabf12338d651faf06..2abee562b202e892492bc079f3e946a5258d5c53 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.database.model;\r
-\r
-import org.apache.commons.lang.builder.EqualsBuilder;\r
-import org.apache.commons.lang.builder.HashCodeBuilder;\r
-import org.apache.commons.lang.builder.ToStringBuilder;\r
-import org.sonar.api.database.BaseIdentifiable;\r
-\r
-import java.util.Date;\r
-import javax.persistence.*;\r
-\r
-/**\r
- * Class to map an aysync measure with hibernate model\r
- */\r
-@Entity\r
-@Table(name = "async_measure_snapshots")\r
-public class AsyncMeasureSnapshot extends BaseIdentifiable {\r
-\r
-  @Column(name = "project_measure_id", updatable = true, nullable = true)\r
-  private Long measureId;\r
-\r
-  @Temporal(TemporalType.TIMESTAMP)\r
-  @Column(name = "measure_date", updatable = true, nullable = true)\r
-  private Date measureDate;\r
-\r
-  @Column(name = "snapshot_id", updatable = true, nullable = true)\r
-  private Integer snapshotId;\r
-\r
-  @Temporal(TemporalType.TIMESTAMP)\r
-  @Column(name = "snapshot_date", updatable = true, nullable = true)\r
-  private Date snapshotDate;\r
-\r
-  @Column(name = "metric_id", updatable = true, nullable = true)\r
-  private Integer metricId;\r
-\r
-  @Column(name = "project_id", updatable = true, nullable = true)\r
-  private Integer projectId;\r
-\r
-  /**\r
-   * This is the constructor to use\r
-   *\r
-   * @param measureId\r
-   * @param snapshotId the snapshot id to which the measure is attached\r
-   * @param measureDate the date of the measure\r
-   * @param snapshotDate the snapshot date\r
-   * @param metricId the metric the measure is attached to\r
-   * @param projectId the id of the project\r
-   */\r
-  public AsyncMeasureSnapshot(Long measureId, Integer snapshotId, Date measureDate, Date snapshotDate, Integer metricId, Integer projectId) {\r
-    this.measureId = measureId;\r
-    this.measureDate = measureDate;\r
-    this.snapshotId = snapshotId;\r
-    this.snapshotDate = snapshotDate;\r
-    this.projectId = projectId;\r
-    this.metricId = metricId;\r
-  }\r
-\r
-  /**\r
-   * Default constructor\r
-   */\r
-  public AsyncMeasureSnapshot() {\r
-  }\r
-\r
-  public Long getMeasureId() {\r
-    return measureId;\r
-  }\r
-\r
-  public void setMeasureId(Long measureId) {\r
-    this.measureId = measureId;\r
-  }\r
-\r
-  public Integer getSnapshotId() {\r
-    return snapshotId;\r
-  }\r
-\r
-  public void setSnapshotId(Integer snapshotId) {\r
-    this.snapshotId = snapshotId;\r
-  }\r
-\r
-  public Date getMeasureDate() {\r
-    return measureDate;\r
-  }\r
-\r
-  public void setMeasureDate(Date measureDate) {\r
-    this.measureDate = measureDate;\r
-  }\r
-\r
-  public Date getSnapshotDate() {\r
-    return snapshotDate;\r
-  }\r
-\r
-  public void setSnapshotDate(Date snapshotDate) {\r
-    this.snapshotDate = snapshotDate;\r
-  }\r
-\r
-  public Integer getMetricId() {\r
-    return metricId;\r
-  }\r
-\r
-  public void setMetricId(Integer metricId) {\r
-    this.metricId = metricId;\r
-  }\r
-\r
-  public Integer getProjectId() {\r
-    return projectId;\r
-  }\r
-\r
-  public void setProjectId(Integer projectId) {\r
-    this.projectId = projectId;\r
-  }\r
-\r
-  public void setMeasure(MeasureModel measure) {\r
-    setMeasureId(measure.getId());\r
-    setMeasureDate(measure.getMeasureDate());\r
-  }\r
-\r
-  @Override\r
-  public boolean equals(Object obj) {\r
-    if (!(obj instanceof AsyncMeasureSnapshot)) {\r
-      return false;\r
-    }\r
-    if (this == obj) {\r
-      return true;\r
-    }\r
-    AsyncMeasureSnapshot other = (AsyncMeasureSnapshot) obj;\r
-    return new EqualsBuilder()\r
-      .append(measureId, other.getMeasureId())\r
-      .append(measureDate, other.getMeasureDate())\r
-      .append(snapshotId, other.getSnapshotId())\r
-      .append(snapshotDate, other.getSnapshotDate())\r
-      .isEquals();\r
-  }\r
-\r
-  @Override\r
-  public int hashCode() {\r
-    return new HashCodeBuilder(17, 37)\r
-      .append(measureId)\r
-      .append(measureDate)\r
-      .append(snapshotDate)\r
-      .append(snapshotId)\r
-      .toHashCode();\r
-  }\r
-\r
-  @Override\r
-  public String toString() {\r
-    return new ToStringBuilder(this)\r
-      .append("id", getId())\r
-      .append("measureId", measureId)\r
-      .append("measureDate", measureDate)\r
-      .append("snapshotId", snapshotId)\r
-      .append("snapshotDate", snapshotDate)\r
-      .toString();\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.database.model;
+
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.sonar.api.database.BaseIdentifiable;
+
+import java.util.Date;
+import javax.persistence.*;
+
+/**
+ * Class to map an aysync measure with hibernate model
+ */
+@Entity
+@Table(name = "async_measure_snapshots")
+public class AsyncMeasureSnapshot extends BaseIdentifiable {
+
+  @Column(name = "project_measure_id", updatable = true, nullable = true)
+  private Long measureId;
+
+  @Temporal(TemporalType.TIMESTAMP)
+  @Column(name = "measure_date", updatable = true, nullable = true)
+  private Date measureDate;
+
+  @Column(name = "snapshot_id", updatable = true, nullable = true)
+  private Integer snapshotId;
+
+  @Temporal(TemporalType.TIMESTAMP)
+  @Column(name = "snapshot_date", updatable = true, nullable = true)
+  private Date snapshotDate;
+
+  @Column(name = "metric_id", updatable = true, nullable = true)
+  private Integer metricId;
+
+  @Column(name = "project_id", updatable = true, nullable = true)
+  private Integer projectId;
+
+  /**
+   * This is the constructor to use
+   *
+   * @param measureId
+   * @param snapshotId the snapshot id to which the measure is attached
+   * @param measureDate the date of the measure
+   * @param snapshotDate the snapshot date
+   * @param metricId the metric the measure is attached to
+   * @param projectId the id of the project
+   */
+  public AsyncMeasureSnapshot(Long measureId, Integer snapshotId, Date measureDate, Date snapshotDate, Integer metricId, Integer projectId) {
+    this.measureId = measureId;
+    this.measureDate = measureDate;
+    this.snapshotId = snapshotId;
+    this.snapshotDate = snapshotDate;
+    this.projectId = projectId;
+    this.metricId = metricId;
+  }
+
+  /**
+   * Default constructor
+   */
+  public AsyncMeasureSnapshot() {
+  }
+
+  public Long getMeasureId() {
+    return measureId;
+  }
+
+  public void setMeasureId(Long measureId) {
+    this.measureId = measureId;
+  }
+
+  public Integer getSnapshotId() {
+    return snapshotId;
+  }
+
+  public void setSnapshotId(Integer snapshotId) {
+    this.snapshotId = snapshotId;
+  }
+
+  public Date getMeasureDate() {
+    return measureDate;
+  }
+
+  public void setMeasureDate(Date measureDate) {
+    this.measureDate = measureDate;
+  }
+
+  public Date getSnapshotDate() {
+    return snapshotDate;
+  }
+
+  public void setSnapshotDate(Date snapshotDate) {
+    this.snapshotDate = snapshotDate;
+  }
+
+  public Integer getMetricId() {
+    return metricId;
+  }
+
+  public void setMetricId(Integer metricId) {
+    this.metricId = metricId;
+  }
+
+  public Integer getProjectId() {
+    return projectId;
+  }
+
+  public void setProjectId(Integer projectId) {
+    this.projectId = projectId;
+  }
+
+  public void setMeasure(MeasureModel measure) {
+    setMeasureId(measure.getId());
+    setMeasureDate(measure.getMeasureDate());
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (!(obj instanceof AsyncMeasureSnapshot)) {
+      return false;
+    }
+    if (this == obj) {
+      return true;
+    }
+    AsyncMeasureSnapshot other = (AsyncMeasureSnapshot) obj;
+    return new EqualsBuilder()
+      .append(measureId, other.getMeasureId())
+      .append(measureDate, other.getMeasureDate())
+      .append(snapshotId, other.getSnapshotId())
+      .append(snapshotDate, other.getSnapshotDate())
+      .isEquals();
+  }
+
+  @Override
+  public int hashCode() {
+    return new HashCodeBuilder(17, 37)
+      .append(measureId)
+      .append(measureDate)
+      .append(snapshotDate)
+      .append(snapshotId)
+      .toHashCode();
+  }
+
+  @Override
+  public String toString() {
+    return new ToStringBuilder(this)
+      .append("id", getId())
+      .append("measureId", measureId)
+      .append("measureDate", measureDate)
+      .append("snapshotId", snapshotId)
+      .append("snapshotDate", snapshotDate)
+      .toString();
+  }
+}
index f5b3ecd4694e64d014842def3372f90bbc81f873..c9606f6a265918f25476e2492655acc0802d4bf7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 276f6b919e8d32d5593c264691035c6ced299d62..adc29ed1ddf1afc3e49d19df04cfd63bef98e860 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bb8f1c13380fde02398fdab1591a8c5ef5dd5197..2a744bbbae6337c51fda506bc7da547262320292 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 66a7ccb317284cd97e4670d9857c76d785403849..ae0f9531c891c7e56a12bb43343f2bbef945c30e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4258e0ea2888c03f196d90fadd2038f0b380a575..dfb46f333b83902181bcd6d9cad6042a9e7d0c71 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d0c12682172c3b22ba5296da954126e394767fa2..6a631ab808c6aa786416b40e9ecfb288d65a658c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5ddb3703b00a21af8bbc7e52d0b15fd042262d06..8c428324501277af94284b800c02d04d2eb811b9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 17c9c5de8d56ce0fcf83614e09697ca842dbb0fb..99516e3bac23354b4b547ed72d5e9ad90e6178ad 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d29bee13fa21f704184cec7d72ab63348a911e5c..40de2688d24908eb5f0dfdfa1d5e9135c87d2363 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4b8bdb37b8f8c0ba9d27c1ef20a5026be4dd0bd4..b1edc4f27a268196ffc04e02348ac0700ee77d60 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ab1c36d8c0a8e08211f2175ac00255948729b5fc..0b5c68efb46dbb87ca37ebb8c229f227aafe118b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d8350e01398e0d0c4091a426e8e5e9ca39d9b0f8..5d21668d08352eec4fd0e709d14c981f254d2bc4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8d93892204d1d3314227df801bcd568880286040..8d2fca484da6cf9cc83566d2d0ea0f97795ee098 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6ca8ddcc9a68f949da300bd9ea4fd71e8b8d5bcd..38012c656e737d0c6f508296a77bf644ef361e91 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 003d4c63416256929e1a4daba4dc60be913cfa69..fa6788793b1dd6c5b0d250cf45a25b09eeae70f5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1e33d2081540440e7a27e4be55bf8a673144ccd3..2a234b1cd3ef38338a1256b11ce45881610decb0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 949cc8aa2e11fda0d6b14c135b879df693e782aa..e27d13cf69ec795a311273f3706f458d0bf7c8ea 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 36630a8c515254e5454b54e1093c47315d874c6f..f48e830a697b31ff885f6988c19d944d14abb6b2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dae6e3d1154ed2b8d479809b56c0b2f6727f33ef..aca0c1ca364fff0095fdcba719a3aa7b1ffa7eba 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ef406abd1c53c4c9302f5866f0a3cdf275573f5c..62a5c946002e07c68cfd0ec811a57575df08cb72 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2b74a78a500ca7e6582226e95530213129c7d32e..9d4ef31510c2aff7268bce153799237d8ee65025 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 73305be154ab1a7016280b7d2d5dee1c72a51f4b..781b63eef1329ddb8c2a0bbbfea5118f23a38cbc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0083d62b17e7ffa7d63ddc13d2b510f559bf59fd..7df87b9f2740c8ca20dcee94bb46791e1e146c99 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c733e59a6374ca46de2de283f87c985892c7b249..6a29a569a51c5ac98b7ca7cc94387bf8893640a6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 47404215eb003c649a385a5f2416fb46f5c6d584..6781f919062bb6649adb6343a2ae54c11e476255 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 620b8646287072a63cdcdf7ea02a042bf8fff2f1..95291718a388efbf3cf70069fc2f007a99ea77aa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c9e148ffaf1f05ea44fec1c7ff8025f872e7be36..93bbe04e9e5f3146e42393a3e41e4c6a43c7a5b8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 76e6395071354bf480155c66e508cb96fe41d989..c3ca678e7e2b6cc6f6ac674007bd8fdf7c2c1952 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d80b78ddc1219ef5218632605b4262dfd0eaad24..5d5a78772ceed9a545a511677046a79754865cf9 100644 (file)
@@ -1,67 +1,67 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.measures;\r
-\r
-import org.sonar.api.resources.Scopes;\r
-\r
-import java.util.Collection;\r
-import java.util.Collections;\r
-import java.util.List;\r
-\r
-/**\r
- * @since 2.0\r
- *\r
- * Used to consolidate a distribution measure throughout the resource tree\r
- */\r
-public class SumChildDistributionFormula implements Formula {\r
-\r
-  private String minimumScopeToPersist= Scopes.FILE;\r
-\r
-  public List<Metric> dependsUponMetrics() {\r
-    return Collections.emptyList();\r
-  }\r
-\r
-  public String getMinimumScopeToPersist() {\r
-    return minimumScopeToPersist;\r
-  }\r
-\r
-  public SumChildDistributionFormula setMinimumScopeToPersist(String s) {\r
-    this.minimumScopeToPersist = s;\r
-    return this;\r
-  }\r
-\r
-  public Measure calculate(FormulaData data, FormulaContext context) {\r
-    Collection<Measure> measures = data.getChildrenMeasures(context.getTargetMetric());\r
-    if (measures == null || measures.isEmpty()) {\r
-      return null;\r
-    }\r
-    else {\r
-      RangeDistributionBuilder distribution = new RangeDistributionBuilder(context.getTargetMetric());\r
-      for (Measure measure : measures) {\r
-        distribution.add(measure);\r
-      }\r
-      Measure measure = distribution.build();\r
-      if (!Scopes.isHigherThanOrEquals(context.getResource().getScope(), minimumScopeToPersist)) {\r
-        measure.setPersistenceMode(PersistenceMode.MEMORY);\r
-      }\r
-      return measure;\r
-    }\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.measures;
+
+import org.sonar.api.resources.Scopes;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @since 2.0
+ *
+ * Used to consolidate a distribution measure throughout the resource tree
+ */
+public class SumChildDistributionFormula implements Formula {
+
+  private String minimumScopeToPersist= Scopes.FILE;
+
+  public List<Metric> dependsUponMetrics() {
+    return Collections.emptyList();
+  }
+
+  public String getMinimumScopeToPersist() {
+    return minimumScopeToPersist;
+  }
+
+  public SumChildDistributionFormula setMinimumScopeToPersist(String s) {
+    this.minimumScopeToPersist = s;
+    return this;
+  }
+
+  public Measure calculate(FormulaData data, FormulaContext context) {
+    Collection<Measure> measures = data.getChildrenMeasures(context.getTargetMetric());
+    if (measures == null || measures.isEmpty()) {
+      return null;
+    }
+    else {
+      RangeDistributionBuilder distribution = new RangeDistributionBuilder(context.getTargetMetric());
+      for (Measure measure : measures) {
+        distribution.add(measure);
+      }
+      Measure measure = distribution.build();
+      if (!Scopes.isHigherThanOrEquals(context.getResource().getScope(), minimumScopeToPersist)) {
+        measure.setPersistenceMode(PersistenceMode.MEMORY);
+      }
+      return measure;
+    }
+  }
+}
index e6b271ccaf03f8241673fe5b5b04507229aa6f48..6626c56960a99bc20edee995bdd374bbf1858a26 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 219679255a1042cb417beda07141292e9e134dc8..a74ec9218d238acf85392e162cec05050f6c66aa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6279c473ed3df9f0caceaf61efcc8eac369a4beb..57d36283fe9f5cde20c202741bf9b96d54d0b467 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 49e42cd4c8cff863e8f91495e50ebaab85e3e0b3..391de9706e0a164195505bb3edf59683a7daed04 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3b2e3ab33b47af1f8322e9bb577b85c060deb8b1..37d06ad35d6712c3595dea3d3943b52a55d0cd3b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 11f2015c1e609d2b34d2266ea22f495c78ba4753..8a8d6439bd77b1e905156ac60af0a0b667e4340c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7f051e1a412060b26f7c9bf88979e11b6e4feba3..46a9eb5af3479829c998bf1c56b724d8c45a03fe 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0e16e12dc7cb6d155facd9ab6cd1144307695ab3..11ae4766160c076041fc5aa2777901ace7cb7862 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dad047afa70499c648c421e2c356507f422bc064..c036b0b7ad42a5ca152ae2b01fd31f6ac2febfe6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 843dfecd23619245aa0bc63d29ed2335164309f6..0dcb53476004194aa44b16ce88a9fbe91b15805e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5fc713eecf1745c04a29606d0c407b8414dc4d29..a67a79767e5ce6afd45587fa2a4ca5af8a314197 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 69aa3c99b73993d48cc9e75f890d7b703217a364..e7ea7d1102fb65fce52ab745bb5013b2f9b34550 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6a495bb508ac986b9f140e4bde118a4b016cfc5d..79efce248a5c3beb4e3bdfcf373c889b65faa553 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8bf0cc62e66624fedf7fec057a9dc5d214722e11..bb703814ce5c88fce90c211c58a1fe3e68f85ad7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9427f0c17655efa98c5f45df5e950b1420c95c90..5b34326daf696f6312cc77f42eb4b7d04c4a4d57 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2ca74d70fdc9cdb9654b0345213924c1461d5be5..dc571927ed29a8c76981ca1d30ea2e7297575095 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e462aa809f3c3e4f67d7086b09b4666ebd7db0c2..016cf384ac0dfdf8394dd0a1d73329008e417086 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f36a61c6c5268ce6156f4ae27fd89a0fc879f0aa..c1bea71a961345be30dc7d5aac0c36b63fa09eb7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 911041553e4c88bf7f43b51dfd370684d566d76f..a78ab64a1831d50ceb985c2cfd2977e587784769 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 874d64bf68d1ff371613d9f23dd2af54a8b469f7..525b2460c4e7d3a40cc2448de3cb131ed15ae057 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6a8eb7aaf7ca15d1f0d992aa776d96f132cbea17..4c202dfdfdb0f0ce4ab7893689e90ae66d547ece 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 66ff26eae7f825fc129ac663c245ff144a5746d8..be742894d03ba06ca37b2ee0c8e793754d48e1a7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 26fe63effe9fbfa7d7d3bd4521b164ae53719858..865311bd928386ab2a2d1642873c0c2aea825fe8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ee6bbe1ac0388c8489015a3e64272a6cb85c9a99..38cf6bc2b72eb5d017445c8f07e0b881ed9d29f2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d63e8918d2cb75cafc12b1a9e40b6834761c0c84..0c2520fd226bd470108538129f93797197e12438 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b21358002177a069fd6dca98ee2097cf959ffb25..4f7ede6c019ece95f08fb9754627ead5802b0b41 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d1eec28b7b31dd250935bd3b657ded7ee8e5a648..f21eaf0fa966b733ec5eb875b14e301e66415475 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 40872867c7ed32c8ac81747db13f22ac73d3f508..975078084d38f9086b9ecbee2285174be1b42160 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 803dafaee580248f88d52f946e650fc0e6877615..e3f2f36d42c5375e166cf838002aa10d3967ac2f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4f5f22c683ecfa5c3a154bc0c7cbcf434224592f..1081d449f4d3c5bd5de9b9435b49825be978b4c0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dc0f729e9e018d548a084f1a215da9757eca8574..1949efea86c2abfbd5e88e48345481713647deb9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0ec5528ca9fe3899a85e93911d7fa08d48a43d9e..7da6eb3f8004c221fb89a7f5be0c55cddfcb6447 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a86ffb650e53572a26efcc1d40f271f15320683e..78da354b8332c01724bcd59ea56f172567f80dee 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9908252d11ea6314d4cebfd997403d6df6e1c4c3..03062e94de3d41352fa8831859903bae2a5b5d0b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 61f85842340b601144d06d19c279db0706ff76dd..1fa4ee3c45b536df29ff72a1ad2b57bd4e3cef41 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5737d3da5f695b02827c3a323c525a63594a5974..ecee7d5b0372d6d569809813d6ab6fc1ab7c5af4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a670714ecb05798d40afb01c4426811f38e4b42e..4bba4c02788cb340e5d62a7b4a1031f5dee7f005 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f8353c02f0d0ad265f13477042c2abfdc484dec5..f3cb290e15e50a0b7ffd578545a03edc856cebb7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b81c3dc7b468045e272061095b75c331604ed8f7..f2f9b0511e4d5d09bc112e64b445e401b5518fa1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 800c4863dbd0488fbde841c442cba52f7a86a7b0..96ba251e7a32dd6258ecb23cc0a0c971f0bbc74a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 11c40999642ecb600a80885b5f073d2cb962a5c4..ebe66187b7e3093953b405f47e29eec9457ea97b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index eb6728f6a6e15b4d106878a2ea378703fa4caa87..8f55f87474313199bdb14ef0401e7034d0ab7fb5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ff4f05d4dc08c935618aac905e0ae00577e411c1..2f4677ed36655b5f1e10769d050d44da29164582 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5fe233feb0d9e54df41bc28eb2cc57a85a73d8d1..2da2c6c23526ddcb62510b6733512d0832e61b61 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8691a34458b71005ba270e47610e0e75b1170ef9..56526ba2e9de772e778354263e262ff82f5de73d 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.rules;\r
-\r
-import org.apache.commons.lang.builder.EqualsBuilder;\r
-import org.apache.commons.lang.builder.HashCodeBuilder;\r
-\r
-import javax.persistence.*;\r
-\r
-@Entity\r
-@Table(name = "active_rule_parameters")\r
-public class ActiveRuleParam implements Cloneable {\r
-\r
-\r
-  @Id\r
-  @Column(name = "id")\r
-  @GeneratedValue\r
-  private Integer id;\r
-\r
-  @ManyToOne(fetch = FetchType.LAZY)\r
-  @JoinColumn(name = "active_rule_id")\r
-  private ActiveRule activeRule;\r
-\r
-  @ManyToOne(fetch = FetchType.LAZY, optional = true)\r
-  @JoinColumn(name = "rules_parameter_id")\r
-  private RuleParam ruleParam;\r
-\r
-  @Column(name = "value", updatable = false, nullable = true, length = 4000)\r
-  private String value;\r
-\r
-  public Integer getId() {\r
-    return id;\r
-  }\r
-\r
-  /**\r
-   * @deprecated visibility should be decreased to protected or package\r
-   */\r
-  @Deprecated\r
-  void setId(Integer id) {\r
-    this.id = id;\r
-  }\r
-\r
-  /**\r
-   * @deprecated visibility should be decreased to protected or package\r
-   */\r
-  @Deprecated\r
-  public ActiveRuleParam() {\r
-  }\r
-\r
-  /**\r
-   * @deprecated visibility should be decreased to protected or package\r
-   */\r
-  @Deprecated\r
-  public ActiveRuleParam(ActiveRule activeRule, RuleParam ruleParam, String value) {\r
-    this.activeRule = activeRule;\r
-    this.ruleParam = ruleParam;\r
-    this.value = value;\r
-  }\r
-\r
-  public ActiveRule getActiveRule() {\r
-    return activeRule;\r
-  }\r
-\r
-  /**\r
-   * @deprecated visibility should be decreased to protected or package\r
-   */\r
-  @Deprecated\r
-  public void setActiveRule(ActiveRule activeRule) {\r
-    this.activeRule = activeRule;\r
-  }\r
-\r
-  public RuleParam getRuleParam() {\r
-    return ruleParam;\r
-  }\r
-\r
-  /**\r
-   * @deprecated visibility should be decreased to protected or package\r
-   */\r
-  @Deprecated\r
-  public void setRuleParam(RuleParam ruleParam) {\r
-    this.ruleParam = ruleParam;\r
-  }\r
-\r
-  public String getValue() {\r
-    return value;\r
-  }\r
-\r
-  public void setValue(String value) {\r
-    this.value = value;\r
-  }\r
-\r
-  public String getKey() {\r
-    return ruleParam.getKey();\r
-  }\r
-\r
-  @Override\r
-  public boolean equals(Object obj) {\r
-    if (!(obj instanceof RuleParam)) {\r
-      return false;\r
-    }\r
-    if (this == obj) {\r
-      return true;\r
-    }\r
-    RuleParam other = (RuleParam) obj;\r
-    return new EqualsBuilder()\r
-        .append(getId(), other.getKey()).isEquals();\r
-  }\r
-\r
-  @Override\r
-  public int hashCode() {\r
-    return new HashCodeBuilder(17, 37)\r
-        .append(getId())\r
-        .toHashCode();\r
-  }\r
-\r
-  @Override\r
-  public Object clone() {\r
-    return new ActiveRuleParam(getActiveRule(), getRuleParam(), getValue());\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.rules;
+
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "active_rule_parameters")
+public class ActiveRuleParam implements Cloneable {
+
+
+  @Id
+  @Column(name = "id")
+  @GeneratedValue
+  private Integer id;
+
+  @ManyToOne(fetch = FetchType.LAZY)
+  @JoinColumn(name = "active_rule_id")
+  private ActiveRule activeRule;
+
+  @ManyToOne(fetch = FetchType.LAZY, optional = true)
+  @JoinColumn(name = "rules_parameter_id")
+  private RuleParam ruleParam;
+
+  @Column(name = "value", updatable = false, nullable = true, length = 4000)
+  private String value;
+
+  public Integer getId() {
+    return id;
+  }
+
+  /**
+   * @deprecated visibility should be decreased to protected or package
+   */
+  @Deprecated
+  void setId(Integer id) {
+    this.id = id;
+  }
+
+  /**
+   * @deprecated visibility should be decreased to protected or package
+   */
+  @Deprecated
+  public ActiveRuleParam() {
+  }
+
+  /**
+   * @deprecated visibility should be decreased to protected or package
+   */
+  @Deprecated
+  public ActiveRuleParam(ActiveRule activeRule, RuleParam ruleParam, String value) {
+    this.activeRule = activeRule;
+    this.ruleParam = ruleParam;
+    this.value = value;
+  }
+
+  public ActiveRule getActiveRule() {
+    return activeRule;
+  }
+
+  /**
+   * @deprecated visibility should be decreased to protected or package
+   */
+  @Deprecated
+  public void setActiveRule(ActiveRule activeRule) {
+    this.activeRule = activeRule;
+  }
+
+  public RuleParam getRuleParam() {
+    return ruleParam;
+  }
+
+  /**
+   * @deprecated visibility should be decreased to protected or package
+   */
+  @Deprecated
+  public void setRuleParam(RuleParam ruleParam) {
+    this.ruleParam = ruleParam;
+  }
+
+  public String getValue() {
+    return value;
+  }
+
+  public void setValue(String value) {
+    this.value = value;
+  }
+
+  public String getKey() {
+    return ruleParam.getKey();
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (!(obj instanceof RuleParam)) {
+      return false;
+    }
+    if (this == obj) {
+      return true;
+    }
+    RuleParam other = (RuleParam) obj;
+    return new EqualsBuilder()
+        .append(getId(), other.getKey()).isEquals();
+  }
+
+  @Override
+  public int hashCode() {
+    return new HashCodeBuilder(17, 37)
+        .append(getId())
+        .toHashCode();
+  }
+
+  @Override
+  public Object clone() {
+    return new ActiveRuleParam(getActiveRule(), getRuleParam(), getValue());
+  }
+
+}
index 619a01c3c7e78d3599da1317aae3fbf5a92e7600..7c6ae5c0b1a89339a99c41415e0faa440efae8a5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b36285885754ddb19e847b7047f1c481aa38f873..4fc69f2332e1c6f236030509bf471a56b9b373d7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 238763e2603697636558663c831a90dfc5d4a27b..4f1e1462fffd8f2f068373ce0fc7d9d7f2c2ae16 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.rules;\r
-\r
-import org.apache.commons.lang.StringUtils;\r
-import org.apache.commons.lang.builder.EqualsBuilder;\r
-import org.apache.commons.lang.builder.HashCodeBuilder;\r
-import org.apache.commons.lang.builder.ToStringBuilder;\r
-import org.sonar.api.database.DatabaseProperties;\r
-import org.sonar.check.Cardinality;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-import javax.persistence.*;\r
-\r
-@Entity\r
-@Table(name = "rules")\r
-public final class Rule {\r
-\r
-  private final static RulesCategory NONE = new RulesCategory("none");\r
-  \r
-  @Id\r
-  @Column(name = "id")\r
-  @GeneratedValue\r
-  private Integer id;\r
-\r
-  /**\r
-   * The default priority given to a rule if not explicitly set\r
-   */\r
-  public static final RulePriority DEFAULT_PRIORITY = RulePriority.MAJOR;\r
-\r
-  @Column(name = "name", updatable = true, nullable = false)\r
-  private String name;\r
-\r
-  @Column(name = "plugin_rule_key", updatable = false, nullable = true, length = 200)\r
-  private String key;\r
-\r
-  @Column(name = "enabled", updatable = true, nullable = true)\r
-  private Boolean enabled = Boolean.TRUE;\r
-\r
-  @Column(name = "plugin_config_key", updatable = true, nullable = true, length = 500)\r
-  private String configKey;\r
-\r
-  // Godin: This field should be named priority, otherwise StandardRulesXmlParserTest fails\r
-  @Column(name = "priority", updatable = true, nullable = true)\r
-  @Enumerated(EnumType.ORDINAL)\r
-  private RulePriority priority = DEFAULT_PRIORITY;\r
-\r
-  @Column(name = "description", updatable = true, nullable = true, length = DatabaseProperties.MAX_TEXT_SIZE)\r
-  private String description;\r
-\r
-  @Column(name = "plugin_name", updatable = true, nullable = false)\r
-  private String pluginName;\r
-\r
-  @Enumerated(EnumType.STRING)\r
-  @Column(name = "cardinality", updatable = true, nullable = false)\r
-  private Cardinality cardinality = Cardinality.SINGLE;\r
-\r
-  @ManyToOne(fetch = FetchType.EAGER)\r
-  @JoinColumn(name = "parent_id", updatable = true, nullable = true)\r
-  private Rule parent = null;\r
-\r
-  @org.hibernate.annotations.Cascade({ org.hibernate.annotations.CascadeType.ALL, org.hibernate.annotations.CascadeType.DELETE_ORPHAN })\r
-  @OneToMany(mappedBy = "rule")\r
-  private List<RuleParam> params = new ArrayList<RuleParam>();\r
-\r
-  /**\r
-   * @deprecated since 2.3. Use the factory method {@link #create()}\r
-   */\r
-  @Deprecated\r
-  public Rule() {\r
-    // TODO reduce visibility to package\r
-  }\r
-\r
-  /**\r
-   * Creates rule with minimum set of info\r
-   * \r
-   * @param pluginName the plugin name indicates which plugin the rule belongs to\r
-   * @param key the key should be unique within a plugin, but it is even more careful for the time being that it is unique across the\r
-   *          application\r
-   * @deprecated since 2.3. Use the factory method {@link #create()}\r
-   */\r
-  @Deprecated\r
-  public Rule(String pluginName, String key) {\r
-    this.pluginName = pluginName;\r
-    this.key = key;\r
-    this.configKey = key;\r
-  }\r
-\r
-  /**\r
-   * Creates a fully qualified rule\r
-   * \r
-   * @param pluginKey the plugin the rule belongs to\r
-   * @param key the key should be unique within a plugin, but it is even more careful for the time being that it is unique across the\r
-   *          application\r
-   * @param name the name displayed in the UI\r
-   * @param rulesCategory the ISO category the rule belongs to\r
-   * @param severity this is the severity associated to the rule\r
-   * @deprecated since 2.3. Use the factory method {@link #create()}\r
-   */\r
-  @Deprecated\r
-  public Rule(String pluginKey, String key, String name, RulesCategory rulesCategory, RulePriority severity) {\r
-    setName(name);\r
-    this.key = key;\r
-    this.configKey = key;\r
-    this.priority = severity;\r
-    this.pluginName = pluginKey;\r
-  }\r
-\r
-  /**\r
-   * @deprecated since 2.3. Use the factory method {@link #create()}\r
-   */\r
-  @Deprecated\r
-  public Rule(String name, String key, RulesCategory rulesCategory, String pluginName, String description) {\r
-    this();\r
-    setName(name);\r
-    this.key = key;\r
-    this.configKey = key;\r
-    this.pluginName = pluginName;\r
-    this.description = description;\r
-  }\r
-\r
-  /**\r
-   * @deprecated since 2.3. Use the factory method {@link #create()}\r
-   */\r
-  @Deprecated\r
-  public Rule(String name, String key, String configKey, RulesCategory rulesCategory, String pluginName, String description) {\r
-    this();\r
-    setName(name);\r
-    this.key = key;\r
-    this.configKey = configKey;\r
-    this.pluginName = pluginName;\r
-    this.description = description;\r
-  }\r
-\r
-  public Integer getId() {\r
-    return id;\r
-  }\r
-\r
-  /**\r
-   * @deprecated since 2.3. visibility should be decreased to protected or package\r
-   */\r
-  @Deprecated\r
-  public void setId(Integer id) {\r
-    this.id = id;\r
-  }\r
-\r
-  public String getName() {\r
-    return name;\r
-  }\r
-\r
-  /**\r
-   * Sets the rule name\r
-   */\r
-  public Rule setName(String name) {\r
-    this.name = removeNewLineCharacters(name);\r
-    return this;\r
-  }\r
-\r
-  public String getKey() {\r
-    return key;\r
-  }\r
-\r
-  /**\r
-   * Sets the rule key\r
-   */\r
-  public Rule setKey(String key) {\r
-    this.key = key;\r
-    return this;\r
-  }\r
-\r
-  /**\r
-   * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007\r
-   */\r
-  @Deprecated\r
-  public RulesCategory getRulesCategory() {\r
-    return NONE;\r
-  }\r
-\r
-  /**\r
-   * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007\r
-   */\r
-  @Deprecated\r
-  public Rule setRulesCategory(RulesCategory rulesCategory) {\r
-    return this;\r
-  }\r
-\r
-  /**\r
-   * @deprecated since 2.5 use {@link #getRepositoryKey()} instead\r
-   */\r
-  @Deprecated\r
-  public String getPluginName() {\r
-    return pluginName;\r
-  }\r
-\r
-  /**\r
-   * @deprecated since 2.5 use {@link #setRepositoryKey(String)} instead\r
-   */\r
-  @Deprecated\r
-  public Rule setPluginName(String pluginName) {\r
-    this.pluginName = pluginName;\r
-    return this;\r
-  }\r
-\r
-  public String getConfigKey() {\r
-    return configKey;\r
-  }\r
-\r
-  /**\r
-   * Sets the configuration key\r
-   */\r
-  public Rule setConfigKey(String configKey) {\r
-    this.configKey = configKey;\r
-    return this;\r
-  }\r
-\r
-  public String getDescription() {\r
-    return description;\r
-  }\r
-\r
-  /**\r
-   * Sets the rule description\r
-   */\r
-  public Rule setDescription(String description) {\r
-    this.description = StringUtils.strip(description);\r
-    return this;\r
-  }\r
-\r
-  public Boolean isEnabled() {\r
-    return enabled;\r
-  }\r
-\r
-  /**\r
-   * Do not call. Used only by sonar.\r
-   */\r
-  public Rule setEnabled(Boolean b) {\r
-    this.enabled = b;\r
-    return this;\r
-  }\r
-\r
-  public List<RuleParam> getParams() {\r
-    return params;\r
-  }\r
-\r
-  public RuleParam getParam(String key) {\r
-    for (RuleParam param : params) {\r
-      if (StringUtils.equals(key, param.getKey())) {\r
-        return param;\r
-      }\r
-    }\r
-    return null;\r
-  }\r
-\r
-  /**\r
-   * Sets the rule parameters\r
-   */\r
-  public Rule setParams(List<RuleParam> params) {\r
-    this.params.clear();\r
-    for (RuleParam param : params) {\r
-      param.setRule(this);\r
-      this.params.add(param);\r
-    }\r
-    return this;\r
-  }\r
-\r
-  public RuleParam createParameter() {\r
-    RuleParam parameter = new RuleParam()\r
-        .setRule(this);\r
-    params.add(parameter);\r
-    return parameter;\r
-  }\r
-\r
-  public RuleParam createParameter(String key) {\r
-    RuleParam parameter = new RuleParam()\r
-        .setKey(key)\r
-        .setRule(this);\r
-    params.add(parameter);\r
-    return parameter;\r
-  }\r
-\r
-  /**\r
-   * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007\r
-   */\r
-  @Deprecated\r
-  public Integer getCategoryId() {\r
-    return null;\r
-  }\r
-\r
-  /**\r
-   * @since 2.5\r
-   */\r
-  public RulePriority getSeverity() {\r
-    return priority;\r
-  }\r
-\r
-  /**\r
-   * @param severity severity to set, if null, uses the default priority.\r
-   * @since 2.5\r
-   */\r
-  public Rule setSeverity(RulePriority severity) {\r
-    if (severity == null) {\r
-      this.priority = DEFAULT_PRIORITY;\r
-    } else {\r
-      this.priority = severity;\r
-    }\r
-    return this;\r
-  }\r
-\r
-  /**\r
-   * @deprecated since 2.5 use {@link #getSeverity()} instead. See http://jira.codehaus.org/browse/SONAR-1829\r
-   */\r
-  @Deprecated\r
-  public RulePriority getPriority() {\r
-    return priority;\r
-  }\r
-\r
-  /**\r
-   * Sets the rule priority. If null, uses the default priority\r
-   * \r
-   * @deprecated since 2.5 use {@link #setSeverity(RulePriority)} instead. See http://jira.codehaus.org/browse/SONAR-1829\r
-   */\r
-  @Deprecated\r
-  public Rule setPriority(RulePriority priority) {\r
-    return setSeverity(priority);\r
-  }\r
-\r
-  public String getRepositoryKey() {\r
-    return pluginName;\r
-  }\r
-\r
-  public Rule setRepositoryKey(String s) {\r
-    this.pluginName = s;\r
-    return this;\r
-  }\r
-\r
-  public Rule setUniqueKey(String repositoryKey, String key) {\r
-    return setRepositoryKey(repositoryKey).setKey(key).setConfigKey(key);\r
-  }\r
-\r
-  public Cardinality getCardinality() {\r
-    return cardinality;\r
-  }\r
-\r
-  public Rule setCardinality(Cardinality c) {\r
-    this.cardinality = c;\r
-    return this;\r
-  }\r
-\r
-  public Rule getParent() {\r
-    return parent;\r
-  }\r
-\r
-  public Rule setParent(Rule parent) {\r
-    this.parent = parent;\r
-    return this;\r
-  }\r
-\r
-  @Override\r
-  public boolean equals(Object obj) {\r
-    if (!(obj instanceof Rule)) {\r
-      return false;\r
-    }\r
-    if (this == obj) {\r
-      return true;\r
-    }\r
-    Rule other = (Rule) obj;\r
-    return new EqualsBuilder()\r
-        .append(pluginName, other.getRepositoryKey())\r
-        .append(key, other.getKey())\r
-        .isEquals();\r
-  }\r
-\r
-  @Override\r
-  public int hashCode() {\r
-    return new HashCodeBuilder(17, 37)\r
-        .append(pluginName)\r
-        .append(key)\r
-        .toHashCode();\r
-  }\r
-\r
-  @Override\r
-  public String toString() {\r
-    return new ToStringBuilder(this)\r
-        .append("id", getId())\r
-        .append("name", name)\r
-        .append("key", key)\r
-        .append("configKey", configKey)\r
-        .append("plugin", pluginName)\r
-        .toString();\r
-  }\r
-\r
-  private String removeNewLineCharacters(String text) {\r
-    String removedCRLF = StringUtils.remove(text, "\n");\r
-    removedCRLF = StringUtils.remove(removedCRLF, "\r");\r
-    removedCRLF = StringUtils.remove(removedCRLF, "\n\r");\r
-    removedCRLF = StringUtils.remove(removedCRLF, "\r\n");\r
-    return removedCRLF;\r
-  }\r
-\r
-  public static Rule create() {\r
-    return new Rule();\r
-  }\r
-\r
-  /**\r
-   * Create with all required fields\r
-   */\r
-  public static Rule create(String repositoryKey, String key, String name) {\r
-    return new Rule().setUniqueKey(repositoryKey, key).setName(name);\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.rules;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.sonar.api.database.DatabaseProperties;
+import org.sonar.check.Cardinality;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "rules")
+public final class Rule {
+
+  private final static RulesCategory NONE = new RulesCategory("none");
+  
+  @Id
+  @Column(name = "id")
+  @GeneratedValue
+  private Integer id;
+
+  /**
+   * The default priority given to a rule if not explicitly set
+   */
+  public static final RulePriority DEFAULT_PRIORITY = RulePriority.MAJOR;
+
+  @Column(name = "name", updatable = true, nullable = false)
+  private String name;
+
+  @Column(name = "plugin_rule_key", updatable = false, nullable = true, length = 200)
+  private String key;
+
+  @Column(name = "enabled", updatable = true, nullable = true)
+  private Boolean enabled = Boolean.TRUE;
+
+  @Column(name = "plugin_config_key", updatable = true, nullable = true, length = 500)
+  private String configKey;
+
+  // Godin: This field should be named priority, otherwise StandardRulesXmlParserTest fails
+  @Column(name = "priority", updatable = true, nullable = true)
+  @Enumerated(EnumType.ORDINAL)
+  private RulePriority priority = DEFAULT_PRIORITY;
+
+  @Column(name = "description", updatable = true, nullable = true, length = DatabaseProperties.MAX_TEXT_SIZE)
+  private String description;
+
+  @Column(name = "plugin_name", updatable = true, nullable = false)
+  private String pluginName;
+
+  @Enumerated(EnumType.STRING)
+  @Column(name = "cardinality", updatable = true, nullable = false)
+  private Cardinality cardinality = Cardinality.SINGLE;
+
+  @ManyToOne(fetch = FetchType.EAGER)
+  @JoinColumn(name = "parent_id", updatable = true, nullable = true)
+  private Rule parent = null;
+
+  @org.hibernate.annotations.Cascade({ org.hibernate.annotations.CascadeType.ALL, org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
+  @OneToMany(mappedBy = "rule")
+  private List<RuleParam> params = new ArrayList<RuleParam>();
+
+  /**
+   * @deprecated since 2.3. Use the factory method {@link #create()}
+   */
+  @Deprecated
+  public Rule() {
+    // TODO reduce visibility to package
+  }
+
+  /**
+   * Creates rule with minimum set of info
+   * 
+   * @param pluginName the plugin name indicates which plugin the rule belongs to
+   * @param key the key should be unique within a plugin, but it is even more careful for the time being that it is unique across the
+   *          application
+   * @deprecated since 2.3. Use the factory method {@link #create()}
+   */
+  @Deprecated
+  public Rule(String pluginName, String key) {
+    this.pluginName = pluginName;
+    this.key = key;
+    this.configKey = key;
+  }
+
+  /**
+   * Creates a fully qualified rule
+   * 
+   * @param pluginKey the plugin the rule belongs to
+   * @param key the key should be unique within a plugin, but it is even more careful for the time being that it is unique across the
+   *          application
+   * @param name the name displayed in the UI
+   * @param rulesCategory the ISO category the rule belongs to
+   * @param severity this is the severity associated to the rule
+   * @deprecated since 2.3. Use the factory method {@link #create()}
+   */
+  @Deprecated
+  public Rule(String pluginKey, String key, String name, RulesCategory rulesCategory, RulePriority severity) {
+    setName(name);
+    this.key = key;
+    this.configKey = key;
+    this.priority = severity;
+    this.pluginName = pluginKey;
+  }
+
+  /**
+   * @deprecated since 2.3. Use the factory method {@link #create()}
+   */
+  @Deprecated
+  public Rule(String name, String key, RulesCategory rulesCategory, String pluginName, String description) {
+    this();
+    setName(name);
+    this.key = key;
+    this.configKey = key;
+    this.pluginName = pluginName;
+    this.description = description;
+  }
+
+  /**
+   * @deprecated since 2.3. Use the factory method {@link #create()}
+   */
+  @Deprecated
+  public Rule(String name, String key, String configKey, RulesCategory rulesCategory, String pluginName, String description) {
+    this();
+    setName(name);
+    this.key = key;
+    this.configKey = configKey;
+    this.pluginName = pluginName;
+    this.description = description;
+  }
+
+  public Integer getId() {
+    return id;
+  }
+
+  /**
+   * @deprecated since 2.3. visibility should be decreased to protected or package
+   */
+  @Deprecated
+  public void setId(Integer id) {
+    this.id = id;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Sets the rule name
+   */
+  public Rule setName(String name) {
+    this.name = removeNewLineCharacters(name);
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Sets the rule key
+   */
+  public Rule setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  /**
+   * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007
+   */
+  @Deprecated
+  public RulesCategory getRulesCategory() {
+    return NONE;
+  }
+
+  /**
+   * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007
+   */
+  @Deprecated
+  public Rule setRulesCategory(RulesCategory rulesCategory) {
+    return this;
+  }
+
+  /**
+   * @deprecated since 2.5 use {@link #getRepositoryKey()} instead
+   */
+  @Deprecated
+  public String getPluginName() {
+    return pluginName;
+  }
+
+  /**
+   * @deprecated since 2.5 use {@link #setRepositoryKey(String)} instead
+   */
+  @Deprecated
+  public Rule setPluginName(String pluginName) {
+    this.pluginName = pluginName;
+    return this;
+  }
+
+  public String getConfigKey() {
+    return configKey;
+  }
+
+  /**
+   * Sets the configuration key
+   */
+  public Rule setConfigKey(String configKey) {
+    this.configKey = configKey;
+    return this;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  /**
+   * Sets the rule description
+   */
+  public Rule setDescription(String description) {
+    this.description = StringUtils.strip(description);
+    return this;
+  }
+
+  public Boolean isEnabled() {
+    return enabled;
+  }
+
+  /**
+   * Do not call. Used only by sonar.
+   */
+  public Rule setEnabled(Boolean b) {
+    this.enabled = b;
+    return this;
+  }
+
+  public List<RuleParam> getParams() {
+    return params;
+  }
+
+  public RuleParam getParam(String key) {
+    for (RuleParam param : params) {
+      if (StringUtils.equals(key, param.getKey())) {
+        return param;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Sets the rule parameters
+   */
+  public Rule setParams(List<RuleParam> params) {
+    this.params.clear();
+    for (RuleParam param : params) {
+      param.setRule(this);
+      this.params.add(param);
+    }
+    return this;
+  }
+
+  public RuleParam createParameter() {
+    RuleParam parameter = new RuleParam()
+        .setRule(this);
+    params.add(parameter);
+    return parameter;
+  }
+
+  public RuleParam createParameter(String key) {
+    RuleParam parameter = new RuleParam()
+        .setKey(key)
+        .setRule(this);
+    params.add(parameter);
+    return parameter;
+  }
+
+  /**
+   * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007
+   */
+  @Deprecated
+  public Integer getCategoryId() {
+    return null;
+  }
+
+  /**
+   * @since 2.5
+   */
+  public RulePriority getSeverity() {
+    return priority;
+  }
+
+  /**
+   * @param severity severity to set, if null, uses the default priority.
+   * @since 2.5
+   */
+  public Rule setSeverity(RulePriority severity) {
+    if (severity == null) {
+      this.priority = DEFAULT_PRIORITY;
+    } else {
+      this.priority = severity;
+    }
+    return this;
+  }
+
+  /**
+   * @deprecated since 2.5 use {@link #getSeverity()} instead. See http://jira.codehaus.org/browse/SONAR-1829
+   */
+  @Deprecated
+  public RulePriority getPriority() {
+    return priority;
+  }
+
+  /**
+   * Sets the rule priority. If null, uses the default priority
+   * 
+   * @deprecated since 2.5 use {@link #setSeverity(RulePriority)} instead. See http://jira.codehaus.org/browse/SONAR-1829
+   */
+  @Deprecated
+  public Rule setPriority(RulePriority priority) {
+    return setSeverity(priority);
+  }
+
+  public String getRepositoryKey() {
+    return pluginName;
+  }
+
+  public Rule setRepositoryKey(String s) {
+    this.pluginName = s;
+    return this;
+  }
+
+  public Rule setUniqueKey(String repositoryKey, String key) {
+    return setRepositoryKey(repositoryKey).setKey(key).setConfigKey(key);
+  }
+
+  public Cardinality getCardinality() {
+    return cardinality;
+  }
+
+  public Rule setCardinality(Cardinality c) {
+    this.cardinality = c;
+    return this;
+  }
+
+  public Rule getParent() {
+    return parent;
+  }
+
+  public Rule setParent(Rule parent) {
+    this.parent = parent;
+    return this;
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (!(obj instanceof Rule)) {
+      return false;
+    }
+    if (this == obj) {
+      return true;
+    }
+    Rule other = (Rule) obj;
+    return new EqualsBuilder()
+        .append(pluginName, other.getRepositoryKey())
+        .append(key, other.getKey())
+        .isEquals();
+  }
+
+  @Override
+  public int hashCode() {
+    return new HashCodeBuilder(17, 37)
+        .append(pluginName)
+        .append(key)
+        .toHashCode();
+  }
+
+  @Override
+  public String toString() {
+    return new ToStringBuilder(this)
+        .append("id", getId())
+        .append("name", name)
+        .append("key", key)
+        .append("configKey", configKey)
+        .append("plugin", pluginName)
+        .toString();
+  }
+
+  private String removeNewLineCharacters(String text) {
+    String removedCRLF = StringUtils.remove(text, "\n");
+    removedCRLF = StringUtils.remove(removedCRLF, "\r");
+    removedCRLF = StringUtils.remove(removedCRLF, "\n\r");
+    removedCRLF = StringUtils.remove(removedCRLF, "\r\n");
+    return removedCRLF;
+  }
+
+  public static Rule create() {
+    return new Rule();
+  }
+
+  /**
+   * Create with all required fields
+   */
+  public static Rule create(String repositoryKey, String key, String name) {
+    return new Rule().setUniqueKey(repositoryKey, key).setName(name);
+  }
+
+}
index b1e3f3d47fb2e99dfe907dd6c7b972faee1b70cb..719b1195b722024e67aafbfdb9adcc8e75aae6ae 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5b4fc00778a22524c44d86e42ac965315d8add7d..44f71e48630d91e89cd3d28fa0672d24cd9d0665 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c4f3725811eb61a2e23cefb20764a0d05199bd1d..5afc350344d5f42f72ce36166887524c6c55412e 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.rules;\r
-\r
-import org.apache.commons.lang.StringUtils;\r
-import org.apache.commons.lang.builder.EqualsBuilder;\r
-import org.apache.commons.lang.builder.HashCodeBuilder;\r
-import org.apache.commons.lang.builder.ToStringBuilder;\r
-\r
-import javax.persistence.*;\r
-\r
-@Entity\r
-@Table(name = "rules_parameters")\r
-public class RuleParam {\r
-\r
-  @Id\r
-  @Column(name = "id")\r
-  @GeneratedValue\r
-  private Integer id;\r
-\r
-  @ManyToOne(fetch = FetchType.EAGER)\r
-  @JoinColumn(name = "rule_id")\r
-  private Rule rule;\r
-\r
-  @Column(name = "name", updatable = true, nullable = false, length = 128)\r
-  private String key;\r
-\r
-  @Column(name = "description", updatable = true, nullable = true, length = 4000)\r
-  private String description;\r
-\r
-  @Column(name = "param_type", updatable = true, nullable = true, length = 512)\r
-  private String type = "s";\r
-\r
-  @Column(name = "default_value", updatable = true, nullable = true, length = 4000)\r
-  private String defaultValue;\r
-\r
-  /**\r
-   * @deprecated since 2.3 use the factory method Rule.setParameter()\r
-   */\r
-  @Deprecated\r
-  public RuleParam() {\r
-  }\r
-\r
-  /**\r
-   * @deprecated since 2.3 use the factory method setParameter()\r
-   */\r
-  @Deprecated\r
-  public RuleParam(Rule rule, String key, String description, String type) {\r
-    this.rule = rule;\r
-    this.key = key;\r
-    this.description = description;\r
-    this.type = type;\r
-  }\r
-\r
-  public Rule getRule() {\r
-    return rule;\r
-  }\r
-\r
-  RuleParam setRule(Rule rule) {\r
-    this.rule = rule;\r
-    return this;\r
-  }\r
-\r
-  public String getKey() {\r
-    return key;\r
-  }\r
-\r
-  public RuleParam setKey(String key) {\r
-    this.key = key;\r
-    return this;\r
-  }\r
-\r
-  public String getDescription() {\r
-    return description;\r
-  }\r
-\r
-  public RuleParam setDescription(String s) {\r
-    this.description = StringUtils.defaultString(s, "");\r
-    return this;\r
-  }\r
-\r
-  public String getType() {\r
-    return type;\r
-  }\r
-\r
-  public RuleParam setType(String type) {\r
-    this.type = type;\r
-    return this;\r
-  }\r
-\r
-  public String getDefaultValue() {\r
-    return defaultValue;\r
-  }\r
-\r
-  public Boolean getDefaultValueAsBoolean() {\r
-    if (defaultValue!=null) {\r
-      return Boolean.parseBoolean(defaultValue);\r
-    }\r
-    return null;\r
-  }\r
-\r
-  public Integer getDefaultValueAsInteger() {\r
-    if (defaultValue!=null) {\r
-      return Integer.parseInt(defaultValue);\r
-    }\r
-    return null;\r
-  }\r
-\r
-  public RuleParam setDefaultValue(String s) {\r
-    this.defaultValue = s;\r
-    return this;\r
-  }\r
-\r
-  @Override\r
-  public boolean equals(Object obj) {\r
-    if (!(obj instanceof RuleParam)) {\r
-      return false;\r
-    }\r
-    if (this == obj) {\r
-      return true;\r
-    }\r
-    RuleParam other = (RuleParam) obj;\r
-    return new EqualsBuilder()\r
-        //.append(rule, other.getRule())\r
-        .append(key, other.getKey()).isEquals();\r
-  }\r
-\r
-  @Override\r
-  public int hashCode() {\r
-    return new HashCodeBuilder(17, 37)\r
-        //.append(rule)\r
-        .append(key)\r
-        .toHashCode();\r
-  }\r
-\r
-  @Override\r
-  public String toString() {\r
-    return new ToStringBuilder(this)\r
-        .append("id", id)\r
-        .append("key", key)\r
-        .append("desc", description)\r
-        .append("type", type)\r
-        .toString();\r
-  }\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.rules;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "rules_parameters")
+public class RuleParam {
+
+  @Id
+  @Column(name = "id")
+  @GeneratedValue
+  private Integer id;
+
+  @ManyToOne(fetch = FetchType.EAGER)
+  @JoinColumn(name = "rule_id")
+  private Rule rule;
+
+  @Column(name = "name", updatable = true, nullable = false, length = 128)
+  private String key;
+
+  @Column(name = "description", updatable = true, nullable = true, length = 4000)
+  private String description;
+
+  @Column(name = "param_type", updatable = true, nullable = true, length = 512)
+  private String type = "s";
+
+  @Column(name = "default_value", updatable = true, nullable = true, length = 4000)
+  private String defaultValue;
+
+  /**
+   * @deprecated since 2.3 use the factory method Rule.setParameter()
+   */
+  @Deprecated
+  public RuleParam() {
+  }
+
+  /**
+   * @deprecated since 2.3 use the factory method setParameter()
+   */
+  @Deprecated
+  public RuleParam(Rule rule, String key, String description, String type) {
+    this.rule = rule;
+    this.key = key;
+    this.description = description;
+    this.type = type;
+  }
+
+  public Rule getRule() {
+    return rule;
+  }
+
+  RuleParam setRule(Rule rule) {
+    this.rule = rule;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  public RuleParam setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  public RuleParam setDescription(String s) {
+    this.description = StringUtils.defaultString(s, "");
+    return this;
+  }
+
+  public String getType() {
+    return type;
+  }
+
+  public RuleParam setType(String type) {
+    this.type = type;
+    return this;
+  }
+
+  public String getDefaultValue() {
+    return defaultValue;
+  }
+
+  public Boolean getDefaultValueAsBoolean() {
+    if (defaultValue!=null) {
+      return Boolean.parseBoolean(defaultValue);
+    }
+    return null;
+  }
+
+  public Integer getDefaultValueAsInteger() {
+    if (defaultValue!=null) {
+      return Integer.parseInt(defaultValue);
+    }
+    return null;
+  }
+
+  public RuleParam setDefaultValue(String s) {
+    this.defaultValue = s;
+    return this;
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (!(obj instanceof RuleParam)) {
+      return false;
+    }
+    if (this == obj) {
+      return true;
+    }
+    RuleParam other = (RuleParam) obj;
+    return new EqualsBuilder()
+        //.append(rule, other.getRule())
+        .append(key, other.getKey()).isEquals();
+  }
+
+  @Override
+  public int hashCode() {
+    return new HashCodeBuilder(17, 37)
+        //.append(rule)
+        .append(key)
+        .toHashCode();
+  }
+
+  @Override
+  public String toString() {
+    return new ToStringBuilder(this)
+        .append("id", id)
+        .append("key", key)
+        .append("desc", description)
+        .append("type", type)
+        .toString();
+  }
 }
\ No newline at end of file
index cd2b00afa8a7f143dcdf4ac82d17f059870cbb54..16ddc13664bfd3114cb415e1cfeb3ec50892c8c7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8d434e0654abfa4fc2f1fcd788d6ac54f630ee75..6357f9aea85f1f6d89e772a7e10d66904d754283 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 755aa90c094fc7d72b6da372525cce75d07f3cb8..5b84b90549a1435cd9f4ed967219600242c4ec6d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5fc9ae3edc7838723d4919d3680560d5f883cb2a..bbbf9be162f6cf9d34f9170a8275fa09b27206c7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 207a6b01d5f8493b80c08c9abd3225e720aae786..f455b0a5fb424f3a5373addb0f0473597e86f98f 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.rules;\r
-\r
-import org.apache.commons.lang.builder.EqualsBuilder;\r
-import org.apache.commons.lang.builder.HashCodeBuilder;\r
-import org.apache.commons.lang.builder.ToStringBuilder;\r
-import org.hibernate.annotations.Cache;\r
-import org.hibernate.annotations.CacheConcurrencyStrategy;\r
-import org.hibernate.annotations.Immutable;\r
-import org.sonar.api.database.BaseIdentifiable;\r
-import org.sonar.check.IsoCategory;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.Table;\r
-\r
-/**\r
- * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007\r
- */\r
-@Deprecated\r
-@Immutable\r
-@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)\r
-@Entity\r
-@Table(name = "rules_categories")\r
-public class RulesCategory extends BaseIdentifiable {\r
-\r
-  @Column(name = "name", updatable = false, nullable = false)\r
-  private String name;\r
-\r
-  @Column(name = "description", updatable = false, nullable = true)\r
-  private String description;\r
-\r
-  /**\r
-   * Creates a RuleCategory based on the category name\r
-   *\r
-   * @param name the category name\r
-   */\r
-  public RulesCategory(String name) {\r
-    this.name = name;\r
-  }\r
-\r
-  /**\r
-   * Creates a category based on the category name and description\r
-   *\r
-   * @param name        the category name\r
-   * @param description the category description\r
-   */\r
-  public RulesCategory(String name, String description) {\r
-    this.name = name;\r
-    this.description = description;\r
-  }\r
-\r
-  /**\r
-   * Creates an empty category\r
-   */\r
-  public RulesCategory() {\r
-  }\r
-\r
-  /**\r
-   * @return the category name\r
-   */\r
-  public String getName() {\r
-    return name;\r
-  }\r
-\r
-  /**\r
-   * Sets the category name\r
-   *\r
-   * @param name the name\r
-   */\r
-  public void setName(String name) {\r
-    this.name = name;\r
-  }\r
-\r
-  /**\r
-   * @return the category description\r
-   */\r
-  public String getDescription() {\r
-    return description;\r
-  }\r
-\r
-  /**\r
-   * Sets the cay description\r
-   *\r
-   * @param description the description\r
-   */\r
-  public void setDescription(String description) {\r
-    this.description = description;\r
-  }\r
-\r
-  @Override\r
-  public boolean equals(Object obj) {\r
-    if (!(obj instanceof RulesCategory)) {\r
-      return false;\r
-    }\r
-    if (this == obj) {\r
-      return true;\r
-    }\r
-    RulesCategory other = (RulesCategory) obj;\r
-    return new EqualsBuilder()\r
-        .append(name, other.getName()).isEquals();\r
-  }\r
-\r
-  @Override\r
-  public int hashCode() {\r
-    return new HashCodeBuilder(17, 37)\r
-        .append(name)\r
-        .toHashCode();\r
-  }\r
-\r
-  @Override\r
-  public String toString() {\r
-    return new ToStringBuilder(this)\r
-        .append("id", getId())\r
-        .append("name", name)\r
-        .append("desc", description)\r
-        .toString();\r
-  }\r
-\r
-  public IsoCategory toIsoCategory() {\r
-    if (name.equals(Iso9126RulesCategories.EFFICIENCY.getName())) {\r
-      return IsoCategory.Efficiency;\r
-    }\r
-    if (name.equals(Iso9126RulesCategories.MAINTAINABILITY.getName())) {\r
-      return IsoCategory.Maintainability;\r
-    }\r
-    if (name.equals(Iso9126RulesCategories.PORTABILITY.getName())) {\r
-      return IsoCategory.Portability;\r
-    }\r
-    if (name.equals(Iso9126RulesCategories.RELIABILITY.getName())) {\r
-      return IsoCategory.Reliability;\r
-    }\r
-    if (name.equals(Iso9126RulesCategories.USABILITY.getName())) {\r
-      return IsoCategory.Usability;\r
-    }\r
-    return null;\r
-  }\r
-\r
-  public static RulesCategory fromIsoCategory(IsoCategory iso) {\r
-    if (iso == IsoCategory.Efficiency) {\r
-      return Iso9126RulesCategories.EFFICIENCY;\r
-    }\r
-    if (iso == IsoCategory.Maintainability) {\r
-      return Iso9126RulesCategories.MAINTAINABILITY;\r
-    }\r
-    if (iso == IsoCategory.Portability) {\r
-      return Iso9126RulesCategories.PORTABILITY;\r
-    }\r
-    if (iso == IsoCategory.Reliability) {\r
-      return Iso9126RulesCategories.RELIABILITY;\r
-    }\r
-    if (iso == IsoCategory.Usability) {\r
-      return Iso9126RulesCategories.USABILITY;\r
-    }\r
-    return null;\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.rules;
+
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.hibernate.annotations.Cache;
+import org.hibernate.annotations.CacheConcurrencyStrategy;
+import org.hibernate.annotations.Immutable;
+import org.sonar.api.database.BaseIdentifiable;
+import org.sonar.check.IsoCategory;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+
+/**
+ * @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007
+ */
+@Deprecated
+@Immutable
+@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
+@Entity
+@Table(name = "rules_categories")
+public class RulesCategory extends BaseIdentifiable {
+
+  @Column(name = "name", updatable = false, nullable = false)
+  private String name;
+
+  @Column(name = "description", updatable = false, nullable = true)
+  private String description;
+
+  /**
+   * Creates a RuleCategory based on the category name
+   *
+   * @param name the category name
+   */
+  public RulesCategory(String name) {
+    this.name = name;
+  }
+
+  /**
+   * Creates a category based on the category name and description
+   *
+   * @param name        the category name
+   * @param description the category description
+   */
+  public RulesCategory(String name, String description) {
+    this.name = name;
+    this.description = description;
+  }
+
+  /**
+   * Creates an empty category
+   */
+  public RulesCategory() {
+  }
+
+  /**
+   * @return the category name
+   */
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Sets the category name
+   *
+   * @param name the name
+   */
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  /**
+   * @return the category description
+   */
+  public String getDescription() {
+    return description;
+  }
+
+  /**
+   * Sets the cay description
+   *
+   * @param description the description
+   */
+  public void setDescription(String description) {
+    this.description = description;
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (!(obj instanceof RulesCategory)) {
+      return false;
+    }
+    if (this == obj) {
+      return true;
+    }
+    RulesCategory other = (RulesCategory) obj;
+    return new EqualsBuilder()
+        .append(name, other.getName()).isEquals();
+  }
+
+  @Override
+  public int hashCode() {
+    return new HashCodeBuilder(17, 37)
+        .append(name)
+        .toHashCode();
+  }
+
+  @Override
+  public String toString() {
+    return new ToStringBuilder(this)
+        .append("id", getId())
+        .append("name", name)
+        .append("desc", description)
+        .toString();
+  }
+
+  public IsoCategory toIsoCategory() {
+    if (name.equals(Iso9126RulesCategories.EFFICIENCY.getName())) {
+      return IsoCategory.Efficiency;
+    }
+    if (name.equals(Iso9126RulesCategories.MAINTAINABILITY.getName())) {
+      return IsoCategory.Maintainability;
+    }
+    if (name.equals(Iso9126RulesCategories.PORTABILITY.getName())) {
+      return IsoCategory.Portability;
+    }
+    if (name.equals(Iso9126RulesCategories.RELIABILITY.getName())) {
+      return IsoCategory.Reliability;
+    }
+    if (name.equals(Iso9126RulesCategories.USABILITY.getName())) {
+      return IsoCategory.Usability;
+    }
+    return null;
+  }
+
+  public static RulesCategory fromIsoCategory(IsoCategory iso) {
+    if (iso == IsoCategory.Efficiency) {
+      return Iso9126RulesCategories.EFFICIENCY;
+    }
+    if (iso == IsoCategory.Maintainability) {
+      return Iso9126RulesCategories.MAINTAINABILITY;
+    }
+    if (iso == IsoCategory.Portability) {
+      return Iso9126RulesCategories.PORTABILITY;
+    }
+    if (iso == IsoCategory.Reliability) {
+      return Iso9126RulesCategories.RELIABILITY;
+    }
+    if (iso == IsoCategory.Usability) {
+      return Iso9126RulesCategories.USABILITY;
+    }
+    return null;
+  }
+}
index ceab5652c7e2ce295d5e6b8c1f465742f471c845..284dbeffceb02441f90f8101cb76c7b18c3b020f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 46995265c462fd4795c59648facc116ec0ae6750..de54e2298773b0fc6ad45a6054bcc67b7fe9ae5c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8eadd746680e52d9d880b4e1dc7c33b84ca43cab..bd3b33af3b62aab622a35448f4a519bd2cac5a4b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2493ac0b7c30d0124761406d834ce3d4ec57ebe8..0dce5bea8847bb59cedeefb8141b39cfd44a655a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 069042f048f40e20753dfac9a790867a69665e5b..41dbc13cfeafc8e8ddb40306a3a0fb5f56212343 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 15e42b57087ab5caeda0903857ac5ae86c1a151d..eb1a8a105982f223be575306d7f69d5799f970f7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bcf9e1a512ec94e949c8fa231e37a37ad9c828d5..7afb1120c945b5ff4cc9b8ebce7757b233cb735e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 923e1606e101bce96f103e65fb5daf18f3beaaa0..aba708165ed35260090a0bf1ffe75c0b969a454b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 87bb6b2c035b6778d0e8cabe713cedd29793b690..7791d04fd49151fc9eaa1995fd400ae475e27088 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ebfd9b603a05782b1ffd25f99c19c28125239830..6bfe9d62807c156fdbe9da01880d6a1b5acadebc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index aac614f317b686a0cf070f6ff49deece50621515..787162c228cd97881a15c152a094a9b764cc3f14 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c438f2c58b7c80d74b5791a6c80b58edb5e3d2e0..9b3dcf6fb2edbda125bd7b32003a49aae0552cb6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8154c5dbfd4ca5ee8011769e81aeac1f40d480a5..ccc85fa226f15bcbe0509ec4a403fc9d23cc5686 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d1130e26267e137b173e509ea29ec0c954d1f541..71df08e847817fafc391cb6714967e7e61ba316c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6e154a59b0b498de4982957fa3ccf12e770d7437..616912af755a34deadd2b07de221bd8dd2f8dbde 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9ab2a1865132d5ff6c6491188fdd9a5e743f7c4c..50f1933ca525667bb4e6e918e9b669a36592af4c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 44a00f3c774b676a04beec4a76073a7a42da5de0..1f0ed02b0bb65d265780c61a911edee0da34c3b4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e210f59abed498faa66d362dab8d8f8f123729af..2078e831ac3a15ab66f01a0e87619778e9996084 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 06a5b96e403b45587432c4460edeb4ded33d013c..fc2a2401191f05cf32aa017a5062255189ab6ec5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d081de68d40575eb62300422cd4078e1e4b84041..38650527e006e28f7e913e3c98bfeddefb3a049d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c76c0bfcaf90c80d6c041dd2d1ac1da2abcfa53b..36a231002ac3fedb004437b633ba819c961476f2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2aa913e19294e4aa03751de9ff1ff7c7bc129692..2f1a46a9a1d2cce2eb614ffafe3e58eab979bd36 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e81b23b28af47b51c401f66866f0b2e2c7816204..3f88367caf9236bd9f831911eee32bd67a4edaea 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6dff6e01fc90b4ea263a00731e7ae64f32943726..f1266bb7bd3241022f3b2180c0a359d14dd5160d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fdefda6ac629643a425f9f3b7d4b2ce3e6ffc2ca..a4d107347a53d4ba783ce1d2ffbb69c6b2f21619 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b35f037da9413e415903610399c909b7806c0a8a..c8967512a1cf0c9b0bc95601318f7c47025dd11a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f6348e87ee08dd005eb4d13d4369eb258ec5dbf6..49d0cd1f736c5c5f9e414b40f064d891644b65b7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b47cda548d36a963555468aa7b45b86de32e5064..fcb48e0b95e5bb1f0e12792b05fbd000331612e6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dcc5ca2179f439dff1fd3fd73c08df0f01fe0763..78be6e14d52c66a728920e74dde7d7847c3cb28c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a9f9c22428c593802bdc07a801e019351a354e86..068de017d332d6a5cc65d06e576c6310c62d9775 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a02adf2ca2d2d9b9cbef665c6a99528ab7614d40..163b742e3f953ff1cf06dfd38b7abfc7a929d1e4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 27bb8cc9bfef509a052266a1669c40494d133503..20d0a7ca39f65b140fc16c8654feab5dbd0337d9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 17baa1a731d0e05fd7034f4a822136dbd9840990..9759c3f40ae25cfc16c8703c15a7d9522daed546 100644 (file)
@@ -1,31 +1,31 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.web;\r
-\r
-import java.lang.annotation.ElementType;\r
-import java.lang.annotation.Retention;\r
-import java.lang.annotation.RetentionPolicy;\r
-import java.lang.annotation.Target;\r
-\r
-@Retention(RetentionPolicy.RUNTIME)\r
-@Target(ElementType.TYPE)\r
-public @interface Description {\r
-    String value();\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.web;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface Description {
+    String value();
+}
index 0bf9f56ee21aefba8c3dc55b81830cd2f0671230..bfaa0816cd2d215075d7b0f2bb2b61d46bcaa277 100644 (file)
@@ -1,33 +1,33 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.web;\r
-\r
-import org.sonar.api.ServerExtension;\r
-\r
-/**\r
- * @since 1.10\r
- */\r
-public interface Footer extends ServerExtension {\r
-\r
-  /**\r
-   * Static HTML (no Ruby on Rails nor GWT)\r
-   */\r
-  String getHtml();\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.web;
+
+import org.sonar.api.ServerExtension;
+
+/**
+ * @since 1.10
+ */
+public interface Footer extends ServerExtension {
+
+  /**
+   * Static HTML (no Ruby on Rails nor GWT)
+   */
+  String getHtml();
+}
index 1281aa966c7bb4cead07c40fb9afbe9f9580d0ee..508af15171277259b82af5f4603d7de671264eac 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b4942b2a6c8e4be3569b5f37622ad7c55e17caa8..7554d35b8ddeefbcc5146b99bda069654ca8a373 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3bccd751aeb48b6d7197dce337546b966a2271ff..ee24976d3c5a30619354fa816fdbc5c1311123ca 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ebed61f4f0a89cbad285aa5d3094a21a62ae65de..cb4abb46495eeabc11c9dba26834f618b93edf6f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7c8a80d3af89a42cdc5c01c896b267693c0cae88..cc7e8f2d6af1d1d610aa1dc95f5b3338c06a0fbf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7b6a02cfa0a3abb3f0608ee33c18ed44caf16f88..ee0e9340f6d9c9f4b489bd0f7183ccf8838a2830 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 82c1e7ea4db580ec143d2ec1618764c25dbe75bd..42689fb27c4a12ff1df94def27e6034eca22cfed 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7f802040597c9dcde2394108f0353223784e0380..ea82c1668d01baac4111cb60f36dbc1be1b273c3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5746873914eb2570e11abe244446bdacbf9bd0fb..94801b81221d123225b84facc77f65c3e1fc3d8b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index be2d0418919c5e5589bf322993c2d7778699fbf4..c2e645e6c5c4ea56b9d9e9eeb56b259f7f002362 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8f118df06607dc0a9a5673df42c7f6c8c76ac499..2a678aac4cc52146e68b0588c78ab4063752e0f9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 491fa25d6ddda3b91d32b4a1ae03053e2574148b..3baf1dcf48fa7c35f8175fbf82bb735bb8806231 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3e3dfabc9d41a1d4d3a32764c7594d7fb56e7468..cc2d655b7dfc5bf19aa6ee9f7c4f4a14034844bf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9610b0183c8aaf0d3b18b747a4b4e70c1aff0e59..f9330af00296272f70968fe00ed74ae9d7ffbbcd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 016dc4813919096835266650ab266782e8ff1515..e28b7a70754c2adc1e630b65095cde0e91c23a9d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b6a72ebccb963375f34badb46093098076fed17a..682accf6c0c9134cd1b5e85af15d95f5128e2156 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 81a0b872605105cb6ea280a68b76db054fdecbf6..def49bc3ac7ff431dfa2939f8d4413d64171066d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ddf1f3c361e8c0001d4973808232378957905101..0bcac0d21f15f3f9fe01acf5271558c82b073b74 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b0d21e2aa22bca6c29830e4bc178e298d54796f2..053371c8e791ff98988cb0585402a23e9c394975 100644 (file)
@@ -1,28 +1,28 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.web;\r
-\r
-import java.lang.annotation.Retention;\r
-import java.lang.annotation.RetentionPolicy;\r
-\r
-@Retention(RetentionPolicy.RUNTIME)\r
-public @interface WidgetProperties {\r
-  WidgetProperty[] value() default {};\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.web;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface WidgetProperties {
+  WidgetProperty[] value() default {};
+}
index 37d2b1205dfaeeca0ec9c719364310fcbe32ad4e..b1b4b6a8b05fd3954ed99b54c96cf244c4c1e8fc 100644 (file)
@@ -1,40 +1,40 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.web;\r
-\r
-import java.lang.annotation.ElementType;\r
-import java.lang.annotation.Retention;\r
-import java.lang.annotation.RetentionPolicy;\r
-import java.lang.annotation.Target;\r
-\r
-@Retention(RetentionPolicy.RUNTIME)\r
-@Target(ElementType.TYPE)\r
-public @interface WidgetProperty {\r
-\r
-  String key();\r
-\r
-  WidgetPropertyType type() default WidgetPropertyType.STRING;\r
-\r
-  String defaultValue() default "";\r
-\r
-  String description() default "";\r
-\r
-  boolean optional() default true;\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.web;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface WidgetProperty {
+
+  String key();
+
+  WidgetPropertyType type() default WidgetPropertyType.STRING;
+
+  String defaultValue() default "";
+
+  String description() default "";
+
+  boolean optional() default true;
+}
index 6481cd552c3266cc0578326518b19a491a1f6cf8..35c58e560f1e729e17b70afc9ef8b54a4c59fb70 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9e0842af352d5a5540b7d0a4fdff51ed60bdaabb..08ecfa30815d283165eab38d63fad8281162ec2a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0d442fd541a88eddc73d180072cd251fba3696d6..1fbc0c8422ac59eae29111251b1d90207fe91e79 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7e45a70217462de6bccc733e54f7a9bafcce7bf3..2453e5646e92f20876544e026984f7c3ab47ed67 100644 (file)
@@ -1,59 +1,59 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.web.gwt.client;\r
-\r
-import com.google.gwt.i18n.client.Dictionary;\r
-\r
-public final class ResourceDictionary {\r
-\r
-  public final static String CONF_PERMALINK_BASE = "permalink_url_base";\r
-  public final static String CONF_RESOURCE_KEY = "resource_key";\r
-  public final static String CONF_V_RESOURCE_KEY = "viewer_resource_key";\r
-  public final static String CONF_V_PLUGIN_KEY = "viewer_plugin_key";\r
-  public final static String CONF_V_METRIC_KEY = "metric";\r
-\r
-  private ResourceDictionary() {\r
-  }\r
-\r
-  public static String getPermaLinkURLBase() {\r
-    return Utils.getConfiguration(CONF_PERMALINK_BASE);\r
-  }\r
-\r
-  public static String getResourceKey() {\r
-    return Utils.getConfiguration(CONF_RESOURCE_KEY);\r
-  }\r
-\r
-  public static String getViewerResourceKey() {\r
-    return Utils.getConfiguration(CONF_V_RESOURCE_KEY);\r
-  }\r
-\r
-  public static String getViewerPluginKey() {\r
-    return Utils.getConfiguration(CONF_V_PLUGIN_KEY);\r
-  }\r
-\r
-  public static String getViewerMetricKey() {\r
-    return Utils.getConfiguration(CONF_V_METRIC_KEY);\r
-  }\r
-\r
-  public static Dictionary getResourceViewers() {\r
-    return Dictionary.getDictionary("resource_viewers");\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.web.gwt.client;
+
+import com.google.gwt.i18n.client.Dictionary;
+
+public final class ResourceDictionary {
+
+  public final static String CONF_PERMALINK_BASE = "permalink_url_base";
+  public final static String CONF_RESOURCE_KEY = "resource_key";
+  public final static String CONF_V_RESOURCE_KEY = "viewer_resource_key";
+  public final static String CONF_V_PLUGIN_KEY = "viewer_plugin_key";
+  public final static String CONF_V_METRIC_KEY = "metric";
+
+  private ResourceDictionary() {
+  }
+
+  public static String getPermaLinkURLBase() {
+    return Utils.getConfiguration(CONF_PERMALINK_BASE);
+  }
+
+  public static String getResourceKey() {
+    return Utils.getConfiguration(CONF_RESOURCE_KEY);
+  }
+
+  public static String getViewerResourceKey() {
+    return Utils.getConfiguration(CONF_V_RESOURCE_KEY);
+  }
+
+  public static String getViewerPluginKey() {
+    return Utils.getConfiguration(CONF_V_PLUGIN_KEY);
+  }
+
+  public static String getViewerMetricKey() {
+    return Utils.getConfiguration(CONF_V_METRIC_KEY);
+  }
+
+  public static Dictionary getResourceViewers() {
+    return Dictionary.getDictionary("resource_viewers");
+  }
+
+}
index 7bcee0fe809b95f9de2ca85f4995c6df60111e36..4c19d9cd61c501103dc3921663f1d546ef12e3c9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 59eb1744f83c8241b0e475f559f3e69ae1e02dec..07873b3eff28776b673a246a5aa0940fe62392c0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 119422740a5ab2ccbddae88c221aa3718b434af3..ba17c5ea0a838e7b6f82a85dc07b995a15500604 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 395687c84da93a1e01af740be43b39979461ad80..db4a15414c314af5f03023506e3f657c3ab4062c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ee70c4993bd5ac1e03dde06a50d9c4824329afb9..4f5fa9cf9bdfcc256b29886c77ecf4bf81fd150f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 42a1191947411b2c20aed12a4f969031107dea6f..2ed28c9ff686f08ab7386cc254f5df8b8e399d93 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 36a72215de41c76c60556ba10f7335086cebd4d5..51fa83584cb3f0126d66b03d16fab9173aa5e2e7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7499c0e9a14416ac9716c4ae361a4038cb9d44a0..628dc3daf238775a337561742b093af5041591fd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0dea1ab0c78f62f59458147856ba287466e97a7f..792ca98c957d5b369a6fc4dacfb1fa0bce2d65f7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e71ecb9cdba0447827993868898fe32ecb41e753..4526bbe74559c09d56b4600ec1c16ec9037fa644 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4ceebc39cbde1b53b17d714f3c02f82feaee8526..e29d8ea4f835cbc93b0019a42f2983d1b745c590 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ea573ab0bb330f33505a60433f96d9f118baea70..1509665b08b078bd141cc47bd93eb378657592bc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 431e07ebb9b854757b5a38ff9d6aa883344db9d9..f0d433a88151fdd6072b4340c5e677362a13a88d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 01814aed11103dc4b9273bcf4f7be503b9d7c50f..1700619295675c4d090c3389ee5c3697b5c326d8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dbbd9f84fe5d2b70fd9ffd817758449f440fdbc9..56cbfd9972c566b1ceac0fdd1f89e20ceb90e9fd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 16035d618479f93dec20c22bbf7021028ad21393..b984bfe038369076d8d487d70480d875cf37dff2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7accea548bf09c5fc303a7a161b3bf68b2566330..2f2e6abb335ab97bae9dcf12767a53788547b0f9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 08bff405efe1fef7b671fd63fc051a7bab389acf..dd4f5bf78739fe949f5028bc5362249f26d7b40b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dd827891912a1a770ffde0fcaf82ed5cb8712b27..ebbcd3926d502257a0b2d6e379a9cba0bd0f1564 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ce0d71fcfa87760fa9ff90636229be37f084d994..fc60936362eef4e33375ed903004079725afc4fa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a21ae80717e5f13915f94a8858c616f40f4556c7..9e522d2b028ce0e51e38b1a818b4ee3e5cda70f3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e1101ff5f930255b662cbf0fc84f3c78e37ae7be..7cd70b466cd5c0e84771ed580db02510e8420c55 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4314aa19050a0ffc11a16487f9ea88807ffe5745..ef699338d271fbc03bf407de9225c4758da292af 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9b8879f5c045b3fed0227a922cfb1337f7ced260..593254c98bb7d8a9a17e2bd5a848e5031bac2c0b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index edbccfeb04c02bde66100f3725e3285d508c26ec..ee1b5c409f1fdabe5ca2419476c22a801cc938b2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 72d45bea4df4130765190b8bd7afcf58171c1cca..440485a24d805a03a44ac5e7e49bf4562fd076bc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 358a3ae61e1ce15ded2f092d7057008c318879c8..28d1ac15e2d4d6fe4c15416baef9daa3f6a34ab2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 036b8647878dec970313155676699b1cdce04891..56e5074fe82b9056dea65d16a67dcc044d38a8ec 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3bce6e7cc9125d9fbef269c6136e3afddae00867..ffb4c6e0bc4a38082568a675d7e693be9e32a2eb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 60ad51521be6ad10ab831ded07140f2b42b552fb..815df0c99ff9c5325cb8cf42173f0c4071497e0d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 895e2a0c4452fad3d0ae7f86950091fd1d3140bf..35a9e7be52597e70a6f7272109ee97756e109c8a 100644 (file)
@@ -1,88 +1,88 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.batch;\r
-\r
-import org.junit.Test;\r
-import static org.mockito.Mockito.*;\r
-import org.sonar.api.measures.CoreMetrics;\r
-import org.sonar.api.measures.Measure;\r
-import org.sonar.api.resources.Directory;\r
-import org.sonar.api.resources.File;\r
-import org.sonar.api.resources.Java;\r
-import org.sonar.api.resources.Resource;\r
-\r
-public class AbstractFunctionComplexityDecoratorTest {\r
-\r
-  @Test\r
-  public void calculateFunctionComplexity() {\r
-\r
-    Resource directory = new Directory("fake");\r
-    DecoratorContext context = mock(DecoratorContext.class);\r
-    when(context.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 200.0));\r
-    when(context.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 500.0));\r
-\r
-    new AbstractFunctionComplexityDecorator(Java.INSTANCE) {\r
-    }.decorate(directory, context);\r
-\r
-    verify(context).saveMeasure(CoreMetrics.FUNCTION_COMPLEXITY, 2.5);\r
-  }\r
-\r
-  @Test\r
-  public void noAverageIfMissingData() {\r
-\r
-    DecoratorContext context = mock(DecoratorContext.class);\r
-    when(context.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 20.0));\r
-    Resource directory = new Directory("fake");\r
-\r
-    new AbstractFunctionComplexityDecorator(Java.INSTANCE) {\r
-    }.decorate(directory, context);\r
-\r
-    verify(context, never()).saveMeasure(eq(CoreMetrics.FUNCTION_COMPLEXITY), anyDouble());\r
-  }\r
-\r
-  @Test\r
-  public void noAverageIfZeroFiles() {\r
-    AbstractFunctionComplexityDecorator decorator = new AbstractFunctionComplexityDecorator(Java.INSTANCE) {\r
-    };\r
-\r
-    Resource directory = new Directory("fake");\r
-    DecoratorContext context = mock(DecoratorContext.class);\r
-    when(context.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 0.0));\r
-    when(context.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 500.0));\r
-\r
-    decorator.decorate(directory, context);\r
-\r
-    verify(context, never()).saveMeasure(eq(CoreMetrics.FUNCTION_COMPLEXITY), anyDouble());\r
-  }\r
-\r
-  @Test\r
-  public void doNotCalculateOnFiles() {\r
-\r
-    Resource file = new File("fake");\r
-    DecoratorContext context = mock(DecoratorContext.class);\r
-    when(context.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 1.0));\r
-    when(context.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 25.0));\r
-\r
-    new AbstractFunctionComplexityDecorator(Java.INSTANCE) {\r
-    }.decorate(file, context);\r
-\r
-    verify(context).saveMeasure(eq(CoreMetrics.FUNCTION_COMPLEXITY), anyDouble());\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.batch;
+
+import org.junit.Test;
+import static org.mockito.Mockito.*;
+import org.sonar.api.measures.CoreMetrics;
+import org.sonar.api.measures.Measure;
+import org.sonar.api.resources.Directory;
+import org.sonar.api.resources.File;
+import org.sonar.api.resources.Java;
+import org.sonar.api.resources.Resource;
+
+public class AbstractFunctionComplexityDecoratorTest {
+
+  @Test
+  public void calculateFunctionComplexity() {
+
+    Resource directory = new Directory("fake");
+    DecoratorContext context = mock(DecoratorContext.class);
+    when(context.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 200.0));
+    when(context.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 500.0));
+
+    new AbstractFunctionComplexityDecorator(Java.INSTANCE) {
+    }.decorate(directory, context);
+
+    verify(context).saveMeasure(CoreMetrics.FUNCTION_COMPLEXITY, 2.5);
+  }
+
+  @Test
+  public void noAverageIfMissingData() {
+
+    DecoratorContext context = mock(DecoratorContext.class);
+    when(context.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 20.0));
+    Resource directory = new Directory("fake");
+
+    new AbstractFunctionComplexityDecorator(Java.INSTANCE) {
+    }.decorate(directory, context);
+
+    verify(context, never()).saveMeasure(eq(CoreMetrics.FUNCTION_COMPLEXITY), anyDouble());
+  }
+
+  @Test
+  public void noAverageIfZeroFiles() {
+    AbstractFunctionComplexityDecorator decorator = new AbstractFunctionComplexityDecorator(Java.INSTANCE) {
+    };
+
+    Resource directory = new Directory("fake");
+    DecoratorContext context = mock(DecoratorContext.class);
+    when(context.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 0.0));
+    when(context.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 500.0));
+
+    decorator.decorate(directory, context);
+
+    verify(context, never()).saveMeasure(eq(CoreMetrics.FUNCTION_COMPLEXITY), anyDouble());
+  }
+
+  @Test
+  public void doNotCalculateOnFiles() {
+
+    Resource file = new File("fake");
+    DecoratorContext context = mock(DecoratorContext.class);
+    when(context.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 1.0));
+    when(context.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 25.0));
+
+    new AbstractFunctionComplexityDecorator(Java.INSTANCE) {
+    }.decorate(file, context);
+
+    verify(context).saveMeasure(eq(CoreMetrics.FUNCTION_COMPLEXITY), anyDouble());
+  }
+}
index d0048d72e0c6ff89354ecbe539696f262fc1e1d9..23a237c555dc9669116b2016d63e933c72cb330b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 90a4417dc4bcecb74e6b010121c882a82b7c8dd2..15eb48586077bd253ec84fa79fbc446f90db27de 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 267bdfdd468456285db9f6073aee9a17b0e2dbf3..210da5a4c595e2e4dc08b579a7a2cd38718f66ad 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8b5263067540469967f0e97ce46c5ade400d97b9..e98ccf5d963f5193b840ac122359499d271df4c2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3b9d1a6ab6b84f682991623cf746af1c6200781d..38378daf688953d2ee50bb061c63d9cb4088fac6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 310f0ee739c9e945979c85038af3d87f1bbc988b..66637d92b8388441626e99ccd336a28380df6e39 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 92a12cd770478df53193d6c44b3ea43ce6338e7b..e6dacbe1afc5065a0082fffbb2687f20a00b778e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 195044b8b600a2c4fc817a82a82271be0ffdef13..ffada43c8c8eb94c4a7a5b384007e3dc4e22b3dd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8f52c63c9279e936c5872a554da36afdf871ab48..06dc28eee4995f9e91e600acbbc2afa3a06074bf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d9d265e7e3e05d49cbf536087389db29ca04dd5c..2a653d153e07c9c1de70f3786b9c254e8812fd2d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 223d0f9b495cff54fe679c4de7ee9078730d1441..44f02154d807c4f11b89504b6e4b169487e51f57 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9b0e286506cb46868accc7a535a368027563919f..396ec88653b9c061b4036679c39dff8ad09bbc71 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3df303974ecd9d8fa5ec293d03a8e02ca6f20fa9..64858732615320d940f837906766aed5eceaed30 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ca8457d9ade69459fcee60e5475cf05e7cfce15d..6d0587dc124a641739572e38a27843f708a27bd1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f1ecc47e0d320682849904d782c7ef91a3adcf79..6dbc137e72d65ce586acf0be54ea32a780baec17 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 35f3c7702ea09ff7a132e126b1eea79fdf2b8309..3b9669158c654c9ddc2fce6a7eb355ae60539327 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0167652ca1043022a816febe2e71c0b56b445a63..6ef9cf34293602e206880e372562c82928649e5c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 16f7fd36083cc9e68d9a4150419ed38171a6e2e8..f5189b39d49d1737be3a1c32f91de9a8550d38d8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6667ea9efb6544d05c79143812bcdd9c2dc83457..59c47ef159d494d50156429e1090f8842e87655d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bca7706b9c616790621057e0c90795b9d4b010d4..895c38bfc9770a4ec672653fb31c0d63491cf333 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5f4d2e61fa8435a9d16f616a831132390721975b..776739af041b3a06fc4c54244573f0b66d8c9c3c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 29458cb9fd7ba397a0a7176dadc6405349aab74a..a98ffe7835f448351295feb97909638faa7ddbc2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 53702adb118b8845f778a40993c06f1316ae40bc..63815f8ec0f89fb7ee090937b826c40d36642fde 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6ab8cffe522f5c7847b16134a4a1ad526986a78e..0739e62be46e8b6015af340512dc7f2ffff53bcf 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.measures;\r
-\r
-import com.google.common.collect.Lists;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.sonar.api.resources.JavaFile;\r
-\r
-import java.util.List;\r
-\r
-import static junit.framework.Assert.assertNull;\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.junit.Assert.assertThat;\r
-import static org.mockito.Mockito.mock;\r
-import static org.mockito.Mockito.when;\r
-\r
-public class AverageComplexityFormulaTest {\r
-\r
-  private FormulaContext context;\r
-  private FormulaData data;\r
-\r
-  @Before\r
-  public void before() {\r
-    context = mock(FormulaContext.class);\r
-    when(context.getTargetMetric()).thenReturn(CoreMetrics.FUNCTION_COMPLEXITY);\r
-    data = mock(FormulaData.class);\r
-  }\r
-\r
-  @Test\r
-  public void testAverageCalculation() {\r
-    List<FormulaData> childrenData = Lists.newArrayList();\r
-    FormulaData data1 = mock(FormulaData.class);\r
-    childrenData.add(data1);\r
-    when(data1.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 43.0));\r
-    when(data1.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 107.0));\r
-\r
-    FormulaData data2 = mock(FormulaData.class);\r
-    childrenData.add(data2);\r
-    when(data2.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 127.0));\r
-    when(data2.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 233.0));\r
-\r
-    when(data.getChildren()).thenReturn(childrenData);\r
-\r
-    Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);\r
-\r
-    assertThat(measure.getValue(), is(2.0));\r
-  }\r
-\r
-  @Test\r
-  public void testWhenNoChildrenMesaures() {\r
-    List<FormulaData> childrenData = Lists.newArrayList();\r
-    when(data.getChildren()).thenReturn(childrenData);\r
-    Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);\r
-    assertNull(measure);\r
-  }\r
-\r
-  @Test\r
-  public void testWhenNoComplexityMesaures() {\r
-    List<FormulaData> childrenData = Lists.newArrayList();\r
-    FormulaData data1 = mock(FormulaData.class);\r
-    childrenData.add(data1);\r
-    when(data1.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 43.0));\r
-\r
-    when(data.getChildren()).thenReturn(childrenData);\r
-    Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);\r
-\r
-    assertNull(measure);\r
-  }\r
-\r
-  @Test\r
-  public void testWhenNoByMetricMesaures() {\r
-    List<FormulaData> childrenData = Lists.newArrayList();\r
-    FormulaData data1 = mock(FormulaData.class);\r
-    childrenData.add(data1);\r
-    when(data1.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 43.0));\r
-\r
-    when(data.getChildren()).thenReturn(childrenData);\r
-    Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);\r
-\r
-    assertNull(measure);\r
-  }\r
-\r
-  @Test\r
-  public void testWhenMixedMetrics() {\r
-    List<FormulaData> childrenData = Lists.newArrayList();\r
-    FormulaData data1 = mock(FormulaData.class);\r
-    childrenData.add(data1);\r
-    when(data1.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 43.0));\r
-    when(data1.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 107.0));\r
-\r
-    FormulaData data2 = mock(FormulaData.class);\r
-    childrenData.add(data2);\r
-    when(data2.getMeasure(CoreMetrics.PARAGRAPHS)).thenReturn(new Measure(CoreMetrics.PARAGRAPHS, 127.0));\r
-    when(data2.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 233.0));\r
-\r
-    when(data.getChildren()).thenReturn(childrenData);\r
-\r
-    Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);\r
-\r
-    assertThat(measure.getValue(), is(2.5));\r
-  }\r
-\r
-  @Test\r
-  public void testCalculationForFIle() {\r
-    when(data.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 60.0));\r
-    when(data.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 20.0));\r
-    when(context.getResource()).thenReturn(new JavaFile("foo"));\r
-\r
-    Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);\r
-    assertThat(measure.getValue(), is(3.0));\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.measures;
+
+import com.google.common.collect.Lists;
+import org.junit.Before;
+import org.junit.Test;
+import org.sonar.api.resources.JavaFile;
+
+import java.util.List;
+
+import static junit.framework.Assert.assertNull;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public class AverageComplexityFormulaTest {
+
+  private FormulaContext context;
+  private FormulaData data;
+
+  @Before
+  public void before() {
+    context = mock(FormulaContext.class);
+    when(context.getTargetMetric()).thenReturn(CoreMetrics.FUNCTION_COMPLEXITY);
+    data = mock(FormulaData.class);
+  }
+
+  @Test
+  public void testAverageCalculation() {
+    List<FormulaData> childrenData = Lists.newArrayList();
+    FormulaData data1 = mock(FormulaData.class);
+    childrenData.add(data1);
+    when(data1.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 43.0));
+    when(data1.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 107.0));
+
+    FormulaData data2 = mock(FormulaData.class);
+    childrenData.add(data2);
+    when(data2.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 127.0));
+    when(data2.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 233.0));
+
+    when(data.getChildren()).thenReturn(childrenData);
+
+    Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);
+
+    assertThat(measure.getValue(), is(2.0));
+  }
+
+  @Test
+  public void testWhenNoChildrenMesaures() {
+    List<FormulaData> childrenData = Lists.newArrayList();
+    when(data.getChildren()).thenReturn(childrenData);
+    Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);
+    assertNull(measure);
+  }
+
+  @Test
+  public void testWhenNoComplexityMesaures() {
+    List<FormulaData> childrenData = Lists.newArrayList();
+    FormulaData data1 = mock(FormulaData.class);
+    childrenData.add(data1);
+    when(data1.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 43.0));
+
+    when(data.getChildren()).thenReturn(childrenData);
+    Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);
+
+    assertNull(measure);
+  }
+
+  @Test
+  public void testWhenNoByMetricMesaures() {
+    List<FormulaData> childrenData = Lists.newArrayList();
+    FormulaData data1 = mock(FormulaData.class);
+    childrenData.add(data1);
+    when(data1.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 43.0));
+
+    when(data.getChildren()).thenReturn(childrenData);
+    Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);
+
+    assertNull(measure);
+  }
+
+  @Test
+  public void testWhenMixedMetrics() {
+    List<FormulaData> childrenData = Lists.newArrayList();
+    FormulaData data1 = mock(FormulaData.class);
+    childrenData.add(data1);
+    when(data1.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 43.0));
+    when(data1.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 107.0));
+
+    FormulaData data2 = mock(FormulaData.class);
+    childrenData.add(data2);
+    when(data2.getMeasure(CoreMetrics.PARAGRAPHS)).thenReturn(new Measure(CoreMetrics.PARAGRAPHS, 127.0));
+    when(data2.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 233.0));
+
+    when(data.getChildren()).thenReturn(childrenData);
+
+    Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);
+
+    assertThat(measure.getValue(), is(2.5));
+  }
+
+  @Test
+  public void testCalculationForFIle() {
+    when(data.getMeasure(CoreMetrics.COMPLEXITY)).thenReturn(new Measure(CoreMetrics.COMPLEXITY, 60.0));
+    when(data.getMeasure(CoreMetrics.FUNCTIONS)).thenReturn(new Measure(CoreMetrics.FUNCTIONS, 20.0));
+    when(context.getResource()).thenReturn(new JavaFile("foo"));
+
+    Measure measure = new AverageComplexityFormula(CoreMetrics.FUNCTIONS).calculate(data, context);
+    assertThat(measure.getValue(), is(3.0));
+  }
+}
index 2870e5911a9214c0375f0fa6daea1a4e2bbe4127..8d793c1be21a606cc7982ad22cd4e618f1dc51ee 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1ff79ef1f8dd9574458ea699516f50e26d17795b..0d34d5bf5b1ecbc0a3bf83f361c7042e101da22a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 430e2131e988eec11173b0d0919bfb62abda6b6d..50f2a329574b44655ded9c3b7ebf2894e2a8f1b6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cb1a653f7645277064285c3c61b42152c1c4a55c..81faf56e385dd7cfdfc724e247b87df684bf7e47 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7d0e417f73421c09debe86b7de03a4585e9b2b49..82bb96efad27f0d497ff74ca35fc710c5bf5613c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0f5425013a4ef821fb2e89d81524bb7a0562682e..1103978f5fcede41ea5cd42ef93824a4cc17d6e9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6c2aa919f389bf042b90cf3dd17bc2160f7d34b1..781e783bdcd126093c031b506d2d5de53a2e7dab 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fd51bc32fb712d493fa90a2af66a8290b9077a00..cd26092601fb6a28bb95b3c5c8bf37cb3e4a6c7e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 92c601e1d7f81344350efc65709b426f3f347d65..12e25cb675a8331c741f1f15d7121f2626f0cff8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6c6b6100c50b50ad3f6bc294c90c1d02bc50043d..1e307e47237bc4eca3b776b2ed8ee3eb94505c2f 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.api.measures;\r
-\r
-import com.google.common.collect.Lists;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.sonar.api.resources.File;\r
-import org.sonar.api.resources.JavaFile;\r
-import org.sonar.api.resources.JavaPackage;\r
-import org.sonar.api.resources.Scopes;\r
-\r
-import java.util.Collections;\r
-import java.util.List;\r
-\r
-import static junit.framework.Assert.assertNull;\r
-import static org.hamcrest.CoreMatchers.is;\r
-import static org.hamcrest.CoreMatchers.nullValue;\r
-import static org.hamcrest.MatcherAssert.assertThat;\r
-import static org.mockito.Mockito.mock;\r
-import static org.mockito.Mockito.when;\r
-\r
-public class SumChildDistributionFormulaTest {\r
-  SumChildDistributionFormula formula;\r
-  FormulaContext context;\r
-  FormulaData data;\r
-\r
-  @Before\r
-  public void init() {\r
-    formula = new SumChildDistributionFormula();\r
-    context = mock(FormulaContext.class);\r
-    when(context.getResource()).thenReturn(new File("foo"));\r
-    data = mock(FormulaData.class);\r
-  }\r
-\r
-  @Test\r
-  public void testWhenGetChildrenReturnsNull() {\r
-    when(context.getTargetMetric()).thenReturn(new Metric("foo"));\r
-    when(data.getChildrenMeasures(new Metric("foo"))).thenReturn(null);\r
-    assertNull(formula.calculate(data, context));\r
-  }\r
-\r
-  @Test\r
-  public void testWhenGetChildrenReturnsEmpty() {\r
-    when(context.getTargetMetric()).thenReturn(new Metric("foo"));\r
-    when(data.getChildrenMeasures(new Metric("foo"))).thenReturn((List) Collections.emptyList());\r
-    assertNull(formula.calculate(data, context));\r
-  }\r
-\r
-  @Test\r
-  public void shouldNotSumDifferentRanges() {\r
-    Metric m = new Metric("foo", Metric.ValueType.DATA);\r
-    when(context.getTargetMetric()).thenReturn(m);\r
-\r
-    List<Measure> list = Lists.newArrayList(\r
-      new Measure(m, "1=0;2=2;5=0;10=10;20=2"),\r
-      new Measure(m, "1=0;2=2;5=0;10=10;30=3")\r
-    );\r
-    when(data.getChildrenMeasures(new Metric("foo"))).thenReturn(list);\r
-    assertThat(formula.calculate(data, context), nullValue());\r
-  }\r
-\r
-  @Test\r
-  public void shouldSumSameIntRanges() {\r
-    Metric m = new Metric("foo", Metric.ValueType.DATA);\r
-    when(context.getTargetMetric()).thenReturn(m);\r
-\r
-    List<Measure> list = Lists.newArrayList(\r
-      new Measure(m, "1=0;2=2;5=0;10=10;20=2"),\r
-      new Measure(m, "1=3;2=2;5=3;10=12;20=0")\r
-    );\r
-    when(data.getChildrenMeasures(new Metric("foo"))).thenReturn(list);\r
-    assertThat(formula.calculate(data, context).getData(), is("1=3;2=4;5=3;10=22;20=2"));\r
-  }\r
-\r
-  @Test\r
-  public void shouldSumSameDoubleRanges() {\r
-    initContextWithChildren();\r
-    assertThat(formula.calculate(data, context).getData(), is("0.5=3;2.5=6"));\r
-  }\r
-\r
-  @Test\r
-  public void shouldNotPersistWhenScopeLowerThanMinimun() throws Exception {\r
-    when(context.getResource()).thenReturn(JavaFile.fromRelativePath("org/Foo.java", false));\r
-\r
-    initContextWithChildren();\r
-    formula.setMinimumScopeToPersist(Scopes.DIRECTORY);\r
-\r
-    Measure distribution = formula.calculate(data, context);\r
-    assertThat(distribution.getPersistenceMode().useDatabase(), is(false));\r
-  }\r
-\r
-  @Test\r
-  public void shouldPersistWhenScopeEqualsMinimun() throws Exception {\r
-    when(context.getResource()).thenReturn(JavaFile.fromRelativePath("org/Foo.java", false));\r
-\r
-    initContextWithChildren();\r
-    formula.setMinimumScopeToPersist(Scopes.FILE);\r
-\r
-    Measure distribution = formula.calculate(data, context);\r
-    assertThat(distribution.getPersistenceMode().useDatabase(), is(true));\r
-  }\r
-\r
-  @Test\r
-  public void shouldPersistWhenScopeHigherThanMinimun() throws Exception {\r
-    when(context.getResource()).thenReturn(new JavaPackage("org.foo"));\r
-\r
-    initContextWithChildren();\r
-    formula.setMinimumScopeToPersist(Scopes.FILE);\r
-\r
-    Measure distribution = formula.calculate(data, context);\r
-    assertThat(distribution.getPersistenceMode().useDatabase(), is(true));\r
-  }\r
-\r
-  private void initContextWithChildren() {\r
-    Metric m = new Metric("foo", Metric.ValueType.DATA);\r
-    when(context.getTargetMetric()).thenReturn(m);\r
-    List<Measure> list = Lists.newArrayList(\r
-        new Measure(m, "0.5=0;2.5=2"),\r
-        new Measure(m, "0.5=3;2.5=4")\r
-    );\r
-    when(data.getChildrenMeasures(new Metric("foo"))).thenReturn(list);\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.api.measures;
+
+import com.google.common.collect.Lists;
+import org.junit.Before;
+import org.junit.Test;
+import org.sonar.api.resources.File;
+import org.sonar.api.resources.JavaFile;
+import org.sonar.api.resources.JavaPackage;
+import org.sonar.api.resources.Scopes;
+
+import java.util.Collections;
+import java.util.List;
+
+import static junit.framework.Assert.assertNull;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public class SumChildDistributionFormulaTest {
+  SumChildDistributionFormula formula;
+  FormulaContext context;
+  FormulaData data;
+
+  @Before
+  public void init() {
+    formula = new SumChildDistributionFormula();
+    context = mock(FormulaContext.class);
+    when(context.getResource()).thenReturn(new File("foo"));
+    data = mock(FormulaData.class);
+  }
+
+  @Test
+  public void testWhenGetChildrenReturnsNull() {
+    when(context.getTargetMetric()).thenReturn(new Metric("foo"));
+    when(data.getChildrenMeasures(new Metric("foo"))).thenReturn(null);
+    assertNull(formula.calculate(data, context));
+  }
+
+  @Test
+  public void testWhenGetChildrenReturnsEmpty() {
+    when(context.getTargetMetric()).thenReturn(new Metric("foo"));
+    when(data.getChildrenMeasures(new Metric("foo"))).thenReturn((List) Collections.emptyList());
+    assertNull(formula.calculate(data, context));
+  }
+
+  @Test
+  public void shouldNotSumDifferentRanges() {
+    Metric m = new Metric("foo", Metric.ValueType.DATA);
+    when(context.getTargetMetric()).thenReturn(m);
+
+    List<Measure> list = Lists.newArrayList(
+      new Measure(m, "1=0;2=2;5=0;10=10;20=2"),
+      new Measure(m, "1=0;2=2;5=0;10=10;30=3")
+    );
+    when(data.getChildrenMeasures(new Metric("foo"))).thenReturn(list);
+    assertThat(formula.calculate(data, context), nullValue());
+  }
+
+  @Test
+  public void shouldSumSameIntRanges() {
+    Metric m = new Metric("foo", Metric.ValueType.DATA);
+    when(context.getTargetMetric()).thenReturn(m);
+
+    List<Measure> list = Lists.newArrayList(
+      new Measure(m, "1=0;2=2;5=0;10=10;20=2"),
+      new Measure(m, "1=3;2=2;5=3;10=12;20=0")
+    );
+    when(data.getChildrenMeasures(new Metric("foo"))).thenReturn(list);
+    assertThat(formula.calculate(data, context).getData(), is("1=3;2=4;5=3;10=22;20=2"));
+  }
+
+  @Test
+  public void shouldSumSameDoubleRanges() {
+    initContextWithChildren();
+    assertThat(formula.calculate(data, context).getData(), is("0.5=3;2.5=6"));
+  }
+
+  @Test
+  public void shouldNotPersistWhenScopeLowerThanMinimun() throws Exception {
+    when(context.getResource()).thenReturn(JavaFile.fromRelativePath("org/Foo.java", false));
+
+    initContextWithChildren();
+    formula.setMinimumScopeToPersist(Scopes.DIRECTORY);
+
+    Measure distribution = formula.calculate(data, context);
+    assertThat(distribution.getPersistenceMode().useDatabase(), is(false));
+  }
+
+  @Test
+  public void shouldPersistWhenScopeEqualsMinimun() throws Exception {
+    when(context.getResource()).thenReturn(JavaFile.fromRelativePath("org/Foo.java", false));
+
+    initContextWithChildren();
+    formula.setMinimumScopeToPersist(Scopes.FILE);
+
+    Measure distribution = formula.calculate(data, context);
+    assertThat(distribution.getPersistenceMode().useDatabase(), is(true));
+  }
+
+  @Test
+  public void shouldPersistWhenScopeHigherThanMinimun() throws Exception {
+    when(context.getResource()).thenReturn(new JavaPackage("org.foo"));
+
+    initContextWithChildren();
+    formula.setMinimumScopeToPersist(Scopes.FILE);
+
+    Measure distribution = formula.calculate(data, context);
+    assertThat(distribution.getPersistenceMode().useDatabase(), is(true));
+  }
+
+  private void initContextWithChildren() {
+    Metric m = new Metric("foo", Metric.ValueType.DATA);
+    when(context.getTargetMetric()).thenReturn(m);
+    List<Measure> list = Lists.newArrayList(
+        new Measure(m, "0.5=0;2.5=2"),
+        new Measure(m, "0.5=3;2.5=4")
+    );
+    when(data.getChildrenMeasures(new Metric("foo"))).thenReturn(list);
+  }
+}
index b4cd0d3c88e927336d07813411c35e6f3c1815c3..db4b96ed33e4be0741b348a4a550ebd36e08ecfa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1ca9a50518f3001ba1dd2fb5070099445bb64efb..81ecf2389c4cd576cec560d97aa132a335278866 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f80beac42c7c2c1d84fd237ba7d414fa13bf5efd..997ba213b7337c6826de26b8a1ac69cb1a051a27 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7db9a3f68974b12bdaff6ca3923d28c2dd3e116d..f8955ead0efaff8ebd0bd7d4feeb00ccae2d4c7a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f13af1eaae255949d308d819f0974a20096fa8b5..c21d8ce499f3ff9af464c1649303e6ded82a3d10 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0e54a3a824d361430de1754f7484bd4feb2d6387..944805f866cd717105dbb2126f88c1578df12cdf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 765c58ae667eca2f4ff2db7222f27e914443a3de..1ec43920ffda37e0918e999aba36fe952c59105e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 23df4ead208e152d3ca084d016a9ce7faab55882..e75d87e6a32d14ed6ad4af502a8e915768d4a071 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 77062d8a37293c7e9b3daa3cdb569ca3c4fd2fdd..73b08a80ddd0ebf62783e5c9b4dd9e528b28a62c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6d6a23ce5ea0c463e2f3b207186bb2d00c9bffdd..16232faa3102df57fcf78c8fce068987b81d35cf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e9fcf8053ec5e2ab4e558b4e2e175ecc0f14d9c1..3f610c7d25a4e17e7bf9fb79b264bc3444a5cd0f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7e673064348fe6b14d7b494d23b471e40bafbf68..8f1fbae73eff1fb9d682099b88ca214d3bef16ae 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7861c2cd2c5051bae2fd2373b2486d409956ae01..4dbc3c59035da7fa3b296a3fe6370130d0bdd80f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 64733907b857fb536d080541a329929eb4e58655..a32c84bc3dd5c20c710df94e6bef6693c40a7f33 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cb10b2d7ef98a602e7e00369ce6797320facea64..57a0e1d64c6c00196cf0250c9ac8bdaa10ce0b98 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2e0f718b46cd3896c61487ed2a047140de98ec91..e96122c5aa6a436ef175ffc6748c4fac5629f78e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 123a56ce2526cb6cc4ed28a99746b01a1a9d1ed5..33b597c7f68ebe6b28878d63aced7ef762028f4d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 827bbd55d615aa17a360ade530c1a69c518a14c4..7c157c591aa7be0814930cff9065cadc994f4588 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1b621f2d09285fdcbba5ab1e492cdee9a51062aa..d4eb51147049f7019ce469020a2d5aa4173d9069 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 473e127f384d57b03086cb640a6188c8c864d8ba..92d9f8c2ea5c7c0ef173d6a51c44c915240082a8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5d65d1e1aaa85eb4f9e05708c03902f81aeeb50b..32f682ae3cd88705009892e1bd4bd947b65a77ca 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5ebd9565d24177fac61171938f026190d8901344..d52bbd6a74620109d76c17e756433101e1293036 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5927017cd95f3a53d059cbfbba0606281344f0ae..f5c809c335b49cc9ae8789189d7d61c186cb5f2c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 319b29759548211a7c1eed503ef3199ff12b58c5..a5240345f6d3235bf3f085a6090682321be50930 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 71fff1d16e45f026e66eb1d9083b1f14bf92ecb9..1cd288c5543bf871aab8cee853cbeb1f6a39e172 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 38bd46e2149f9be693cb08afd56b2800cda8a662..c2439df215111560bd6019a1b997ebe8fddebe97 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9780f4b18a1af98c4d31b198e1df763271ed56be..4e960708d257e8fb2227924f462b1cfa9f2d1d18 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index eb1258c82da111a803d4498a707897900c73ffb0..73a5185f57a25e83a615eccae520bdf2ed19acd3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8455d02e5ac9c0e147b2760d4d6798368124db23..cc9e709eea9baf232e7a04982e47445c6043a187 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 455102461d16a9a3f7800d7ce751cb1c543fe412..0a715dafbf4e58b0941082edc499a738693663a6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a3ed40321b85dce09ff3777231698166b9b3c8ac..0751628b403f336592aac474339d209286db34e3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 56285ed10f20acab4e860d8edaacfb633ff34a17..95d76b48ea0ba5a89d3886664b1b9b6f0eae4c59 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c60a5fdf604086fb80ced1a8d38b92d2adef2281..d7256fd23a759787f10384a8bd2ef19f189b45c8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dab65bfc56457e766760b854ab436e7a700b06ce..bb76ef7a4c4bb440e33b0446ff211d48dc918627 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index db82ca574827a79af53b201937f071860a2ad244..8de913abd9bd468f95adb139bcbd6447fefc8df1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4f738f151116a117f39e050603367d33ecb1e5cb..5156a28e93131f9131044d5528d2a08e1fef0b11 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2dfb8cb7311662972316990def2757cc63c4d011..98df8d4a8a53eaa6c137005da253d7267865a98a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8a86d4414ec4d41365927d5f8f2a6ba572c3853f..61469320dbbe0d47521f211e6309437f6dfa271c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cecea4005d6ab47af24de235f4736bac24392333..f348ef3af874b7518265ecaad711f6309084d428 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 609d86cc9135017d031c31f853d4b8335d6d6d1d..6986d4bfe9365c5b0358a9a7b12131ff1bc785d2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 895c29a436dd5a0fdc9953264957f3b3824d9a0e..47725aebd79dc005112a01c43a2fb5fcdbe854f4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 32e7670176ae800ed27b7d6df873589ce29608fa..0f2ba88c5db6ed09e2b99a79f2365a5c801963ee 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b29a86787c90a17596e7dfbd17834fa2b1b1faf8..55ff0903f1978fd3b9577d0fb692e4e02ba2a34e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9bf5eda61a2b50061221bcf53bcc5bb4523ff5bb..c9862e79ea78941c4a1ce5bc3bb8732e753d34db 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 18324b4e79927bf45a76beb4fd52f5adf77b055b..9378f5be342f6b204d16eafdfdbefc094617c24a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 08fa942029d7400f9f629f9a7132c2ff18462db3..abe3578c40cf111971ece010cd48d0832d31335d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 61cb7f02a5239e8d474169f4c35d13da92b5473f..6c041417eca34514bd279c6c7221ec777de07410 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0d7f35b79b80a548fda38b9a93d871d38cf20323..038462a914e02c423d1c118996dc882537a44ea7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c7a5870e6021738a32c56f19c9c00cb1d6255b97..f95d5a91b5df9c763d7f554c0611ba80223443bf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c589230007da7dd0a019ff4fa69125a9641174c8..8f90ceeb1f7857ac6ccd99b398e3d02ca6490b69 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 902bb45932fb878e5e94b1231cb378dca721c1bf..a46d1f94f319b7d6dc8ed9fffa61becb5c296905 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f5108fd9c8048f02451a9d9bde30cc48b72f570c..1798123d7c1a1af8fccfaef483152d8865f13d21 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cafb64169ed5f94e11906cd888e0a1d8f24ddf57..ed916e1ee98cd611d038c53ad6ddb58f1d89ef7b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a6a48a303bf3cf780d3b08d039dbb43d3b0e5062..034d052f0ed3a4355abbd02cb1f0db82b6457704 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a46e941549ce2bb8c39c5836281626f105348de3..bc82b2c529fbe38f5f2bde8d3222afbd43b827b9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ea52c4c3c732186df6b723835192e670b83a6701..f202e439b1b1625dabb7c5f2a488159efd9b3d6f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 970544c7152637bf0c97bda5b0e3af6977babcc4..98396d0e4a5f8ea2d2dd0d40816b48e2f732e834 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7a1ddd71926ecd0c357b9bc73d9714f5957848db..aca0ef5c75ee8ce49850c32ee48d6ca13db38554 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 62a00f11e012414ff6e330326a55ed64f4313c15..024d994f7a5c4a5f756bb6ec0fe4e25e938a4221 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 599c8b5c8efc504b297213349c0747186beba17a..f255a1a9a59d4b86a10b65dfe2b2704d04ec8184 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 03fe60171a856c25b3aeecbd2cee0e9a6c7ae453..3f300194c61ce89f3a1c648a8b6eced5ced38e32 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 142262ee0a5e12c665c565501e4d2595003e27ce..a6b9dc1702d2cfcb9a7edbcb8ca7706d94df8f0b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bb24effd0d07b5290c71c23bd5f29558dcd0fc85..bf515efe8b7aacd748e8b9fc4291b8faa03601da 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 047c89b7fd4ba3e059db6b494652dfb941ee988b..f54967ee5a7eb5d71f43a6c558c12bc37c4f0791 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.server.charts;\r
-\r
-import org.apache.commons.io.IOUtils;\r
-import org.jfree.chart.encoders.KeypointPNGEncoderAdapter;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.sonar.api.charts.Chart;\r
-import org.sonar.api.charts.ChartParameters;\r
-import org.sonar.server.charts.deprecated.*;\r
-import org.sonar.server.platform.Platform;\r
-\r
-import javax.servlet.ServletException;\r
-import javax.servlet.http.HttpServlet;\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-import java.awt.image.BufferedImage;\r
-import java.io.IOException;\r
-import java.io.OutputStream;\r
-import java.util.Enumeration;\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
-public class ChartsServlet extends HttpServlet {\r
-\r
-  private static final Logger LOG = LoggerFactory.getLogger(ChartsServlet.class);\r
-\r
-  @Override\r
-  public void doGet(HttpServletRequest request, HttpServletResponse response)\r
-      throws ServletException, IOException {\r
-    if (isDeprecatedChart(request)) {\r
-      deprecatedDoGet(request, response);\r
-\r
-    } else {\r
-      ChartFactory chartFactory = Platform.getInstance().getContainer().getComponent(ChartFactory.class);\r
-      Chart chart = chartFactory.getChart(request.getParameter("ck"));\r
-      if (chart != null) {\r
-        BufferedImage image = chart.generateImage(getParams(request));\r
-        OutputStream out = response.getOutputStream();\r
-        try {\r
-          response.setContentType("image/png");\r
-          exportAsPNG(image, out);\r
-\r
-        } catch (Exception e) {\r
-          LOG.error("Generating chart " + chart.getClass().getName(), e);\r
-\r
-        } finally {\r
-          out.close();\r
-        }\r
-      }\r
-    }\r
-  }\r
-\r
-  private ChartParameters getParams(HttpServletRequest request) {\r
-    Map<String, String> map = new HashMap<String, String>();\r
-    Enumeration keys = request.getParameterNames();\r
-    while (keys.hasMoreElements()) {\r
-      String key = (String) keys.nextElement();\r
-      String value = request.getParameter(key);\r
-      map.put(key, value);\r
-    }\r
-    return new ChartParameters(map);\r
-  }\r
-\r
-  private void exportAsPNG(BufferedImage image, OutputStream out) throws IOException {\r
-    KeypointPNGEncoderAdapter encoder = new KeypointPNGEncoderAdapter();\r
-    encoder.setEncodingAlpha(true);\r
-    encoder.encode(image, out);\r
-  }\r
-\r
-  public boolean isDeprecatedChart(HttpServletRequest request) {\r
-    String chartType = request.getParameter(BaseChartWeb.CHART_PARAM_TYPE);\r
-    if (BaseChartWeb.BAR_CHART_HORIZONTAL.equals(chartType) || BaseChartWeb.BAR_CHART_VERTICAL.equals(chartType) || BaseChartWeb.STACKED_BAR_CHART.equals(chartType)) {\r
-      return true;\r
-    }\r
-    if (BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM.equals(chartType)) {\r
-      return true;\r
-    }\r
-    if (BaseChartWeb.PIE_CHART.equals(chartType)) {\r
-      return true;\r
-    }\r
-    if (BaseChartWeb.SPARKLINES_CHART.equals(chartType)) {\r
-      return true;\r
-    }\r
-    return false;\r
-  }\r
-\r
-  public void deprecatedDoGet(HttpServletRequest request, HttpServletResponse response)\r
-      throws ServletException, IOException {\r
-\r
-    Map<String, String> params = new HashMap<String, String>();\r
-    params.put(BaseChartWeb.CHART_PARAM_TYPE, request.getParameter(BaseChartWeb.CHART_PARAM_TYPE));\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, request.getParameter(BaseChartWeb.CHART_PARAM_VALUES));\r
-    params.put(BaseChartWeb.CHART_PARAM_COLORS, request.getParameter(BaseChartWeb.CHART_PARAM_COLORS));\r
-    params.put(BaseChartWeb.CHART_PARAM_RANGEMAX, request.getParameter(BaseChartWeb.CHART_PARAM_RANGEMAX));\r
-    params.put(BaseChartWeb.CHART_PARAM_TITLE, request.getParameter(BaseChartWeb.CHART_PARAM_TITLE));\r
-    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, request.getParameter(BaseChartWeb.CHART_PARAM_DIMENSIONS));\r
-    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE, request.getParameter(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE));\r
-    params.put(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE, request.getParameter(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE));\r
-    params.put(BaseChartWeb.CHART_PARAM_SERIES, request.getParameter(BaseChartWeb.CHART_PARAM_SERIES));\r
-    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES, request.getParameter(BaseChartWeb.CHART_PARAM_CATEGORIES));\r
-    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_LOWER, request.getParameter(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_LOWER));\r
-    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER, request.getParameter(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER));\r
-    params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_LOWER, request.getParameter(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_LOWER));\r
-    params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER, request.getParameter(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER));\r
-    params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_TICKUNIT, request.getParameter(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_TICKUNIT));\r
-    params.put(BaseChartWeb.CHART_PARAM_INSETS, request.getParameter(BaseChartWeb.CHART_PARAM_INSETS));\r
-    params.put(BaseChartWeb.CHART_PARAM_OUTLINE_RANGEGRIDLINES_VISIBLE, request.getParameter(BaseChartWeb.CHART_PARAM_OUTLINE_RANGEGRIDLINES_VISIBLE));\r
-    params.put(BaseChartWeb.CHART_PARAM_OUTLINE_VISIBLE, request.getParameter(BaseChartWeb.CHART_PARAM_OUTLINE_VISIBLE));\r
-\r
-    String chartType = params.get(BaseChartWeb.CHART_PARAM_TYPE);\r
-\r
-    DeprecatedChart chart = null;\r
-\r
-    if (BaseChartWeb.BAR_CHART_HORIZONTAL.equals(chartType) || BaseChartWeb.BAR_CHART_VERTICAL.equals(chartType) || BaseChartWeb.STACKED_BAR_CHART.equals(chartType)) {\r
-      chart = new BarChart(params);\r
-    } else if (BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM.equals(chartType)) {\r
-      chart = new CustomBarChart(params);\r
-    } else if (BaseChartWeb.PIE_CHART.equals(chartType)) {\r
-      chart = new PieChart(params);\r
-    } else if (BaseChartWeb.SPARKLINES_CHART.equals(chartType)) {\r
-      chart = new SparkLinesChart(params);\r
-    }\r
-\r
-    OutputStream out = null;\r
-    try {\r
-      if (chart != null) {\r
-        out = response.getOutputStream();\r
-        response.setContentType("image/png");\r
-        chart.exportChartAsPNG(out);\r
-      }\r
-\r
-    } catch (Exception e) {\r
-      LOG.error("Generating chart " + chart.getClass().getName(), e);\r
-\r
-    } finally {\r
-      IOUtils.closeQuietly(out);\r
-    }\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.server.charts;
+
+import org.apache.commons.io.IOUtils;
+import org.jfree.chart.encoders.KeypointPNGEncoderAdapter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.sonar.api.charts.Chart;
+import org.sonar.api.charts.ChartParameters;
+import org.sonar.server.charts.deprecated.*;
+import org.sonar.server.platform.Platform;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+
+public class ChartsServlet extends HttpServlet {
+
+  private static final Logger LOG = LoggerFactory.getLogger(ChartsServlet.class);
+
+  @Override
+  public void doGet(HttpServletRequest request, HttpServletResponse response)
+      throws ServletException, IOException {
+    if (isDeprecatedChart(request)) {
+      deprecatedDoGet(request, response);
+
+    } else {
+      ChartFactory chartFactory = Platform.getInstance().getContainer().getComponent(ChartFactory.class);
+      Chart chart = chartFactory.getChart(request.getParameter("ck"));
+      if (chart != null) {
+        BufferedImage image = chart.generateImage(getParams(request));
+        OutputStream out = response.getOutputStream();
+        try {
+          response.setContentType("image/png");
+          exportAsPNG(image, out);
+
+        } catch (Exception e) {
+          LOG.error("Generating chart " + chart.getClass().getName(), e);
+
+        } finally {
+          out.close();
+        }
+      }
+    }
+  }
+
+  private ChartParameters getParams(HttpServletRequest request) {
+    Map<String, String> map = new HashMap<String, String>();
+    Enumeration keys = request.getParameterNames();
+    while (keys.hasMoreElements()) {
+      String key = (String) keys.nextElement();
+      String value = request.getParameter(key);
+      map.put(key, value);
+    }
+    return new ChartParameters(map);
+  }
+
+  private void exportAsPNG(BufferedImage image, OutputStream out) throws IOException {
+    KeypointPNGEncoderAdapter encoder = new KeypointPNGEncoderAdapter();
+    encoder.setEncodingAlpha(true);
+    encoder.encode(image, out);
+  }
+
+  public boolean isDeprecatedChart(HttpServletRequest request) {
+    String chartType = request.getParameter(BaseChartWeb.CHART_PARAM_TYPE);
+    if (BaseChartWeb.BAR_CHART_HORIZONTAL.equals(chartType) || BaseChartWeb.BAR_CHART_VERTICAL.equals(chartType) || BaseChartWeb.STACKED_BAR_CHART.equals(chartType)) {
+      return true;
+    }
+    if (BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM.equals(chartType)) {
+      return true;
+    }
+    if (BaseChartWeb.PIE_CHART.equals(chartType)) {
+      return true;
+    }
+    if (BaseChartWeb.SPARKLINES_CHART.equals(chartType)) {
+      return true;
+    }
+    return false;
+  }
+
+  public void deprecatedDoGet(HttpServletRequest request, HttpServletResponse response)
+      throws ServletException, IOException {
+
+    Map<String, String> params = new HashMap<String, String>();
+    params.put(BaseChartWeb.CHART_PARAM_TYPE, request.getParameter(BaseChartWeb.CHART_PARAM_TYPE));
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, request.getParameter(BaseChartWeb.CHART_PARAM_VALUES));
+    params.put(BaseChartWeb.CHART_PARAM_COLORS, request.getParameter(BaseChartWeb.CHART_PARAM_COLORS));
+    params.put(BaseChartWeb.CHART_PARAM_RANGEMAX, request.getParameter(BaseChartWeb.CHART_PARAM_RANGEMAX));
+    params.put(BaseChartWeb.CHART_PARAM_TITLE, request.getParameter(BaseChartWeb.CHART_PARAM_TITLE));
+    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, request.getParameter(BaseChartWeb.CHART_PARAM_DIMENSIONS));
+    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE, request.getParameter(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE));
+    params.put(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE, request.getParameter(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE));
+    params.put(BaseChartWeb.CHART_PARAM_SERIES, request.getParameter(BaseChartWeb.CHART_PARAM_SERIES));
+    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES, request.getParameter(BaseChartWeb.CHART_PARAM_CATEGORIES));
+    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_LOWER, request.getParameter(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_LOWER));
+    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER, request.getParameter(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER));
+    params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_LOWER, request.getParameter(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_LOWER));
+    params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER, request.getParameter(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER));
+    params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_TICKUNIT, request.getParameter(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_TICKUNIT));
+    params.put(BaseChartWeb.CHART_PARAM_INSETS, request.getParameter(BaseChartWeb.CHART_PARAM_INSETS));
+    params.put(BaseChartWeb.CHART_PARAM_OUTLINE_RANGEGRIDLINES_VISIBLE, request.getParameter(BaseChartWeb.CHART_PARAM_OUTLINE_RANGEGRIDLINES_VISIBLE));
+    params.put(BaseChartWeb.CHART_PARAM_OUTLINE_VISIBLE, request.getParameter(BaseChartWeb.CHART_PARAM_OUTLINE_VISIBLE));
+
+    String chartType = params.get(BaseChartWeb.CHART_PARAM_TYPE);
+
+    DeprecatedChart chart = null;
+
+    if (BaseChartWeb.BAR_CHART_HORIZONTAL.equals(chartType) || BaseChartWeb.BAR_CHART_VERTICAL.equals(chartType) || BaseChartWeb.STACKED_BAR_CHART.equals(chartType)) {
+      chart = new BarChart(params);
+    } else if (BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM.equals(chartType)) {
+      chart = new CustomBarChart(params);
+    } else if (BaseChartWeb.PIE_CHART.equals(chartType)) {
+      chart = new PieChart(params);
+    } else if (BaseChartWeb.SPARKLINES_CHART.equals(chartType)) {
+      chart = new SparkLinesChart(params);
+    }
+
+    OutputStream out = null;
+    try {
+      if (chart != null) {
+        out = response.getOutputStream();
+        response.setContentType("image/png");
+        chart.exportChartAsPNG(out);
+      }
+
+    } catch (Exception e) {
+      LOG.error("Generating chart " + chart.getClass().getName(), e);
+
+    } finally {
+      IOUtils.closeQuietly(out);
+    }
+  }
+
+}
index 6ccbf1af2dc4e093487dc279e6d6dfe139d01a2d..d3194d5d873f534f735eebf90f2d77731675d5b8 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.server.charts.deprecated;\r
-\r
-import org.jfree.chart.JFreeChart;\r
-import org.jfree.chart.axis.CategoryAxis;\r
-import org.jfree.chart.axis.NumberAxis;\r
-import org.jfree.chart.axis.NumberTickUnit;\r
-import org.jfree.chart.plot.CategoryPlot;\r
-import org.jfree.chart.plot.PlotOrientation;\r
-import org.jfree.chart.renderer.category.BarRenderer;\r
-import org.jfree.chart.renderer.category.StackedBarRenderer;\r
-import org.jfree.chart.title.TextTitle;\r
-import org.jfree.data.category.DefaultCategoryDataset;\r
-import org.jfree.ui.RectangleInsets;\r
-\r
-import java.awt.image.BufferedImage;\r
-import java.io.IOException;\r
-import java.util.Map;\r
-import java.util.StringTokenizer;\r
-\r
-public class BarChart extends BaseChartWeb implements DeprecatedChart {\r
-\r
-  private BarRenderer renderer = null;\r
-  protected DefaultCategoryDataset dataset = null;\r
-  protected CategoryAxis categoryAxis = null;\r
-  protected NumberAxis numberAxis = null;\r
-\r
-  public BarChart(Map<String, String> params) {\r
-    super(params);\r
-    jfreechart = new JFreeChart(null, TextTitle.DEFAULT_FONT, new CategoryPlot(), false);\r
-  }\r
-\r
-  @Override\r
-  protected BufferedImage getChartImage() throws IOException {\r
-    configure();\r
-    return getBufferedImage(jfreechart);\r
-  }\r
-\r
-  protected void configure() {\r
-    configureChart(jfreechart, false);\r
-    configureCategoryDataset();\r
-    configureCategoryAxis();\r
-    configureRenderer();\r
-    configureRangeAxis();\r
-    configureCategoryPlot();\r
-    applyParams();\r
-  }\r
-\r
-  protected void configureCategoryPlot() {\r
-    CategoryPlot plot = jfreechart.getCategoryPlot();\r
-    plot.setNoDataMessage(DEFAULT_MESSAGE_NODATA);\r
-    plot.setInsets(RectangleInsets.ZERO_INSETS); // To remove inner space around chart\r
-    plot.setDataset(dataset);\r
-    plot.setDomainAxis(categoryAxis);\r
-    plot.setRenderer(renderer);\r
-    plot.setRangeAxis(numberAxis);\r
-  }\r
-\r
-  protected void configureCategoryDataset() {\r
-    dataset = new DefaultCategoryDataset();\r
-  }\r
-\r
-  protected void configureCategoryAxis() {\r
-    categoryAxis = new CategoryAxis();\r
-    categoryAxis.setLabelFont(DEFAULT_FONT);\r
-    categoryAxis.setLabelPaint(BASE_COLOR);\r
-    categoryAxis.setTickLabelFont(DEFAULT_FONT);\r
-    categoryAxis.setTickLabelPaint(BASE_COLOR);\r
-    categoryAxis.setVisible(false);\r
-  }\r
-\r
-  protected void configureRenderer() {\r
-    if (params.get(BaseChartWeb.CHART_PARAM_TYPE).equals(BaseChartWeb.STACKED_BAR_CHART)) {\r
-      renderer = new StackedBarRenderer();\r
-    } else {\r
-      renderer = new BarRenderer();\r
-    }\r
-    renderer.setItemMargin(0.0);\r
-    renderer.setDrawBarOutline(false);\r
-  }\r
-\r
-  protected void configureRangeAxis() {\r
-    numberAxis = new NumberAxis();\r
-    numberAxis.setLabelFont(DEFAULT_FONT);\r
-    numberAxis.setLabelPaint(BASE_COLOR);\r
-    numberAxis.setTickLabelFont(DEFAULT_FONT);\r
-    numberAxis.setTickLabelPaint(BASE_COLOR);\r
-    numberAxis.setTickMarksVisible(true);\r
-    numberAxis.setVisible(false);\r
-    numberAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\r
-  }\r
-\r
-  protected void applyCommomParamsBar() {\r
-    // -- Plot\r
-    CategoryPlot plot = jfreechart.getCategoryPlot();\r
-    plot.setOrientation(BaseChartWeb.BAR_CHART_VERTICAL.equals(params.get(BaseChartWeb.CHART_PARAM_TYPE)) || BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM.equals(params.get(BaseChartWeb.CHART_PARAM_TYPE)) ? PlotOrientation.VERTICAL : PlotOrientation.HORIZONTAL);\r
-    plot.setOutlineVisible("y".equals(params.get(BaseChartWeb.CHART_PARAM_OUTLINE_VISIBLE)));\r
-    plot.setRangeGridlinesVisible("y".equals(params.get(BaseChartWeb.CHART_PARAM_OUTLINE_RANGEGRIDLINES_VISIBLE)));\r
-    String insetsParam = params.get(CHART_PARAM_INSETS);\r
-    if (isParamValueValid(insetsParam)) {\r
-      double insets = convertParamToDouble(insetsParam);\r
-      RectangleInsets rectangleInsets = new RectangleInsets(insets, insets, insets, insets);\r
-      plot.setInsets(rectangleInsets);\r
-    }\r
-\r
-    // -- Category Axis\r
-    boolean categoryAxisIsVisible = "y".equals(params.get(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE));\r
-    double categoryAxisUpperMargin = convertParamToDouble(params.get(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER), DEFAULT_CATEGORIES_AXISMARGIN);\r
-    double categoryAxisLowerMargin = convertParamToDouble(params.get(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_LOWER), DEFAULT_CATEGORIES_AXISMARGIN);\r
-    categoryAxis.setVisible(categoryAxisIsVisible);\r
-    categoryAxis.setTickLabelsVisible(categoryAxisIsVisible);\r
-    categoryAxis.setLowerMargin(categoryAxisLowerMargin);\r
-    categoryAxis.setUpperMargin(categoryAxisUpperMargin);\r
-\r
-    // -- Range Axis\r
-    boolean rangeAxisIsVisible = "y".equals(params.get(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE));\r
-    double rangeAxisUpperMargin = convertParamToDouble(params.get(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER), DEFAULT_SERIES_AXISMARGIN);\r
-    double rangeAxisLowerMargin = convertParamToDouble(params.get(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_LOWER), DEFAULT_SERIES_AXISMARGIN);\r
-    numberAxis.setTickLabelsVisible(rangeAxisIsVisible);\r
-    numberAxis.setVisible(rangeAxisIsVisible);\r
-    numberAxis.setLowerMargin(rangeAxisLowerMargin);\r
-    numberAxis.setUpperMargin(rangeAxisUpperMargin);\r
-    String rangeMax = params.get(BaseChartWeb.CHART_PARAM_RANGEMAX);\r
-    if (isParamValueValid(rangeMax)) {\r
-      double iRangeMax = Double.parseDouble(rangeMax);\r
-      numberAxis.setRange(0.0, iRangeMax);\r
-    }\r
-    String tickUnit = params.get(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_TICKUNIT);\r
-    if (isParamValueValid(tickUnit)) {\r
-      numberAxis.setTickUnit(new NumberTickUnit(convertParamToDouble(tickUnit)));\r
-    }\r
-  }\r
-\r
-  private void applyParams() {\r
-    applyCommonParams();\r
-    applyCommomParamsBar();\r
-\r
-    configureColors(params.get(BaseChartWeb.CHART_PARAM_COLORS), renderer);\r
-    addMeasures(params.get(BaseChartWeb.CHART_PARAM_VALUES));\r
-  }\r
-\r
-  private void addMeasures(String values) {\r
-    if (values != null && values.length() > 0) {\r
-      // Values\r
-      StringTokenizer stValues = new StringTokenizer(values, ",");\r
-      int nbValues = stValues.countTokens();\r
-\r
-      // Categories\r
-      String categoriesParam = params.get(BaseChartWeb.CHART_PARAM_CATEGORIES);\r
-      boolean categoriesPresent = categoriesParam != null && categoriesParam.length() > 0;\r
-      String[] categoriesSplit = null;\r
-      if (categoriesPresent) {\r
-        categoriesSplit = categoriesParam.split(",");\r
-      } else {\r
-        categoriesSplit = new String[1];\r
-        categoriesSplit[0] = BaseChartWeb.DEFAULT_NAME_CATEGORY;\r
-      }\r
-      int nbCategories = categoriesSplit.length;\r
-\r
-      // Series\r
-      String seriesParam = params.get(BaseChartWeb.CHART_PARAM_SERIES);\r
-      boolean seriesPresent = seriesParam != null && seriesParam.length() > 0;\r
-      String[] seriesSplit = null;\r
-      if (seriesPresent) {\r
-        seriesSplit = seriesParam.split(",");\r
-      } else {\r
-        seriesSplit = new String[nbValues];\r
-        for (int i = 0; i < nbValues; i++) {\r
-          seriesSplit[i] = BaseChartWeb.DEFAULT_NAME_SERIE + i;\r
-        }\r
-      }\r
-      int nbSeries = seriesSplit.length;\r
-\r
-      for (int iCategories = 0; iCategories < nbCategories; iCategories++) {\r
-        String currentCategory = categoriesSplit[iCategories];\r
-        for (int iSeries = 0; iSeries < nbSeries; iSeries++) {\r
-          String currentSerie = seriesSplit[iSeries];\r
-          double currentValue = 0.0;\r
-          if (stValues.hasMoreTokens()) {\r
-            try {\r
-              currentValue = Double.parseDouble(stValues.nextToken());\r
-            } catch (NumberFormatException e) {\r
-            }\r
-          }\r
-          dataset.addValue(currentValue, currentSerie, currentCategory);\r
-        }\r
-      }\r
-    }\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.server.charts.deprecated;
+
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.axis.CategoryAxis;
+import org.jfree.chart.axis.NumberAxis;
+import org.jfree.chart.axis.NumberTickUnit;
+import org.jfree.chart.plot.CategoryPlot;
+import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.chart.renderer.category.BarRenderer;
+import org.jfree.chart.renderer.category.StackedBarRenderer;
+import org.jfree.chart.title.TextTitle;
+import org.jfree.data.category.DefaultCategoryDataset;
+import org.jfree.ui.RectangleInsets;
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+public class BarChart extends BaseChartWeb implements DeprecatedChart {
+
+  private BarRenderer renderer = null;
+  protected DefaultCategoryDataset dataset = null;
+  protected CategoryAxis categoryAxis = null;
+  protected NumberAxis numberAxis = null;
+
+  public BarChart(Map<String, String> params) {
+    super(params);
+    jfreechart = new JFreeChart(null, TextTitle.DEFAULT_FONT, new CategoryPlot(), false);
+  }
+
+  @Override
+  protected BufferedImage getChartImage() throws IOException {
+    configure();
+    return getBufferedImage(jfreechart);
+  }
+
+  protected void configure() {
+    configureChart(jfreechart, false);
+    configureCategoryDataset();
+    configureCategoryAxis();
+    configureRenderer();
+    configureRangeAxis();
+    configureCategoryPlot();
+    applyParams();
+  }
+
+  protected void configureCategoryPlot() {
+    CategoryPlot plot = jfreechart.getCategoryPlot();
+    plot.setNoDataMessage(DEFAULT_MESSAGE_NODATA);
+    plot.setInsets(RectangleInsets.ZERO_INSETS); // To remove inner space around chart
+    plot.setDataset(dataset);
+    plot.setDomainAxis(categoryAxis);
+    plot.setRenderer(renderer);
+    plot.setRangeAxis(numberAxis);
+  }
+
+  protected void configureCategoryDataset() {
+    dataset = new DefaultCategoryDataset();
+  }
+
+  protected void configureCategoryAxis() {
+    categoryAxis = new CategoryAxis();
+    categoryAxis.setLabelFont(DEFAULT_FONT);
+    categoryAxis.setLabelPaint(BASE_COLOR);
+    categoryAxis.setTickLabelFont(DEFAULT_FONT);
+    categoryAxis.setTickLabelPaint(BASE_COLOR);
+    categoryAxis.setVisible(false);
+  }
+
+  protected void configureRenderer() {
+    if (params.get(BaseChartWeb.CHART_PARAM_TYPE).equals(BaseChartWeb.STACKED_BAR_CHART)) {
+      renderer = new StackedBarRenderer();
+    } else {
+      renderer = new BarRenderer();
+    }
+    renderer.setItemMargin(0.0);
+    renderer.setDrawBarOutline(false);
+  }
+
+  protected void configureRangeAxis() {
+    numberAxis = new NumberAxis();
+    numberAxis.setLabelFont(DEFAULT_FONT);
+    numberAxis.setLabelPaint(BASE_COLOR);
+    numberAxis.setTickLabelFont(DEFAULT_FONT);
+    numberAxis.setTickLabelPaint(BASE_COLOR);
+    numberAxis.setTickMarksVisible(true);
+    numberAxis.setVisible(false);
+    numberAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
+  }
+
+  protected void applyCommomParamsBar() {
+    // -- Plot
+    CategoryPlot plot = jfreechart.getCategoryPlot();
+    plot.setOrientation(BaseChartWeb.BAR_CHART_VERTICAL.equals(params.get(BaseChartWeb.CHART_PARAM_TYPE)) || BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM.equals(params.get(BaseChartWeb.CHART_PARAM_TYPE)) ? PlotOrientation.VERTICAL : PlotOrientation.HORIZONTAL);
+    plot.setOutlineVisible("y".equals(params.get(BaseChartWeb.CHART_PARAM_OUTLINE_VISIBLE)));
+    plot.setRangeGridlinesVisible("y".equals(params.get(BaseChartWeb.CHART_PARAM_OUTLINE_RANGEGRIDLINES_VISIBLE)));
+    String insetsParam = params.get(CHART_PARAM_INSETS);
+    if (isParamValueValid(insetsParam)) {
+      double insets = convertParamToDouble(insetsParam);
+      RectangleInsets rectangleInsets = new RectangleInsets(insets, insets, insets, insets);
+      plot.setInsets(rectangleInsets);
+    }
+
+    // -- Category Axis
+    boolean categoryAxisIsVisible = "y".equals(params.get(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE));
+    double categoryAxisUpperMargin = convertParamToDouble(params.get(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER), DEFAULT_CATEGORIES_AXISMARGIN);
+    double categoryAxisLowerMargin = convertParamToDouble(params.get(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_LOWER), DEFAULT_CATEGORIES_AXISMARGIN);
+    categoryAxis.setVisible(categoryAxisIsVisible);
+    categoryAxis.setTickLabelsVisible(categoryAxisIsVisible);
+    categoryAxis.setLowerMargin(categoryAxisLowerMargin);
+    categoryAxis.setUpperMargin(categoryAxisUpperMargin);
+
+    // -- Range Axis
+    boolean rangeAxisIsVisible = "y".equals(params.get(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE));
+    double rangeAxisUpperMargin = convertParamToDouble(params.get(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER), DEFAULT_SERIES_AXISMARGIN);
+    double rangeAxisLowerMargin = convertParamToDouble(params.get(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_LOWER), DEFAULT_SERIES_AXISMARGIN);
+    numberAxis.setTickLabelsVisible(rangeAxisIsVisible);
+    numberAxis.setVisible(rangeAxisIsVisible);
+    numberAxis.setLowerMargin(rangeAxisLowerMargin);
+    numberAxis.setUpperMargin(rangeAxisUpperMargin);
+    String rangeMax = params.get(BaseChartWeb.CHART_PARAM_RANGEMAX);
+    if (isParamValueValid(rangeMax)) {
+      double iRangeMax = Double.parseDouble(rangeMax);
+      numberAxis.setRange(0.0, iRangeMax);
+    }
+    String tickUnit = params.get(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_TICKUNIT);
+    if (isParamValueValid(tickUnit)) {
+      numberAxis.setTickUnit(new NumberTickUnit(convertParamToDouble(tickUnit)));
+    }
+  }
+
+  private void applyParams() {
+    applyCommonParams();
+    applyCommomParamsBar();
+
+    configureColors(params.get(BaseChartWeb.CHART_PARAM_COLORS), renderer);
+    addMeasures(params.get(BaseChartWeb.CHART_PARAM_VALUES));
+  }
+
+  private void addMeasures(String values) {
+    if (values != null && values.length() > 0) {
+      // Values
+      StringTokenizer stValues = new StringTokenizer(values, ",");
+      int nbValues = stValues.countTokens();
+
+      // Categories
+      String categoriesParam = params.get(BaseChartWeb.CHART_PARAM_CATEGORIES);
+      boolean categoriesPresent = categoriesParam != null && categoriesParam.length() > 0;
+      String[] categoriesSplit = null;
+      if (categoriesPresent) {
+        categoriesSplit = categoriesParam.split(",");
+      } else {
+        categoriesSplit = new String[1];
+        categoriesSplit[0] = BaseChartWeb.DEFAULT_NAME_CATEGORY;
+      }
+      int nbCategories = categoriesSplit.length;
+
+      // Series
+      String seriesParam = params.get(BaseChartWeb.CHART_PARAM_SERIES);
+      boolean seriesPresent = seriesParam != null && seriesParam.length() > 0;
+      String[] seriesSplit = null;
+      if (seriesPresent) {
+        seriesSplit = seriesParam.split(",");
+      } else {
+        seriesSplit = new String[nbValues];
+        for (int i = 0; i < nbValues; i++) {
+          seriesSplit[i] = BaseChartWeb.DEFAULT_NAME_SERIE + i;
+        }
+      }
+      int nbSeries = seriesSplit.length;
+
+      for (int iCategories = 0; iCategories < nbCategories; iCategories++) {
+        String currentCategory = categoriesSplit[iCategories];
+        for (int iSeries = 0; iSeries < nbSeries; iSeries++) {
+          String currentSerie = seriesSplit[iSeries];
+          double currentValue = 0.0;
+          if (stValues.hasMoreTokens()) {
+            try {
+              currentValue = Double.parseDouble(stValues.nextToken());
+            } catch (NumberFormatException e) {
+            }
+          }
+          dataset.addValue(currentValue, currentSerie, currentCategory);
+        }
+      }
+    }
+  }
+
+}
index f139bf07143cf478f94e5159f600babe875e567c..d1776177fc0d11dd2d12cfe89adcfb68a40563f6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c401fc3251804fbb8fd27cb69984b467f2acd1e2..8cef9b3b296e5cb0f91e3e52111019bd72c0ee1a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c0b8c1fb645d363b7682217fcaff7b7edda15a9d..bf60669ac0eebb5b5b2f8232f640277071ff4e2d 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.server.charts.deprecated;\r
-\r
-import org.jfree.chart.plot.CategoryPlot;\r
-import org.jfree.data.category.DefaultCategoryDataset;\r
-import org.jfree.ui.RectangleInsets;\r
-\r
-import java.awt.*;\r
-import java.awt.image.BufferedImage;\r
-import java.io.IOException;\r
-import java.util.Map;\r
-import java.util.StringTokenizer;\r
-\r
-public class CustomBarChart extends BarChart {\r
-\r
-  private CustomBarRenderer renderer = null;\r
-\r
-  public CustomBarChart(Map<String, String> params) {\r
-    super(params);\r
-  }\r
-\r
-  @Override\r
-  protected BufferedImage getChartImage() throws IOException {\r
-    configure();\r
-    return getBufferedImage(jfreechart);\r
-  }\r
-\r
-  @Override\r
-  protected void configure() {\r
-    configureChart(jfreechart, false);\r
-    configureCategoryDataset();\r
-    configureCategoryAxis();\r
-    configureRenderer();\r
-    configureRangeAxis();\r
-    configureCategoryPlot();\r
-    applyParams();\r
-  }\r
-\r
-  @Override\r
-  protected void configureCategoryDataset() {\r
-    dataset = new DefaultCategoryDataset();\r
-  }\r
-\r
-  @Override\r
-  protected void configureRenderer() {\r
-    renderer = new CustomBarRenderer(null);\r
-    renderer.setItemMargin(0.0);\r
-    renderer.setDrawBarOutline(false);\r
-  }\r
-\r
-  @Override\r
-  protected void configureCategoryPlot() {\r
-    CategoryPlot plot = jfreechart.getCategoryPlot();\r
-    plot.setNoDataMessage(DEFAULT_MESSAGE_NODATA);\r
-    plot.setInsets(RectangleInsets.ZERO_INSETS); // To remove inner space around chart\r
-    plot.setDataset(dataset);\r
-    plot.setDomainAxis(categoryAxis);\r
-    plot.setRenderer(renderer);\r
-    plot.setRangeAxis(numberAxis);\r
-  }\r
-\r
-  protected void applyParams() {\r
-    applyCommonParams();\r
-    applyCommomParamsBar();\r
-\r
-    configureColors(params.get(CHART_PARAM_COLORS));\r
-    addMeasures(params.get(CHART_PARAM_VALUES));\r
-  }\r
-\r
-  private void configureColors(String colorsParam) {\r
-    Paint[] colors = CustomBarRenderer.COLORS;\r
-    if (colorsParam != null && colorsParam.length() > 0) {\r
-      StringTokenizer stColors = new StringTokenizer(colorsParam, ",");\r
-      colors = new Paint[stColors.countTokens()];\r
-      int i = 0;\r
-      while (stColors.hasMoreTokens()) {\r
-        colors[i] = Color.decode("0x" + stColors.nextToken());\r
-        i++;\r
-      }\r
-    }\r
-\r
-    renderer.setColors(colors);\r
-  }\r
-\r
-  private void addMeasures(String values) {\r
-    if (values != null && values.length() > 0) {\r
-      // Values\r
-      StringTokenizer stValues = new StringTokenizer(values, ",");\r
-      int nbValues = stValues.countTokens();\r
-\r
-      // Categories\r
-      String categoriesParam = params.get(CHART_PARAM_CATEGORIES);\r
-      boolean categoriesPresent = categoriesParam != null && categoriesParam.length() > 0;\r
-      String[] categoriesSplit = null;\r
-      if (categoriesPresent) {\r
-        categoriesSplit = categoriesParam.split(",");\r
-      } else {\r
-        categoriesSplit = new String[nbValues];\r
-        for (int i = 0; i < nbValues; i++) {\r
-          categoriesSplit[i] = DEFAULT_NAME_CATEGORY + i;\r
-        }\r
-      }\r
-      int nbCategories = categoriesSplit.length;\r
-\r
-      // Series\r
-      String[] seriesSplit = {DEFAULT_NAME_SERIE};\r
-      int nbSeries = 1;\r
-\r
-      //\r
-      for (int iCategories = 0; iCategories < nbCategories; iCategories++) {\r
-        String currentCategory = categoriesSplit[iCategories];\r
-        for (int iSeries = 0; iSeries < nbSeries; iSeries++) {\r
-          String currentSerie = seriesSplit[iSeries];\r
-          double currentValue = 0.0;\r
-          if (stValues.hasMoreTokens()) {\r
-            try {\r
-              currentValue = Double.parseDouble(stValues.nextToken());\r
-            } catch (NumberFormatException e) {\r
-            }\r
-          }\r
-          dataset.addValue(currentValue, currentSerie, currentCategory);\r
-        }\r
-      }\r
-    }\r
-  }\r
-\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.server.charts.deprecated;
+
+import org.jfree.chart.plot.CategoryPlot;
+import org.jfree.data.category.DefaultCategoryDataset;
+import org.jfree.ui.RectangleInsets;
+
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+public class CustomBarChart extends BarChart {
+
+  private CustomBarRenderer renderer = null;
+
+  public CustomBarChart(Map<String, String> params) {
+    super(params);
+  }
+
+  @Override
+  protected BufferedImage getChartImage() throws IOException {
+    configure();
+    return getBufferedImage(jfreechart);
+  }
+
+  @Override
+  protected void configure() {
+    configureChart(jfreechart, false);
+    configureCategoryDataset();
+    configureCategoryAxis();
+    configureRenderer();
+    configureRangeAxis();
+    configureCategoryPlot();
+    applyParams();
+  }
+
+  @Override
+  protected void configureCategoryDataset() {
+    dataset = new DefaultCategoryDataset();
+  }
+
+  @Override
+  protected void configureRenderer() {
+    renderer = new CustomBarRenderer(null);
+    renderer.setItemMargin(0.0);
+    renderer.setDrawBarOutline(false);
+  }
+
+  @Override
+  protected void configureCategoryPlot() {
+    CategoryPlot plot = jfreechart.getCategoryPlot();
+    plot.setNoDataMessage(DEFAULT_MESSAGE_NODATA);
+    plot.setInsets(RectangleInsets.ZERO_INSETS); // To remove inner space around chart
+    plot.setDataset(dataset);
+    plot.setDomainAxis(categoryAxis);
+    plot.setRenderer(renderer);
+    plot.setRangeAxis(numberAxis);
+  }
+
+  protected void applyParams() {
+    applyCommonParams();
+    applyCommomParamsBar();
+
+    configureColors(params.get(CHART_PARAM_COLORS));
+    addMeasures(params.get(CHART_PARAM_VALUES));
+  }
+
+  private void configureColors(String colorsParam) {
+    Paint[] colors = CustomBarRenderer.COLORS;
+    if (colorsParam != null && colorsParam.length() > 0) {
+      StringTokenizer stColors = new StringTokenizer(colorsParam, ",");
+      colors = new Paint[stColors.countTokens()];
+      int i = 0;
+      while (stColors.hasMoreTokens()) {
+        colors[i] = Color.decode("0x" + stColors.nextToken());
+        i++;
+      }
+    }
+
+    renderer.setColors(colors);
+  }
+
+  private void addMeasures(String values) {
+    if (values != null && values.length() > 0) {
+      // Values
+      StringTokenizer stValues = new StringTokenizer(values, ",");
+      int nbValues = stValues.countTokens();
+
+      // Categories
+      String categoriesParam = params.get(CHART_PARAM_CATEGORIES);
+      boolean categoriesPresent = categoriesParam != null && categoriesParam.length() > 0;
+      String[] categoriesSplit = null;
+      if (categoriesPresent) {
+        categoriesSplit = categoriesParam.split(",");
+      } else {
+        categoriesSplit = new String[nbValues];
+        for (int i = 0; i < nbValues; i++) {
+          categoriesSplit[i] = DEFAULT_NAME_CATEGORY + i;
+        }
+      }
+      int nbCategories = categoriesSplit.length;
+
+      // Series
+      String[] seriesSplit = {DEFAULT_NAME_SERIE};
+      int nbSeries = 1;
+
+      //
+      for (int iCategories = 0; iCategories < nbCategories; iCategories++) {
+        String currentCategory = categoriesSplit[iCategories];
+        for (int iSeries = 0; iSeries < nbSeries; iSeries++) {
+          String currentSerie = seriesSplit[iSeries];
+          double currentValue = 0.0;
+          if (stValues.hasMoreTokens()) {
+            try {
+              currentValue = Double.parseDouble(stValues.nextToken());
+            } catch (NumberFormatException e) {
+            }
+          }
+          dataset.addValue(currentValue, currentSerie, currentCategory);
+        }
+      }
+    }
+  }
+
 }
\ No newline at end of file
index 75991330b398c522605a42fa745946433a0f0212..7bc2e1fa0dcdbde8c2af91ed15b32e1821c837f0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1918f3661347042e797358176f3b88a9c7d786aa..d8cfe05fd2ec3fc22dd086a89a5b7f2f444ade80 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ad09729b7c61770f16afdda39b93843a883e6439..83d22a15e51f4c0ccdd0b558d542984876836be8 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.server.charts.deprecated;\r
-\r
-import org.jfree.chart.JFreeChart;\r
-import org.jfree.chart.plot.PiePlot;\r
-import org.jfree.chart.title.TextTitle;\r
-import org.jfree.data.general.DefaultPieDataset;\r
-import org.jfree.ui.RectangleInsets;\r
-\r
-import java.awt.*;\r
-import java.awt.image.BufferedImage;\r
-import java.io.IOException;\r
-import java.util.Map;\r
-import java.util.StringTokenizer;\r
-\r
-public class PieChart extends BaseChartWeb implements DeprecatedChart {\r
-\r
-  private DefaultPieDataset dataset = null;\r
-\r
-  public PieChart(Map<String, String> params) {\r
-    super(params);\r
-    jfreechart = new JFreeChart(null, TextTitle.DEFAULT_FONT, new PiePlot(), false);\r
-  }\r
-\r
-  @Override\r
-  protected BufferedImage getChartImage() throws IOException {\r
-    configure();\r
-    return getBufferedImage(jfreechart);\r
-  }\r
-\r
-  private void configure() {\r
-    configureChart(jfreechart, false);\r
-    configureDataset();\r
-    configurePlot();\r
-    applyParams();\r
-  }\r
-\r
-  private void configureDataset() {\r
-    dataset = new DefaultPieDataset();\r
-  }\r
-\r
-  private void configurePlot() {\r
-    PiePlot plot = (PiePlot) jfreechart.getPlot();\r
-    plot.setNoDataMessage(DEFAULT_MESSAGE_NODATA);\r
-    plot.setInsets(RectangleInsets.ZERO_INSETS);\r
-    plot.setDataset(dataset);\r
-    plot.setBackgroundAlpha(0.0f);\r
-    plot.setCircular(true);\r
-    plot.setLabelGenerator(null);\r
-    plot.setIgnoreNullValues(true);\r
-    plot.setIgnoreZeroValues(true);\r
-    plot.setShadowPaint(null);\r
-    plot.setLabelLinkMargin(0.0);\r
-    plot.setInteriorGap(0.02);\r
-    plot.setMaximumLabelWidth(0.10);\r
-  }\r
-\r
-  private void configureColors(String colors) {\r
-    try {\r
-      if (colors != null && colors.length() > 0) {\r
-        StringTokenizer stringTokenizer = new StringTokenizer(colors, ",");\r
-        int i = 0;\r
-        while (stringTokenizer.hasMoreTokens()) {\r
-          ((PiePlot) jfreechart.getPlot()).setSectionPaint(Integer.toString(i), Color.decode("0x" + stringTokenizer.nextToken()));\r
-          i++;\r
-        }\r
-      } else {\r
-        configureDefaultColors();\r
-      }\r
-    }\r
-    catch (Exception e) {\r
-      configureDefaultColors();\r
-    }\r
-  }\r
-\r
-  private void configureDefaultColors() {\r
-    PiePlot plot = (PiePlot) jfreechart.getPlot();\r
-    for (int i=0 ; i<COLORS.length ; i++) {\r
-      plot.setSectionPaint("" + i, COLORS[i]);\r
-    }\r
-  }\r
-\r
-  private void applyParams() {\r
-    applyCommonParams();\r
-\r
-    configureColors(params.get(CHART_PARAM_COLORS));\r
-    addMeasures(params.get(CHART_PARAM_VALUES));\r
-\r
-    // -- Plot\r
-    PiePlot plot = (PiePlot) jfreechart.getPlot();\r
-    plot.setOutlineVisible(isParamValueValid(params.get(CHART_PARAM_OUTLINE_VISIBLE)) && Boolean.getBoolean(params.get(CHART_PARAM_OUTLINE_VISIBLE)));\r
-  }\r
-\r
-  private void addMeasures(String values) {\r
-    if (values != null && values.length() > 0) {\r
-      StringTokenizer st = new StringTokenizer(values, ",");\r
-      int i = 0;\r
-      while (st.hasMoreTokens()) {\r
-        double measure = 0;\r
-        try {\r
-          measure = Double.parseDouble(st.nextToken());\r
-        }\r
-        catch (NumberFormatException e) {\r
-        }\r
-        dataset.setValue(Integer.toString(i), measure);\r
-        i++;\r
-      }\r
-    }\r
-  }\r
-\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.server.charts.deprecated;
+
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.plot.PiePlot;
+import org.jfree.chart.title.TextTitle;
+import org.jfree.data.general.DefaultPieDataset;
+import org.jfree.ui.RectangleInsets;
+
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+public class PieChart extends BaseChartWeb implements DeprecatedChart {
+
+  private DefaultPieDataset dataset = null;
+
+  public PieChart(Map<String, String> params) {
+    super(params);
+    jfreechart = new JFreeChart(null, TextTitle.DEFAULT_FONT, new PiePlot(), false);
+  }
+
+  @Override
+  protected BufferedImage getChartImage() throws IOException {
+    configure();
+    return getBufferedImage(jfreechart);
+  }
+
+  private void configure() {
+    configureChart(jfreechart, false);
+    configureDataset();
+    configurePlot();
+    applyParams();
+  }
+
+  private void configureDataset() {
+    dataset = new DefaultPieDataset();
+  }
+
+  private void configurePlot() {
+    PiePlot plot = (PiePlot) jfreechart.getPlot();
+    plot.setNoDataMessage(DEFAULT_MESSAGE_NODATA);
+    plot.setInsets(RectangleInsets.ZERO_INSETS);
+    plot.setDataset(dataset);
+    plot.setBackgroundAlpha(0.0f);
+    plot.setCircular(true);
+    plot.setLabelGenerator(null);
+    plot.setIgnoreNullValues(true);
+    plot.setIgnoreZeroValues(true);
+    plot.setShadowPaint(null);
+    plot.setLabelLinkMargin(0.0);
+    plot.setInteriorGap(0.02);
+    plot.setMaximumLabelWidth(0.10);
+  }
+
+  private void configureColors(String colors) {
+    try {
+      if (colors != null && colors.length() > 0) {
+        StringTokenizer stringTokenizer = new StringTokenizer(colors, ",");
+        int i = 0;
+        while (stringTokenizer.hasMoreTokens()) {
+          ((PiePlot) jfreechart.getPlot()).setSectionPaint(Integer.toString(i), Color.decode("0x" + stringTokenizer.nextToken()));
+          i++;
+        }
+      } else {
+        configureDefaultColors();
+      }
+    }
+    catch (Exception e) {
+      configureDefaultColors();
+    }
+  }
+
+  private void configureDefaultColors() {
+    PiePlot plot = (PiePlot) jfreechart.getPlot();
+    for (int i=0 ; i<COLORS.length ; i++) {
+      plot.setSectionPaint("" + i, COLORS[i]);
+    }
+  }
+
+  private void applyParams() {
+    applyCommonParams();
+
+    configureColors(params.get(CHART_PARAM_COLORS));
+    addMeasures(params.get(CHART_PARAM_VALUES));
+
+    // -- Plot
+    PiePlot plot = (PiePlot) jfreechart.getPlot();
+    plot.setOutlineVisible(isParamValueValid(params.get(CHART_PARAM_OUTLINE_VISIBLE)) && Boolean.getBoolean(params.get(CHART_PARAM_OUTLINE_VISIBLE)));
+  }
+
+  private void addMeasures(String values) {
+    if (values != null && values.length() > 0) {
+      StringTokenizer st = new StringTokenizer(values, ",");
+      int i = 0;
+      while (st.hasMoreTokens()) {
+        double measure = 0;
+        try {
+          measure = Double.parseDouble(st.nextToken());
+        }
+        catch (NumberFormatException e) {
+        }
+        dataset.setValue(Integer.toString(i), measure);
+        i++;
+      }
+    }
+  }
+
 }
\ No newline at end of file
index 202353846a89eda6d58fdd9b23f8a3c380947dba..d46790c0244aab57b728ce646eb1b0b3c3ad9024 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.server.charts.deprecated;\r
-\r
-import org.jfree.chart.JFreeChart;\r
-import org.jfree.chart.axis.DateAxis;\r
-import org.jfree.chart.axis.DateTickUnit;\r
-import org.jfree.chart.axis.NumberAxis;\r
-import org.jfree.chart.plot.XYPlot;\r
-import org.jfree.chart.renderer.xy.StandardXYItemRenderer;\r
-import org.jfree.chart.title.TextTitle;\r
-import org.jfree.data.xy.XYSeries;\r
-import org.jfree.data.xy.XYSeriesCollection;\r
-import org.jfree.ui.RectangleInsets;\r
-\r
-import java.awt.image.BufferedImage;\r
-import java.io.IOException;\r
-import java.util.Map;\r
-import java.util.StringTokenizer;\r
-\r
-public class SparkLinesChart extends BaseChartWeb implements DeprecatedChart {\r
-\r
-  private XYSeriesCollection dataset = null;\r
-  private DateAxis x = null;\r
-  private NumberAxis y = null;\r
-  private StandardXYItemRenderer renderer = null;\r
-\r
-  public SparkLinesChart(Map<String, String> params) {\r
-    super(params);\r
-    jfreechart = new JFreeChart(null, TextTitle.DEFAULT_FONT, new XYPlot(), false);\r
-  }\r
-\r
-  @Override\r
-  protected BufferedImage getChartImage() throws IOException {\r
-    configure();\r
-    return getBufferedImage(jfreechart);\r
-  }\r
-\r
-  private void configure() {\r
-    configureChart(jfreechart, false);\r
-    configureXAxis();\r
-    configureYAxis();\r
-    configureRenderer();\r
-    configureDataset();\r
-    configurePlot();\r
-    applyParams();\r
-  }\r
-\r
-  private void configureRenderer() {\r
-    renderer = new StandardXYItemRenderer(StandardXYItemRenderer.LINES);\r
-  }\r
-\r
-  private void configureYAxis() {\r
-    y = new NumberAxis();\r
-    y.setTickLabelsVisible(false);\r
-    y.setTickMarksVisible(false);\r
-    y.setAxisLineVisible(false);\r
-    y.setNegativeArrowVisible(false);\r
-    y.setPositiveArrowVisible(false);\r
-    y.setVisible(false);\r
-  }\r
-\r
-  private void configureXAxis() {\r
-    x = new DateAxis();\r
-    x.setTickUnit(new DateTickUnit(DateTickUnit.MONTH, 1));\r
-    x.setTickLabelsVisible(false);\r
-    x.setTickMarksVisible(false);\r
-    x.setAxisLineVisible(false);\r
-    x.setNegativeArrowVisible(false);\r
-    x.setPositiveArrowVisible(false);\r
-    x.setVisible(false);\r
-  }\r
-\r
-  private void configureDataset() {\r
-    dataset = new XYSeriesCollection();\r
-  }\r
-\r
-  private void configurePlot() {\r
-    XYPlot plot = (XYPlot) jfreechart.getPlot();\r
-    plot.setInsets(RectangleInsets.ZERO_INSETS);\r
-    plot.setDataset(dataset);\r
-    plot.setDomainAxis(x);\r
-    plot.setDomainGridlinesVisible(false);\r
-    plot.setDomainCrosshairVisible(false);\r
-    plot.setRangeGridlinesVisible(false);\r
-    plot.setRangeCrosshairVisible(false);\r
-    plot.setRangeAxis(y);\r
-    plot.setRenderer(renderer);\r
-    plot.setBackgroundAlpha(0.0f);\r
-  }\r
-\r
-  private void applyParams() {\r
-    applyCommonParams();\r
-\r
-    configureColors(params.get(CHART_PARAM_COLORS), renderer);\r
-    addMeasures(params.get(CHART_PARAM_VALUES));\r
-\r
-    // -- Plot\r
-    XYPlot plot = (XYPlot) jfreechart.getPlot();\r
-    plot.setOutlineVisible(isParamValueValid(params.get(CHART_PARAM_OUTLINE_VISIBLE)) && Boolean.getBoolean(params.get(CHART_PARAM_OUTLINE_VISIBLE)));\r
-  }\r
-\r
-  private void addMeasures(String values) {\r
-    double min = Double.MAX_VALUE;\r
-    double max = Double.MIN_VALUE;\r
-    XYSeries series1 = new XYSeries("");\r
-    if (values != null && values.length() > 0) {\r
-      StringTokenizer st = new StringTokenizer(values, ",");\r
-      while (st.hasMoreTokens()) {\r
-        double v_x = convertParamToDouble(st.nextToken());\r
-        double v_y = 0.0;\r
-        if (st.hasMoreTokens()) {\r
-          v_y = convertParamToDouble(st.nextToken());\r
-        }\r
-        series1.add(v_x, v_y);\r
-\r
-        min = (v_y < min ? v_y : min);\r
-        max = (v_y > max ? v_y : max);\r
-      }\r
-      dataset.addSeries(series1);\r
-      y.setRange(min-1, max+1);\r
-    }\r
-  }\r
-\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.server.charts.deprecated;
+
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.axis.DateAxis;
+import org.jfree.chart.axis.DateTickUnit;
+import org.jfree.chart.axis.NumberAxis;
+import org.jfree.chart.plot.XYPlot;
+import org.jfree.chart.renderer.xy.StandardXYItemRenderer;
+import org.jfree.chart.title.TextTitle;
+import org.jfree.data.xy.XYSeries;
+import org.jfree.data.xy.XYSeriesCollection;
+import org.jfree.ui.RectangleInsets;
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+public class SparkLinesChart extends BaseChartWeb implements DeprecatedChart {
+
+  private XYSeriesCollection dataset = null;
+  private DateAxis x = null;
+  private NumberAxis y = null;
+  private StandardXYItemRenderer renderer = null;
+
+  public SparkLinesChart(Map<String, String> params) {
+    super(params);
+    jfreechart = new JFreeChart(null, TextTitle.DEFAULT_FONT, new XYPlot(), false);
+  }
+
+  @Override
+  protected BufferedImage getChartImage() throws IOException {
+    configure();
+    return getBufferedImage(jfreechart);
+  }
+
+  private void configure() {
+    configureChart(jfreechart, false);
+    configureXAxis();
+    configureYAxis();
+    configureRenderer();
+    configureDataset();
+    configurePlot();
+    applyParams();
+  }
+
+  private void configureRenderer() {
+    renderer = new StandardXYItemRenderer(StandardXYItemRenderer.LINES);
+  }
+
+  private void configureYAxis() {
+    y = new NumberAxis();
+    y.setTickLabelsVisible(false);
+    y.setTickMarksVisible(false);
+    y.setAxisLineVisible(false);
+    y.setNegativeArrowVisible(false);
+    y.setPositiveArrowVisible(false);
+    y.setVisible(false);
+  }
+
+  private void configureXAxis() {
+    x = new DateAxis();
+    x.setTickUnit(new DateTickUnit(DateTickUnit.MONTH, 1));
+    x.setTickLabelsVisible(false);
+    x.setTickMarksVisible(false);
+    x.setAxisLineVisible(false);
+    x.setNegativeArrowVisible(false);
+    x.setPositiveArrowVisible(false);
+    x.setVisible(false);
+  }
+
+  private void configureDataset() {
+    dataset = new XYSeriesCollection();
+  }
+
+  private void configurePlot() {
+    XYPlot plot = (XYPlot) jfreechart.getPlot();
+    plot.setInsets(RectangleInsets.ZERO_INSETS);
+    plot.setDataset(dataset);
+    plot.setDomainAxis(x);
+    plot.setDomainGridlinesVisible(false);
+    plot.setDomainCrosshairVisible(false);
+    plot.setRangeGridlinesVisible(false);
+    plot.setRangeCrosshairVisible(false);
+    plot.setRangeAxis(y);
+    plot.setRenderer(renderer);
+    plot.setBackgroundAlpha(0.0f);
+  }
+
+  private void applyParams() {
+    applyCommonParams();
+
+    configureColors(params.get(CHART_PARAM_COLORS), renderer);
+    addMeasures(params.get(CHART_PARAM_VALUES));
+
+    // -- Plot
+    XYPlot plot = (XYPlot) jfreechart.getPlot();
+    plot.setOutlineVisible(isParamValueValid(params.get(CHART_PARAM_OUTLINE_VISIBLE)) && Boolean.getBoolean(params.get(CHART_PARAM_OUTLINE_VISIBLE)));
+  }
+
+  private void addMeasures(String values) {
+    double min = Double.MAX_VALUE;
+    double max = Double.MIN_VALUE;
+    XYSeries series1 = new XYSeries("");
+    if (values != null && values.length() > 0) {
+      StringTokenizer st = new StringTokenizer(values, ",");
+      while (st.hasMoreTokens()) {
+        double v_x = convertParamToDouble(st.nextToken());
+        double v_y = 0.0;
+        if (st.hasMoreTokens()) {
+          v_y = convertParamToDouble(st.nextToken());
+        }
+        series1.add(v_x, v_y);
+
+        min = (v_y < min ? v_y : min);
+        max = (v_y > max ? v_y : max);
+      }
+      dataset.addSeries(series1);
+      y.setRange(min-1, max+1);
+    }
+  }
+
 }
\ No newline at end of file
index bb5037f944051e2efc788ec4e9482f36153d5590..e8f62192a6ff5688d394579b8921e884b01e9803 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.server.charts.jruby;\r
-\r
-import org.apache.commons.lang.LocaleUtils;\r
-import org.jfree.chart.JFreeChart;\r
-import org.jfree.chart.axis.AxisLocation;\r
-import org.jfree.chart.axis.DateAxis;\r
-import org.jfree.chart.axis.NumberAxis;\r
-import org.jfree.chart.plot.Marker;\r
-import org.jfree.chart.plot.ValueMarker;\r
-import org.jfree.chart.plot.XYPlot;\r
-import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;\r
-import org.jfree.chart.title.TextTitle;\r
-import org.jfree.data.time.Day;\r
-import org.jfree.data.time.TimeSeries;\r
-import org.jfree.data.time.TimeSeriesCollection;\r
-import org.jfree.ui.RectangleAnchor;\r
-import org.jfree.ui.RectangleEdge;\r
-import org.jfree.ui.RectangleInsets;\r
-import org.jfree.ui.TextAnchor;\r
-import org.sonar.server.charts.deprecated.BaseChart;\r
-\r
-import java.awt.*;\r
-import java.awt.image.BufferedImage;\r
-import java.io.IOException;\r
-import java.text.DateFormat;\r
-import java.text.DecimalFormat;\r
-import java.text.ParseException;\r
-import java.util.Date;\r
-import java.util.TreeMap;\r
-\r
-public class TrendsChart extends BaseChart {\r
-\r
-  private XYPlot plot;\r
-  private TreeMap<Long, TimeSeries> seriesById;\r
-  private int percentAxisId = -1;\r
-  private boolean displayLegend;\r
-\r
-  public TrendsChart(int width, int height, String localeKey, boolean displayLegend) {\r
-    super(width, height);\r
-    this.displayLegend = displayLegend;\r
-    seriesById = new TreeMap<Long, TimeSeries>();\r
-    plot = new XYPlot();\r
-    DateAxis dateAxis = new DateAxis();\r
-    dateAxis.setDateFormatOverride(DateFormat.getDateInstance(DateFormat.SHORT, LocaleUtils.toLocale(localeKey)));\r
-    plot.setDomainAxis(dateAxis);\r
-  }\r
-\r
-  public void initSerie(Long serieId, String legend, boolean isPercent) {\r
-    TimeSeries series = new TimeSeries(legend);\r
-\r
-    int index=seriesById.size();\r
-    seriesById.put(serieId, series);\r
-\r
-    TimeSeriesCollection timeSeriesColl = new TimeSeriesCollection();\r
-    timeSeriesColl.addSeries(series);\r
-    plot.setDataset(index, timeSeriesColl);\r
-\r
-    if (isPercent) {\r
-      if (percentAxisId == -1) {\r
-        NumberAxis rangeAxis = new NumberAxis();\r
-        rangeAxis.setNumberFormatOverride(new DecimalFormat("0'%'"));\r
-        rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\r
-        rangeAxis.setUpperBound(100.0);\r
-        rangeAxis.setLowerBound(0.0);\r
-        plot.setRangeAxisLocation(index, AxisLocation.TOP_OR_LEFT);\r
-        plot.setRangeAxis(index, rangeAxis);\r
-        plot.mapDatasetToRangeAxis(index, index);\r
-        percentAxisId = index;\r
-\r
-      } else {\r
-        plot.mapDatasetToRangeAxis(index, percentAxisId);\r
-      }\r
-    } else {\r
-      NumberAxis rangeAxis = new NumberAxis(displayLegend ? legend : null);\r
-      rangeAxis.setAutoRangeIncludesZero(false);\r
-      rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());\r
-      rangeAxis.setAutoRangeMinimumSize(2.0);\r
-      plot.setRangeAxisLocation(index, AxisLocation.TOP_OR_RIGHT);\r
-      plot.setRangeAxis(index, rangeAxis);\r
-      plot.mapDatasetToRangeAxis(index, index);\r
-    }\r
-\r
-    XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();\r
-    renderer.setBaseShapesVisible(false);\r
-    renderer.setSeriesStroke(0, new BasicStroke(2.0f));\r
-    renderer.setSeriesPaint(0, COLORS[index % COLORS.length]);\r
-    plot.setRenderer(index, renderer);\r
-  }\r
-\r
-  public void addMeasure(Double value, Date date, Long serieId) {\r
-    seriesById.get(serieId).addOrUpdate(new Day(date), value);\r
-  }\r
-\r
-  public void addLabel(Date date, String label) throws ParseException {\r
-    addLabel(date, label, false);\r
-  }\r
-\r
-  public void addLabel(Date date, String label, boolean lower) throws ParseException {\r
-    Day d = new Day(date);\r
-    double millis = d.getFirstMillisecond();\r
-    Marker marker = new ValueMarker(millis);\r
-    marker.setLabel(label);\r
-    marker.setLabelAnchor(RectangleAnchor.TOP_RIGHT);\r
-    marker.setLabelTextAnchor(TextAnchor.TOP_LEFT);\r
-    Color c = new Color(17, 40, 95);\r
-    marker.setLabelPaint(c);\r
-    marker.setPaint(c);\r
-    marker.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 3.0f, new float[]{5f, 5f, 5f, 5f}, 2.0f));\r
-    if (lower) {\r
-      marker.setLabelOffset(new RectangleInsets(18, 0, 0, 5));\r
-    }\r
-    plot.addDomainMarker(marker);\r
-  }\r
-\r
-  @Override\r
-  protected BufferedImage getChartImage() throws IOException {\r
-    JFreeChart chart = new JFreeChart(null, TextTitle.DEFAULT_FONT, plot, true);\r
-    configureChart(chart, displayLegend ? RectangleEdge.BOTTOM : null);\r
-    return super.getBufferedImage(chart);\r
-  }\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.server.charts.jruby;
+
+import org.apache.commons.lang.LocaleUtils;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.axis.AxisLocation;
+import org.jfree.chart.axis.DateAxis;
+import org.jfree.chart.axis.NumberAxis;
+import org.jfree.chart.plot.Marker;
+import org.jfree.chart.plot.ValueMarker;
+import org.jfree.chart.plot.XYPlot;
+import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
+import org.jfree.chart.title.TextTitle;
+import org.jfree.data.time.Day;
+import org.jfree.data.time.TimeSeries;
+import org.jfree.data.time.TimeSeriesCollection;
+import org.jfree.ui.RectangleAnchor;
+import org.jfree.ui.RectangleEdge;
+import org.jfree.ui.RectangleInsets;
+import org.jfree.ui.TextAnchor;
+import org.sonar.server.charts.deprecated.BaseChart;
+
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.text.DateFormat;
+import java.text.DecimalFormat;
+import java.text.ParseException;
+import java.util.Date;
+import java.util.TreeMap;
+
+public class TrendsChart extends BaseChart {
+
+  private XYPlot plot;
+  private TreeMap<Long, TimeSeries> seriesById;
+  private int percentAxisId = -1;
+  private boolean displayLegend;
+
+  public TrendsChart(int width, int height, String localeKey, boolean displayLegend) {
+    super(width, height);
+    this.displayLegend = displayLegend;
+    seriesById = new TreeMap<Long, TimeSeries>();
+    plot = new XYPlot();
+    DateAxis dateAxis = new DateAxis();
+    dateAxis.setDateFormatOverride(DateFormat.getDateInstance(DateFormat.SHORT, LocaleUtils.toLocale(localeKey)));
+    plot.setDomainAxis(dateAxis);
+  }
+
+  public void initSerie(Long serieId, String legend, boolean isPercent) {
+    TimeSeries series = new TimeSeries(legend);
+
+    int index=seriesById.size();
+    seriesById.put(serieId, series);
+
+    TimeSeriesCollection timeSeriesColl = new TimeSeriesCollection();
+    timeSeriesColl.addSeries(series);
+    plot.setDataset(index, timeSeriesColl);
+
+    if (isPercent) {
+      if (percentAxisId == -1) {
+        NumberAxis rangeAxis = new NumberAxis();
+        rangeAxis.setNumberFormatOverride(new DecimalFormat("0'%'"));
+        rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
+        rangeAxis.setUpperBound(100.0);
+        rangeAxis.setLowerBound(0.0);
+        plot.setRangeAxisLocation(index, AxisLocation.TOP_OR_LEFT);
+        plot.setRangeAxis(index, rangeAxis);
+        plot.mapDatasetToRangeAxis(index, index);
+        percentAxisId = index;
+
+      } else {
+        plot.mapDatasetToRangeAxis(index, percentAxisId);
+      }
+    } else {
+      NumberAxis rangeAxis = new NumberAxis(displayLegend ? legend : null);
+      rangeAxis.setAutoRangeIncludesZero(false);
+      rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
+      rangeAxis.setAutoRangeMinimumSize(2.0);
+      plot.setRangeAxisLocation(index, AxisLocation.TOP_OR_RIGHT);
+      plot.setRangeAxis(index, rangeAxis);
+      plot.mapDatasetToRangeAxis(index, index);
+    }
+
+    XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
+    renderer.setBaseShapesVisible(false);
+    renderer.setSeriesStroke(0, new BasicStroke(2.0f));
+    renderer.setSeriesPaint(0, COLORS[index % COLORS.length]);
+    plot.setRenderer(index, renderer);
+  }
+
+  public void addMeasure(Double value, Date date, Long serieId) {
+    seriesById.get(serieId).addOrUpdate(new Day(date), value);
+  }
+
+  public void addLabel(Date date, String label) throws ParseException {
+    addLabel(date, label, false);
+  }
+
+  public void addLabel(Date date, String label, boolean lower) throws ParseException {
+    Day d = new Day(date);
+    double millis = d.getFirstMillisecond();
+    Marker marker = new ValueMarker(millis);
+    marker.setLabel(label);
+    marker.setLabelAnchor(RectangleAnchor.TOP_RIGHT);
+    marker.setLabelTextAnchor(TextAnchor.TOP_LEFT);
+    Color c = new Color(17, 40, 95);
+    marker.setLabelPaint(c);
+    marker.setPaint(c);
+    marker.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 3.0f, new float[]{5f, 5f, 5f, 5f}, 2.0f));
+    if (lower) {
+      marker.setLabelOffset(new RectangleInsets(18, 0, 0, 5));
+    }
+    plot.addDomainMarker(marker);
+  }
+
+  @Override
+  protected BufferedImage getChartImage() throws IOException {
+    JFreeChart chart = new JFreeChart(null, TextTitle.DEFAULT_FONT, plot, true);
+    configureChart(chart, displayLegend ? RectangleEdge.BOTTOM : null);
+    return super.getBufferedImage(chart);
+  }
 }
\ No newline at end of file
index c610f0655353761c50bc89c652629c261bce7c2d..635f256bb794783f5e4f5c987c57f2bf1b266bf6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5636e5bc15159854ad4c09325d14c64db79f208c..2079f4c66ae4d36efb5aff690fbf6d66799651cc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7f67320aec259522389b597b6b47120dd324583e..827f77cbc8598e43f650062094b286c45a84c18a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 342515a1c7a59156d8c86a1858b7a4d75b43cdb3..e4d3b9d05861b55299aad9da2f6f60643fc37f41 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f9a8287052f3587b72c6269091a1b5ac9ab7082e..b63d156e78706ea04a503b4b8b117e285d258365 100644 (file)
@@ -1,52 +1,52 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.server.configuration;\r
-\r
-import org.apache.commons.configuration.Configuration;\r
-import org.apache.commons.lang.StringUtils;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-\r
-import java.util.Iterator;\r
-\r
-public final class ConfigurationLogger {\r
-\r
-  private ConfigurationLogger() {\r
-    // only static methods\r
-  }\r
-\r
-  public static void log(Configuration configuration) {\r
-    Logger log = LoggerFactory.getLogger(ConfigurationLogger.class);\r
-    if (log.isDebugEnabled()) {\r
-      Iterator<String> keys = configuration.getKeys();\r
-      while (keys.hasNext()) {\r
-        String key = keys.next();\r
-        String property = getTruncatedProperty(configuration, key);\r
-        log.debug("Property: " + key + " is: '" + property + "'");\r
-      }\r
-    }\r
-  }\r
-\r
-  static String getTruncatedProperty(Configuration configuration, String key) {\r
-    String property = StringUtils.join(configuration.getStringArray(key), ",");\r
-    return StringUtils.abbreviate(property, 100);\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.server.configuration;
+
+import org.apache.commons.configuration.Configuration;
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Iterator;
+
+public final class ConfigurationLogger {
+
+  private ConfigurationLogger() {
+    // only static methods
+  }
+
+  public static void log(Configuration configuration) {
+    Logger log = LoggerFactory.getLogger(ConfigurationLogger.class);
+    if (log.isDebugEnabled()) {
+      Iterator<String> keys = configuration.getKeys();
+      while (keys.hasNext()) {
+        String key = keys.next();
+        String property = getTruncatedProperty(configuration, key);
+        log.debug("Property: " + key + " is: '" + property + "'");
+      }
+    }
+  }
+
+  static String getTruncatedProperty(Configuration configuration, String key) {
+    String property = StringUtils.join(configuration.getStringArray(key), ",");
+    return StringUtils.abbreviate(property, 100);
+  }
+
+}
index c550a0d692bb5a2a9f63afe1ae95495fde8eb3c8..8e018e52af0e778b257532c2c156635a9142c8cc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1fc7fd5c24b0f2e6f676a6a71e6cdf546f8dfc3d..d4859c546d337a8e5caf0d9fde3160317da67d25 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4067d83d37a61de938a733cb651e3eb41183e4f8..143427d6457de21eb0ee8f047ecf18e2861ed8c6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 02564ab0475c2eab80ab8019f970425cc5d5bc43..4734352e97945fb1dae68edbb7e2e278dcaf87eb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 374f04fc8675ecf1edfa96b525a5313674edb06e..5b8dbc943f3a013101866a515f0acacc6eb6b518 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5a9112237d95e7a51109571c907801f0fc856d28..d82f76cb8fd30868be64be8584ec261f6e17fdc6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 123fc534b54c710c82a3d6201ca8f2fb7577d03e..688a6d30ce4dee66e73e97c4f852d54476e68d03 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c9a5a7da3df35b81e33cd776e2334e8f6560ba10..16b907b35924210f997c4f45d2a5ec1ae586b095 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d700a493c88f7cb8feb7f61fb249dfdacfb09409..92787dee792b8d756dbae697f617a1f0b758a8d1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 47fe6be9b73fe3d7b51a8b53784d6c972d7a8c53..1d235ef0cf1a825a73980ff21957e4ae70fd7855 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e92d266104b8232952d3ce565de7b89c53a170f4..3f7a0887b04f5500387fc89c2f69fbfe706307f1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1bb4722ae508d87c8fd7112d55cba85f3e3afd00..58f8e515f7b4c5e8955fe8754946c2c3ebbb8f7f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6b26e55a0a973e9c842380f98f6dd3e710be0cf3..04a6ee12b43f41eb78949277ccc25944bb56b580 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d2c864ff1818ab43db135767db49015d7695ac14..070c360c94db4051081638e903768e5d6f007baf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 27ad79fe38284e5c8e021310f9ba6fe2a459793d..5015f4ac3268538672f416a2ac4c874de38df3a4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5408eff84970bb6fb2bc3449131d4517e5213db0..c0b54e1c8ad9ba01b71c3e486483aea187e82404 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 810b24d0c0365e6d3c8970f10a423901d0b523b5..5e0d352fbb82e117e3973e1ca2b033e5e6b4ce83 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f1e8501f1aea21909a1cb21c5cf0b2105ae15a49..cf1793dd085308207581db6db37279cdd7317819 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f5b99fc183a22c2f4da4c66c50c4eb7ef07ae1d9..8dbd3e57d598b272ce94089e20422062a57bc507 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 154a512fc5ba1d5a1f2f4bb00304bbfdb911dd38..bd90adea32124339d32beeca9bd573b1f0be5be9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2962289e48a7ee5c9190175f1165b25514d9d6b7..1810d8e5d896a974414c3c2586026e9c8d1cbf0d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0230b53708ef41981b55acc977262358fd5402b2..69bc39280cfe43a18d4b2c1cf9e4bd3adb06f3ac 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1d0ab614b67fb40d3274c0055a176b608705b873..aaa69ba804753ffd1245b1554d0815aaef4beea2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 954e96575cbdf2bdc9b9298d78fd3594fd0324ac..31bb8bf0f09334f6eb6439119f8070066279c259 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6a8f10ea2fd4e97f833af08ff6ecc248fff5e8e1..5267fbcc8ebe8fcf433c695a9641c1b5dcd33d6f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 42d6bc229c61a3f339486a3b7cae2593c3a466e6..4edc5db042861a0455618e50f3b53abf858f8506 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5638bfd0bf8535e8ef28621cc161506f44d9fe81..828c80505e22032370f3ff46b75fc726a493ec6d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b47258bb802a59f59504b1b28c41f243f197029b..bf83fa6961b18bedad683e549183a60b87928411 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d76f3dcfa7d3eceb8ec355d9105f0858e96cf88d..eee0237bf3ee1ac5755789ecb4d3d9eb1d570020 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6da8ea3fd490ad27c306ce087ad1b60e65dcdca6..2c5406cdf5ea0fc9a7cebec044c8823503fd052c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f3d9c23c6311370578ccebc17e3d153aea7fbb70..aa58429eac5c094f97fe11d1afcf54dd2939bf5d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 58410f2cbd88e3766c6f15dc3972e05e57ae5e45..b4e0fbad1378e364cbac2e0d70cf72c98a2e0387 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2effefe822d3ede6c0de644c24ca8d8d8e679d9f..0d65664b4c14a7cbb36e8a95551fa7080c9156d7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5cc2def52d25d0f995d3ee5ad4f19d1cd45e4a96..a5cc852215b537fd2da0188e66add8e1d3a0af6e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e79ec2e860286f69fdc4bec4a7c8b2f7dca1e697..e9d8612a55a2bb5fba986162d72ea7d9f1783edd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0481fcbae902e882fb58ce75de35f6c39be2a06e..9d1a60a01df7532a9e990dfb7dd72b3ff213acd0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a85570f1a015b2741eb87201b21fd4df4bd7093a..7dbcc8543d175e32585f265d06db32656adf1668 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 82c1cc773c1651d786db332aa14a87dcc8fc001a..c37e99eb447bb8fb743c4381174d2c73e5d00229 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6e33ace2d42881f4f829bf2e584cbcb7fc41b00c..fb29dfe807b6439c2a2d24cbb9e695a34bfc5a4b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0e5290a00128aaf26f37bd399b66d3263eeeaf06..9f2a3e0674103b042668af8e39961ab186c1f93a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8bd0f005e9e1b92abaa75f7f2a1f53a13af46400..213051e6cbc225efd997b143d1a6ad2d383f73a6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 623f6c0abf6f0aaf0563579d08d493fc88963bac..dbb7f2eac44b4fbab836191cba81add5b361cf13 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c55ec758f1ccf4b6190efe4154ef08da52f57933..4d49738ca50e51e228f3f19fc9da437ec6f3b590 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ee0628f76dc24ed452d3cd47d78f5fe21578edb3..40ed1877b0711295ca97d8a7d544bac3c5b4638a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 55de2e4efb5b113b6465192b86f0ad385691f2c8..0a0bfa5705baf1021ce29fdb242f2b28d4590704 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8217194761ab66243420565a393ff2d0a06b3b1a..e70f785c43874041aa687a67be6e00b2814072dc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 62bd8867a73753a54f67d020f72d4bf4d91d444b..a7ed65b5e7cd699502b78106424a36edfdb25b67 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b608d35cbf092e421c22d7cb3383026e43965056..c780c14e7197084024ee47d3aaa149b1203b157c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index eed02cc31b405fc8e8b71df571a488e7aaba28bd..cce7eeae5b4bd30a480b9b36a7a9fd2d50a1cbe4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9dc2fcccf817bf1371efd681314cfa6a936930d5..2ae0845dd024b6be32540169b8cc63513d2515e7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2b54debd20d6720efe291c41afcf9bdb61d2c351..fd7fb4a501da167e4283fef37562fe56543c1278 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 941be544f2e50fa99113d0931c5be2ac45b7180c..e22e66ea86168fdd315bec9ad75551d16a6cd69d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 769371519e6b328490d4ac854389b181d0530273..7d25cc572086e8b4e3df6d26ecb883fe886ac955 100644 (file)
@@ -1,97 +1,97 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.server.startup;\r
-\r
-import com.google.common.collect.Lists;\r
-import com.google.common.collect.Maps;\r
-import org.sonar.api.database.DatabaseSession;\r
-import org.sonar.api.measures.CoreMetrics;\r
-import org.sonar.api.measures.Metric;\r
-import org.sonar.api.measures.Metrics;\r
-import org.sonar.api.profiles.Alert;\r
-import org.sonar.api.utils.Logs;\r
-import org.sonar.api.utils.TimeProfiler;\r
-import org.sonar.jpa.dao.MeasuresDao;\r
-import org.sonar.server.platform.ServerStartException;\r
-\r
-import javax.persistence.Query;\r
-\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-public class RegisterMetrics {\r
-\r
-  private MeasuresDao measuresDao;\r
-  private Metrics[] metricsRepositories = null;\r
-  private DatabaseSession session;\r
-\r
-  public RegisterMetrics(DatabaseSession session, MeasuresDao measuresDao, Metrics[] metricsRepositories) {\r
-    this.session = session;\r
-    this.measuresDao = measuresDao;\r
-    this.metricsRepositories = metricsRepositories;\r
-  }\r
-\r
-  public void start() {\r
-    TimeProfiler profiler = new TimeProfiler().start("Load metrics");\r
-    measuresDao.disableAutomaticMetrics();\r
-\r
-    List<Metric> metricsToRegister = Lists.newArrayList();\r
-    metricsToRegister.addAll(CoreMetrics.getMetrics());\r
-\r
-    Map<String, Metrics> metricsByRepository = Maps.newHashMap();\r
-    if (metricsRepositories != null) {\r
-      for (Metrics metrics : metricsRepositories) {\r
-        checkMetrics(metricsByRepository, metrics);\r
-        metricsToRegister.addAll(metrics.getMetrics());\r
-      }\r
-    }\r
-    register(metricsToRegister);\r
-    cleanAlerts();\r
-    profiler.stop();\r
-  }\r
-\r
-  private void checkMetrics(Map<String, Metrics> metricsByRepository, Metrics metrics) {\r
-    for (Metric metric : metrics.getMetrics()) {\r
-      String metricKey = metric.getKey();\r
-      if (CoreMetrics.metrics.contains(metric)) {\r
-        throw new ServerStartException("The following metric is already defined in sonar: " + metricKey);\r
-      }\r
-      Metrics anotherRepository = metricsByRepository.get(metricKey);\r
-      if (anotherRepository != null) {\r
-        throw new ServerStartException("The metric '" + metricKey + "' is already defined in the extension: " + anotherRepository);\r
-      }\r
-      metricsByRepository.put(metricKey, metrics);\r
-    }\r
-  }\r
-\r
-  protected void cleanAlerts() {\r
-    Logs.INFO.info("cleaning alert thresholds...");\r
-    Query query = session.createQuery("delete from " + Alert.class.getSimpleName() + " a where NOT EXISTS(FROM Metric m WHERE m=a.metric))");\r
-    query.executeUpdate();\r
-\r
-    query = session.createQuery("delete from " + Alert.class.getSimpleName() + " a where NOT EXISTS(FROM Metric m WHERE m=a.metric and m.enabled=true))");\r
-    query.executeUpdate();\r
-    session.commit();\r
-  }\r
-\r
-  protected void register(List<Metric> metrics) {\r
-    measuresDao.registerMetrics(metrics);\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.server.startup;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import org.sonar.api.database.DatabaseSession;
+import org.sonar.api.measures.CoreMetrics;
+import org.sonar.api.measures.Metric;
+import org.sonar.api.measures.Metrics;
+import org.sonar.api.profiles.Alert;
+import org.sonar.api.utils.Logs;
+import org.sonar.api.utils.TimeProfiler;
+import org.sonar.jpa.dao.MeasuresDao;
+import org.sonar.server.platform.ServerStartException;
+
+import javax.persistence.Query;
+
+import java.util.List;
+import java.util.Map;
+
+public class RegisterMetrics {
+
+  private MeasuresDao measuresDao;
+  private Metrics[] metricsRepositories = null;
+  private DatabaseSession session;
+
+  public RegisterMetrics(DatabaseSession session, MeasuresDao measuresDao, Metrics[] metricsRepositories) {
+    this.session = session;
+    this.measuresDao = measuresDao;
+    this.metricsRepositories = metricsRepositories;
+  }
+
+  public void start() {
+    TimeProfiler profiler = new TimeProfiler().start("Load metrics");
+    measuresDao.disableAutomaticMetrics();
+
+    List<Metric> metricsToRegister = Lists.newArrayList();
+    metricsToRegister.addAll(CoreMetrics.getMetrics());
+
+    Map<String, Metrics> metricsByRepository = Maps.newHashMap();
+    if (metricsRepositories != null) {
+      for (Metrics metrics : metricsRepositories) {
+        checkMetrics(metricsByRepository, metrics);
+        metricsToRegister.addAll(metrics.getMetrics());
+      }
+    }
+    register(metricsToRegister);
+    cleanAlerts();
+    profiler.stop();
+  }
+
+  private void checkMetrics(Map<String, Metrics> metricsByRepository, Metrics metrics) {
+    for (Metric metric : metrics.getMetrics()) {
+      String metricKey = metric.getKey();
+      if (CoreMetrics.metrics.contains(metric)) {
+        throw new ServerStartException("The following metric is already defined in sonar: " + metricKey);
+      }
+      Metrics anotherRepository = metricsByRepository.get(metricKey);
+      if (anotherRepository != null) {
+        throw new ServerStartException("The metric '" + metricKey + "' is already defined in the extension: " + anotherRepository);
+      }
+      metricsByRepository.put(metricKey, metrics);
+    }
+  }
+
+  protected void cleanAlerts() {
+    Logs.INFO.info("cleaning alert thresholds...");
+    Query query = session.createQuery("delete from " + Alert.class.getSimpleName() + " a where NOT EXISTS(FROM Metric m WHERE m=a.metric))");
+    query.executeUpdate();
+
+    query = session.createQuery("delete from " + Alert.class.getSimpleName() + " a where NOT EXISTS(FROM Metric m WHERE m=a.metric and m.enabled=true))");
+    query.executeUpdate();
+    session.commit();
+  }
+
+  protected void register(List<Metric> metrics) {
+    measuresDao.registerMetrics(metrics);
+  }
+}
index 99af8cfc275946a79633a42ee1fdec11c62c1d0d..5f36e4b84b28ad7bf37a76bfd925e4d980d6fce1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 424bd7378bc8136ed7cc8e23276db6f3fdb274b7..bc9cc902396827aa41bcb73db07ff81dd1f75de4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2e2d31defedac91ffe930eeeed0e23554985477e..3ad4ae210c9db9d3b5f90134bea3ffd0979e91d6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2159465e877bfb5b8399da383c5d020841a64b88..6a6e4092c52a96b86ff6e8d0c0ba7a179074b0fb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8f4a8404811da2d6ccee8f005c6a267235f5283f..ed42799fd97e4d4a3ad67b9326ff5798401c0d17 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1e0c17f2cab1d4121f1e0c628a71f573898e46da..0e57e6bbfc56dd067f67ff5cdc9fe1d0ba967bc9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 87e5ca667ce1876e442ace6dd487451693eb5d26..f6f346fdd44acac2b22ad70be3355b56337c0433 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c0ac1d62cd8cdcf0cf63adcdc92337ca4e744fdf..1c7d6f43123c7bacbe19b52b1711baf5b25dfaa9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 60a792f5cc3d3789e5b8bf7f8e2c9a0be2ff6911..f540eda5a93321854da191396288e0d0d5e34d0a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 52a67f10ec948ac67258939e204faea78a9fd9e4..e29fd9cd44215925e4a1cc873e1b2c5d9f0b8abd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 59fae3ac6a505dc39bc7b050f18a989243ad80bb..d36e9562dabeaa4f2b673864803aceafe0a2a47f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 69e4c8ee6434e57fb7bdd29c7c786226c66984a1..94b789eda4678d516da4c7e971d31853aab8e9d3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ff16ea8ce3f8b69453018dfaacf9d08f87c03b7c..340ce2bfc3af4f77594843df52b1fe4df2f51b5e 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 41f3f2c2e69ffe6b398db7ce07a4ae6a13eb46e3..d57f4dd806bd2cb65d4d42d6377ee9a9b88f0666 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index e7654f7fdc70aaf85137444924c65ecb82f373cc..8ac69071732ed7e7c726073ee3b86d8239b074a7 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 487b371d866263f13032d3fff6d7745b22c183e9..19bc6c75c92967a4aef0131f0358ad12b888dbad 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 999af3c890140c6e9d0870383a4c02118d03e914..709b7d103fe16e2a8d145b32f826f254fe1b3437 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 19accdd5ec0097fcdb3daf515de6236eda01b6f8..cfbb9bc07f050689de401c05714c96cf3f2ca38a 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 89d22f6002daded9f8b87f9ec9686408fff31cbd..c91ad4b244531e5cc7f74fd79be2db6f96b34c70 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 55729ce682954220ae10ce51e74a2f0f015a0145..e22c280a179fe2b257de546a69cf39774ede004f 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index e2d2a42bbe015492b268579d4a433fd8b5d3dff4..4d119778824215e38de8186a2419c8bdc771e1be 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 9bf22ae9c0dd5bf4fbabc04ce1cb1005a43946a2..6e1c880d96837e737a2686a9a1ef3e07f1fa0835 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 2572296030dfb2c15de4d5a489f1a3606d0c2acd..c1ce7058cd9ced27f423379cb1a6debceb7152ca 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 4d28149b5b16d04d99c0f2fe35fdc559723f3622..e0beb3c82331f4eba6b1908b6326aead06591894 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 89b78929d1b699faad7e1829761e6b0b05fba29b..0f854e084eeea7b5de11b8579e34018e931cddbd 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 45e161969bbbb93765e5493986611ec94343853a..2db651e784c0d90ef3ed6c407e303a527f85c6bb 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 2daf8b9d5683c515adf9c3ea3f163a7adf755363..a7e01d541d089d0fd7ca2072f4a5f07a350b7174 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index c073a69d793a774ceecffaf6db5fd382272f47fb..814ba1c9950e795ec75699bd5067488e0240cea9 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index e3d78fba99fb3b3ca3725d00384e6914719a250b..0d9a4bb5394b586961bfcac0fa2732a5f5778b3c 100644 (file)
@@ -1,99 +1,99 @@
-#\r
-# Sonar, entreprise quality control tool.\r
-# Copyright (C) 2009 SonarSource SA\r
-# mailto:contact AT sonarsource DOT com\r
-#\r
-# Sonar is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 3 of the License, or (at your option) any later version.\r
-#\r
-# Sonar is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with Sonar; if not, write to the Free Software\r
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
-#\r
-require 'fastercsv'\r
-require "json"\r
-\r
-class Api::RulesController < Api::RestController\r
-\r
-  def rest_call\r
-    set_backward_compatibility_params\r
-    language = params[:language] || ''\r
-    options= {}\r
-\r
-    options[:plugins]=params[:plugins].split(',') if params[:plugins]\r
-    options[:language]=language\r
-    options[:priorities]=params[:priorities].split(',') if params[:priorities]\r
-    options[:status]=params[:status]\r
-    options[:searchtext]=params[:searchtext]\r
-    options[:include_parameters]=true\r
-    options[:inheritance]=params[:inheritance]\r
-    \r
-\r
-    if params[:profile]\r
-      profile = Profile.find_by_name_and_language(params[:profile], language)\r
-      if profile.nil?\r
-        rest_render([])\r
-      else\r
-        options[:profile]=profile\r
-        rules = Rule.search(java_facade, options)\r
-        rest_render(rules, profile)\r
-      end\r
-    else\r
-      rules = Rule.search(java_facade, options)\r
-      rest_render(rules)\r
-    end\r
-  end\r
-  \r
-  def set_backward_compatibility_params\r
-    params[:plugins]=params[:plugin] if params[:plugin]\r
-    params[:priorities]=params[:levels] if params[:levels]\r
-  end\r
-\r
-\r
-  private\r
-\r
-  def rest_render(rules=[], profile=nil)\r
-    respond_to do |format|\r
-      format.json{ render :json => rest_to_json(rules, profile) }\r
-      format.xml { render :xml => rest_to_xml(rules, profile) }\r
-      format.csv {\r
-        send_data(rest_to_csv(rules, profile),\r
-          :type => 'text/csv; charset=utf-8; header=present',\r
-          :disposition => 'attachment; filename=rules.csv')\r
-      }\r
-    end\r
-  end\r
-\r
-  def rest_to_json(rules, profile)\r
-    JSON(rules.collect{|rule| rule.to_hash_json(profile)})\r
-  end\r
-\r
-  def rest_to_xml(rules, profile)\r
-    xml = Builder::XmlMarkup.new(:indent => 0)\r
-    xml.instruct!\r
-    xml.rules do\r
-      rules.each do |rule|\r
-        xml << rule.to_xml(profile)\r
-      end\r
-    end\r
-  end\r
-\r
-  def rest_to_csv(rules, profile)\r
-    FasterCSV.generate do |csv|\r
-      header = ["title", "key", "plugin"]\r
-      header.concat(["priority","status"]) if profile\r
-      csv << header\r
-      rules.each do |rule|\r
-        csv << rule.to_csv(profile)\r
-      end\r
-    end\r
-  end\r
-\r
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+#
+require 'fastercsv'
+require "json"
+
+class Api::RulesController < Api::RestController
+
+  def rest_call
+    set_backward_compatibility_params
+    language = params[:language] || ''
+    options= {}
+
+    options[:plugins]=params[:plugins].split(',') if params[:plugins]
+    options[:language]=language
+    options[:priorities]=params[:priorities].split(',') if params[:priorities]
+    options[:status]=params[:status]
+    options[:searchtext]=params[:searchtext]
+    options[:include_parameters]=true
+    options[:inheritance]=params[:inheritance]
+    
+
+    if params[:profile]
+      profile = Profile.find_by_name_and_language(params[:profile], language)
+      if profile.nil?
+        rest_render([])
+      else
+        options[:profile]=profile
+        rules = Rule.search(java_facade, options)
+        rest_render(rules, profile)
+      end
+    else
+      rules = Rule.search(java_facade, options)
+      rest_render(rules)
+    end
+  end
+  
+  def set_backward_compatibility_params
+    params[:plugins]=params[:plugin] if params[:plugin]
+    params[:priorities]=params[:levels] if params[:levels]
+  end
+
+
+  private
+
+  def rest_render(rules=[], profile=nil)
+    respond_to do |format|
+      format.json{ render :json => rest_to_json(rules, profile) }
+      format.xml { render :xml => rest_to_xml(rules, profile) }
+      format.csv {
+        send_data(rest_to_csv(rules, profile),
+          :type => 'text/csv; charset=utf-8; header=present',
+          :disposition => 'attachment; filename=rules.csv')
+      }
+    end
+  end
+
+  def rest_to_json(rules, profile)
+    JSON(rules.collect{|rule| rule.to_hash_json(profile)})
+  end
+
+  def rest_to_xml(rules, profile)
+    xml = Builder::XmlMarkup.new(:indent => 0)
+    xml.instruct!
+    xml.rules do
+      rules.each do |rule|
+        xml << rule.to_xml(profile)
+      end
+    end
+  end
+
+  def rest_to_csv(rules, profile)
+    FasterCSV.generate do |csv|
+      header = ["title", "key", "plugin"]
+      header.concat(["priority","status"]) if profile
+      csv << header
+      rules.each do |rule|
+        csv << rule.to_csv(profile)
+      end
+    end
+  end
+
 end
\ No newline at end of file
index d8ac970bcb03bd6e6da71d2c78a805ce174b6ba0..00d93e56597fd39950c67d08b4fa5707137f7d3c 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 23b4df1405ac13813f789266e9b1d58181337296..4dff8559b9ae8b1cb47f34b1c275afd94683db82 100644 (file)
@@ -1,66 +1,66 @@
-#\r
-# Sonar, entreprise quality control tool.\r
-# Copyright (C) 2009 SonarSource SA\r
-# mailto:contact AT sonarsource DOT com\r
-#\r
-# Sonar is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 3 of the License, or (at your option) any later version.\r
-#\r
-# Sonar is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with Sonar; if not, write to the Free Software\r
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
-#\r
-\r
-require "json"\r
-\r
-class Api::SourcesController < Api::RestController\r
-\r
-  def rest_call\r
-    resource_id=params[:resource]\r
-    if resource_id\r
-      @resource=Project.by_key(resource_id)\r
-      if @resource.nil?\r
-        rest_status_ko("Resource [#{resource_id}] not found", 404)\r
-        return\r
-      end\r
-    end\r
-    return access_denied unless has_role?(:codeviewer, @resource)\r
-\r
-    source = @resource.last_snapshot.source\r
-    if !source\r
-      rest_status_ko("Resource [#{@resource.id}] has no sources", 404)\r
-    else\r
-      #optimization\r
-      #source.snapshot.project=@resource\r
-      rest_render({:source => source, :params => params})\r
-    end\r
-  end\r
-\r
-  def rest_to_json(objects)\r
-    source = objects[:source]\r
-    params = objects[:params]\r
-    JSON([source.to_hash_json(params)])\r
-  end\r
-\r
-  def rest_to_xml(objects)\r
-    source = objects[:source]\r
-    params = objects[:params]\r
-    xml = Builder::XmlMarkup.new(:indent => 0)\r
-    xml.instruct!\r
-    source.to_xml(xml, params)\r
-  end\r
-\r
-  def rest_to_text(objects)\r
-    source = objects[:source]\r
-    params = objects[:params]\r
-    source.to_txt(params)\r
-  end\r
-\r
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+#
+
+require "json"
+
+class Api::SourcesController < Api::RestController
+
+  def rest_call
+    resource_id=params[:resource]
+    if resource_id
+      @resource=Project.by_key(resource_id)
+      if @resource.nil?
+        rest_status_ko("Resource [#{resource_id}] not found", 404)
+        return
+      end
+    end
+    return access_denied unless has_role?(:codeviewer, @resource)
+
+    source = @resource.last_snapshot.source
+    if !source
+      rest_status_ko("Resource [#{@resource.id}] has no sources", 404)
+    else
+      #optimization
+      #source.snapshot.project=@resource
+      rest_render({:source => source, :params => params})
+    end
+  end
+
+  def rest_to_json(objects)
+    source = objects[:source]
+    params = objects[:params]
+    JSON([source.to_hash_json(params)])
+  end
+
+  def rest_to_xml(objects)
+    source = objects[:source]
+    params = objects[:params]
+    xml = Builder::XmlMarkup.new(:indent => 0)
+    xml.instruct!
+    source.to_xml(xml, params)
+  end
+
+  def rest_to_text(objects)
+    source = objects[:source]
+    params = objects[:params]
+    source.to_txt(params)
+  end
+
 end
\ No newline at end of file
index d795f6bfddd575f9dc6e5332cdaf5d23ac55606e..e0e710a3b742be602379f441fba84fe79baff494 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 03f9e53daa7803c78f61c535d451bb126eab2f5f..329d681338ca77e57b3922d218f6078c001e3955 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index c07628d67c8e81c8e4f106f1f87258e132f91887..e90f6cc9c20cbe013e1bc41a8b3c9f99c5a56167 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index e8b62eafa901d504ae74d925f26e023f67433c62..d114af18ba47572c5390e13854ff129380c67c33 100644 (file)
-#\r
-# Sonar, entreprise quality control tool.\r
-# Copyright (C) 2009 SonarSource SA\r
-# mailto:contact AT sonarsource DOT com\r
-#\r
-# Sonar is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 3 of the License, or (at your option) any later version.\r
-#\r
-# Sonar is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with Sonar; if not, write to the Free Software\r
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
-#\r
-\r
-require "json"\r
-\r
-class Api::ViolationsController < Api::ResourceRestController\r
-\r
-  def rest_call\r
-    snapshot = @resource.last_snapshot\r
-    \r
-    conditions=[]\r
-    values={}\r
-    if params['scopes']\r
-      conditions << 'snapshots.scope in (:scopes)'\r
-      values[:scopes]=params['scopes'].split(',')\r
-    end\r
-    if params['qualifiers']\r
-      conditions << 'snapshots.qualifier in (:qualifiers)'\r
-      values[:qualifiers]=params['qualifiers'].split(',')\r
-    end\r
-\r
-    depth=(params['depth'] ? params['depth'].to_i : 0)\r
-    if depth==0\r
-      conditions << 'snapshots.id=:sid'\r
-      values[:sid]=snapshot.id\r
-      \r
-    elsif depth>0\r
-      # all the resource tree\r
-      conditions << 'snapshots.root_snapshot_id=:root_sid'\r
-      values[:root_sid] = (snapshot.root_snapshot_id || snapshot.id)\r
-\r
-      conditions << 'snapshots.path LIKE :path'\r
-      values[:path]="#{snapshot.path}#{snapshot.id}.%"\r
-\r
-      conditions << 'snapshots.depth=:depth'\r
-      values[:depth] = snapshot.depth + depth\r
-\r
-    else\r
-      # negative : all the resource tree\r
-      conditions << '(snapshots.id=:sid OR (snapshots.root_snapshot_id=:root_sid AND snapshots.path LIKE :path))'\r
-      values[:sid] = snapshot.id\r
-      values[:root_sid] = (snapshot.root_snapshot_id || snapshot.id)\r
-      values[:path]="#{snapshot.path}#{snapshot.id}.%"\r
-    end\r
-    \r
-    if params[:rules]\r
-      rule_ids=params[:rules].split(',').map do |key_or_id|\r
-        Rule.to_i(key_or_id)\r
-      end.compact\r
-      conditions << 'rule_id IN (:rule_ids)'\r
-      values[:rule_ids] = rule_ids\r
-    end\r
-    if params[:priorities]\r
-      conditions << 'rule_failures.failure_level IN (:priorities)'\r
-      values[:priorities]=params[:priorities].split(',').map do |p|\r
-        Sonar::RulePriority.id(p)\r
-      end.compact\r
-    end\r
-\r
-    limit = (params[:limit] ? [params[:limit].to_i,5000].min : 5000) \r
-    violations = RuleFailure.find(:all,\r
-      :conditions => [ conditions.join(' AND '), values],\r
-      :include => [:snapshot, {:snapshot => :project}, :rule],\r
-      :order => 'rule_failures.failure_level DESC',\r
-      :limit => limit)\r
-    rest_render(violations)\r
-  end\r
-\r
-  def rest_to_json(rule_failures)\r
-    JSON(rule_failures.collect{|rule_failure| rule_failure.to_hash_json})\r
-  end\r
-\r
-  def rest_to_xml(rule_failures)\r
-    xml = Builder::XmlMarkup.new(:indent => 0)\r
-    xml.instruct!\r
-    xml.violations do\r
-      rule_failures.each do |rule_failure|\r
-        rule_failure.to_xml(xml)\r
-      end\r
-    end\r
-  end\r
-\r
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+#
+
+require "json"
+
+class Api::ViolationsController < Api::ResourceRestController
+
+  def rest_call
+    snapshot = @resource.last_snapshot
+    
+    conditions=[]
+    values={}
+    if params['scopes']
+      conditions << 'snapshots.scope in (:scopes)'
+      values[:scopes]=params['scopes'].split(',')
+    end
+    if params['qualifiers']
+      conditions << 'snapshots.qualifier in (:qualifiers)'
+      values[:qualifiers]=params['qualifiers'].split(',')
+    end
+
+    depth=(params['depth'] ? params['depth'].to_i : 0)
+    if depth==0
+      conditions << 'snapshots.id=:sid'
+      values[:sid]=snapshot.id
+      
+    elsif depth>0
+      # all the resource tree
+      conditions << 'snapshots.root_snapshot_id=:root_sid'
+      values[:root_sid] = (snapshot.root_snapshot_id || snapshot.id)
+
+      conditions << 'snapshots.path LIKE :path'
+      values[:path]="#{snapshot.path}#{snapshot.id}.%"
+
+      conditions << 'snapshots.depth=:depth'
+      values[:depth] = snapshot.depth + depth
+
+    else
+      # negative : all the resource tree
+      conditions << '(snapshots.id=:sid OR (snapshots.root_snapshot_id=:root_sid AND snapshots.path LIKE :path))'
+      values[:sid] = snapshot.id
+      values[:root_sid] = (snapshot.root_snapshot_id || snapshot.id)
+      values[:path]="#{snapshot.path}#{snapshot.id}.%"
+    end
+    
+    if params[:rules]
+      rule_ids=params[:rules].split(',').map do |key_or_id|
+        Rule.to_i(key_or_id)
+      end.compact
+      conditions << 'rule_id IN (:rule_ids)'
+      values[:rule_ids] = rule_ids
+    end
+    if params[:priorities]
+      conditions << 'rule_failures.failure_level IN (:priorities)'
+      values[:priorities]=params[:priorities].split(',').map do |p|
+        Sonar::RulePriority.id(p)
+      end.compact
+    end
+
+    limit = (params[:limit] ? [params[:limit].to_i,5000].min : 5000) 
+    violations = RuleFailure.find(:all,
+      :conditions => [ conditions.join(' AND '), values],
+      :include => [:snapshot, {:snapshot => :project}, :rule],
+      :order => 'rule_failures.failure_level DESC',
+      :limit => limit)
+    rest_render(violations)
+  end
+
+  def rest_to_json(rule_failures)
+    JSON(rule_failures.collect{|rule_failure| rule_failure.to_hash_json})
+  end
+
+  def rest_to_xml(rule_failures)
+    xml = Builder::XmlMarkup.new(:indent => 0)
+    xml.instruct!
+    xml.violations do
+      rule_failures.each do |rule_failure|
+        rule_failure.to_xml(xml)
+      end
+    end
+  end
+
 end
\ No newline at end of file
index 830fbde36b6940ac8594e4a9ba4985215dc45230..cc87fe0dc8620dc470cf5ba9a6ea0e0ff726ff88 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 93a3a94adac8a880c27ba63a4576b6f072896b2d..61f6c9748c8c6a388097d5968669dd90ce496aa1 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 7724a16a5fdb45416b4306dd1aa434c653645c00..69e0795486577e9be7fc3f92bd5803f9cbe94805 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 96849e2bf03664c23100b114a4073def3da20c5a..4114927a77e081dbddb9d1f73d28cecb8804d149 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 737936ab11c2fe2c33a2eaf4719c89dcb52d03b9..f70f303af8bb47c337d70f4bd73e22059b109242 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index c56dab9ba683925ddd6504d3d53a1386db63c4e5..38afc36f524dc409f7c6208a952bccfb6e7faa63 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 6379054c6b8202a591e51855cfb95339f82ee488..86dcb004482e032f46ffe28e14847142c145738d 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 4fcc2dbf6211ae8964c6eaf44f502230d441f7ef..7eb59a26328fe7b674375b6183c9244981dc6d83 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 7f1e27281b64d9afeff6851abffdd31fca2dfb7c..5462e26496028a973b086bdece5016333c76b2f8 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 82d3cf4a8f907f891a744eb025b2a83653b03d1c..31a1eb4175c6d6f3337ef09ec09c6b2e6deb5d46 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 4c232f9bc4968967ecf85b696424da85e2b2fa60..d4f030e2651ba0dbcda3a716ebb09fb695ae03f6 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 7f67c4035d4d6d1af3052a55061e046a7e4499ea..e96f30a6db884b854287eedafb2795d3996ca573 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 1387add3e79a0fa9305c7e4f5095aade5ce7372e..0b1110c04488001119d7f598fc94e2c681589533 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 30cc0c010388f6daa1ff6de691f6d5b1a170534f..0522b63a71823c8b0b702d063972391bfaee945e 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 6bf27fa6d26b102ce3bd96ea1d7bf9b7bb33ef21..f2efd7b09f1c0482a0d34f61b91b247b00071f6a 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 29af2b1c3a920766043f832de852723383dc0869..9d89aa58a7ba716537be3e2794ec39208b003b97 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 11d82ad57cdcf94546656e60aa652598e97bd2b8..8869b59a5ae1f7e64bc575c3a712aa48e73025c2 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index e0dc56cd941c0fffd3e8888781865749103cd07f..d206ed13d0befb7531aba1e9e3154e2337c32a44 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 967f482213df91feb97e33c6545cf7785f234c92..f5ea76a519d5dab5b2c6ca73c9e8ce06856cc4ff 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 6225668b563cf8498d07dfdd9e07b0ab47a889b5..59ce20ce328b9536bf66e9ca29658bdb83174994 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 05aae87c7bfe994b937f58eb88abdacfe78cc2d7..83ad7be1879b3d54bd3a62b4ff4b3c05c2dce244 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 30ea3658d13cf220c0cfe8c9794c2746197343ad..9121feb7e60606b1d55099369fbf06b5095f9f14 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 1cbe2a1c06a85f5a053b9c729d6ab8e92b6e1de6..cb68a4218cbb9d81b5ff48ccca19d810cb6c5a9a 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 234cfa27c90b30fdfcc355dd094fcb42c0b79315..4ae8ae626946dc455d5162190e4dcb3eb15fec7d 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 67e94f7aba7880a22290a7b93047c3cc7816a5a2..d750096395279c5cf69c55a639629138cd5ab3d1 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index fa9563cd03aeeec20de2bc35acf954ae5b19e8fd..b420f46502ac91eeb8e90b3e3548b2712be56e97 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index e85524a7c7547afd97ad283952a3605e3e46e3bd..291a95f217b3c2f4adc192819c0c890f11b3f5e0 100644 (file)
-#\r
-# Sonar, entreprise quality control tool.\r
-# Copyright (C) 2009 SonarSource SA\r
-# mailto:contact AT sonarsource DOT com\r
-#\r
-# Sonar is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 3 of the License, or (at your option) any later version.\r
-#\r
-# Sonar is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with Sonar; if not, write to the Free Software\r
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
-#\r
-require 'cgi'\r
-\r
-class RulesConfigurationController < ApplicationController\r
-\r
-  SECTION=Navigation::SECTION_CONFIGURATION\r
-  \r
-  STATUS_ACTIVE = "ACTIVE"\r
-  STATUS_INACTIVE = "INACTIVE"\r
-  ANY_SELECTION = [["Any", '']]\r
-  RULE_PRIORITIES = Sonar::RulePriority.as_options.reverse\r
-\r
-  # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)\r
-  verify :method => :post, :only => ['activate_rule', 'update_param', 'bulk_edit', 'create', 'update', 'delete', 'revert_rule'], :redirect_to => { :action => 'index' }\r
-\r
-  before_filter :admin_required, :except => [ 'index', 'export' ]\r
-\r
-  def index\r
-    unless params[:id].blank?\r
-      if params[:id].to_i<=0\r
-        redirect_to :controller => 'profiles'\r
-        return\r
-      end\r
-      begin\r
-        @profile = Profile.find(params[:id].to_i)\r
-      rescue\r
-        redirect_to :controller => 'profiles'\r
-        return\r
-      end\r
-    else\r
-      @profile = Profile.default_profile\r
-    end\r
-    \r
-    init_params()\r
-    \r
-    @select_plugins = ANY_SELECTION + java_facade.getRuleRepositoriesByLanguage(@profile.language).collect { |repo| [repo.getName(true), repo.getKey()]}.sort\r
-    @select_priority = ANY_SELECTION + RULE_PRIORITIES\r
-    @select_status = [['Any',''], ["Active", STATUS_ACTIVE], ["Inactive", STATUS_INACTIVE]]\r
-    @select_inheritance = [['Any',''], ["Not inherited", 'NOT'], ["Inherited", 'INHERITED'], ["Overrides", 'OVERRIDES']]\r
-\r
-    @rules = Rule.search(java_facade, {\r
-        :profile => @profile, :status => @status, :priorities => @priorities, :inheritance => @inheritance,\r
-        :plugins =>  @plugins, :searchtext => @searchtext, :include_parameters => true, :language => @profile.language})\r
-\r
-    unless @searchtext.blank?\r
-      if @status==STATUS_ACTIVE\r
-        @hidden_inactives=Rule.search(java_facade, {\r
-            :profile => @profile, :status => STATUS_INACTIVE, :priorities => @priorities,\r
-            :plugins =>  @plugins, :language => @profile.language, :searchtext => @searchtext, :include_parameters => false}).size\r
-\r
-      elsif @status==STATUS_INACTIVE\r
-        @hidden_actives=Rule.search(java_facade, {\r
-            :profile => @profile, :status => STATUS_ACTIVE, :priorities => @priorities,\r
-            :plugins =>  @plugins, :language => @profile.language, :searchtext => @searchtext, :include_parameters => false}).size\r
-      end\r
-    end\r
-\r
-  end\r
-\r
-\r
-  #\r
-  #\r
-  # POST /rules_configuration/revert_rule?id=<profile id>&active_rule_id=<active rule id>\r
-  #\r
-  #\r
-  def revert_rule\r
-    id = params[:id].to_i\r
-    rule_id = params[:active_rule_id].to_i\r
-    java_facade.revertRule(id, rule_id)\r
-    redirect_to request.query_parameters.merge({:action => 'index', :id => params[:id], :commit => nil})\r
-  end\r
-\r
-\r
-  #\r
-  #\r
-  # POST /rules_configuration/activate_rule?id=<profile id>&rule_id=<rule id>&level=<priority>\r
-  #\r
-  # If the parameter "level" is blank or null, then the rule is removed from the profile.\r
-  #\r
-  #\r
-  def activate_rule\r
-    profile = Profile.find(params[:id].to_i)\r
-    if profile && !profile.provided?\r
-      rule=Rule.find(:first, :conditions => {:id => params[:rule_id].to_i, :enabled => true})\r
-      priority=params[:level]\r
-\r
-      active_rule=profile.active_by_rule_id(rule.id)\r
-      if priority.blank?\r
-        # deactivate the rule\r
-        active_rule.destroy if active_rule\r
-        active_rule=nil\r
-        java_facade.ruleDeactivated(profile.id, rule.id)\r
-      else\r
-        # activate the rule\r
-        if active_rule.nil?\r
-          active_rule = ActiveRule.new(:profile_id => profile.id, :rule => rule)\r
-          rule.parameters.select{|p| p.default_value.present?}.each do |p|\r
-            active_rule.active_rule_parameters.build(:rules_parameter => p, :value => p.default_value)\r
-          end\r
-        end\r
-        active_rule.failure_level=Sonar::RulePriority.id(priority)\r
-        active_rule.save!\r
-        java_facade.ruleActivatedOrChanged(profile.id, active_rule.id)\r
-      end\r
-      if active_rule\r
-        active_rule.reload\r
-      end\r
-\r
-      is_admin=true # security has already been checked by controller filters\r
-      render :update do |page|\r
-        page.replace_html("rule_#{rule.id}", :partial => 'rule', :object => rule, :locals => {:profile => profile, :active_rule => active_rule, :is_admin => is_admin})\r
-        page.assign('localModifications', true)\r
-      end\r
-    end\r
-  end\r
-\r
-\r
-  #\r
-  #\r
-  # GET /rules_configuration/new/<profile id>?rule_id=<rule id>\r
-  #\r
-  #\r
-  def new\r
-    # form to duplicate a rule\r
-    @profile = Profile.find(params[:id].to_i)\r
-    @rule = Rule.find(params[:rule_id])\r
-  end\r
-\r
-  #\r
-  #\r
-  # POST /rules_configuration/create/<profile id>?rule_id=<rule id>&rule[name]=<new name>&...\r
-  #\r
-  #\r
-  def create\r
-    template=Rule.find(params[:rule_id])\r
-    rule=Rule.create(params[:rule].merge(\r
-      {\r
-      :priority => Sonar::RulePriority.id(params[:rule][:priority]),\r
-      :parent_id => template.id,\r
-      :plugin_name => template.plugin_name,\r
-      :cardinality => 'SINGLE',\r
-      :plugin_rule_key => "#{template.plugin_rule_key}_#{Time.now.to_i}",\r
-      :plugin_config_key => template.plugin_config_key,\r
-      :enabled => true}))\r
-\r
-    template.parameters.each do |template_parameter|\r
-      rule.rules_parameters.build(:name => template_parameter.name, :param_type => template_parameter.param_type, :description => template_parameter.description,\r
-         :default_value => params[:rule_param][template_parameter.name])\r
-    end\r
-\r
-    if rule.save\r
-      redirect_to :action => 'index', :id => params[:id], :searchtext => rule.name, :rule_status => 'INACTIVE', "plugins[]" => rule.plugin_name\r
-      \r
-    else\r
-      flash[:error]="Rule is not valid: <br/>#{rule.errors.full_messages.join('<br/>')}"\r
-      redirect_to :action => 'new', :id => params[:id], :rule_id => params[:rule_id]\r
-    end   \r
-  end\r
-\r
-\r
-  # deprecated since 2.3\r
-  def export\r
-    redirect_to request.query_parameters.merge({:controller => 'profiles', :action => 'export'}) \r
-  end\r
-\r
-  #\r
-  #\r
-  # GET /rules_configuration/new/<profile id>?rule_id=<rule id>\r
-  #\r
-  #\r
-  def edit\r
-    # form to edit a rule\r
-    @profile = Profile.find(params[:id])\r
-    @rule = Rule.find(params[:rule_id])\r
-    if !@rule.editable?\r
-      redirect_to :action => 'index', :id => params[:id]\r
-    end\r
-  end\r
-\r
-  #\r
-  #\r
-  # POST /rules_configuration/update/<profile id>?rule_id=<rule id>&rule[name]=<new name>&...\r
-  #\r
-  #\r
-  def update\r
-    rule=Rule.find(params[:rule_id])\r
-    if rule.editable?\r
-      rule.name=params[:rule][:name]\r
-      rule.description=params[:rule][:description]\r
-      rule.priority=Sonar::RulePriority.id(params[:rule][:priority])\r
-      rule.parameters.each do |parameter|\r
-        parameter.default_value=params[:rule_param][parameter.name]\r
-        parameter.save\r
-      end\r
-      if rule.save\r
-        redirect_to :action => 'index', :id => params[:id], :searchtext => rule.name, :rule_status => '', "plugins[]" => rule.plugin_name\r
-      else\r
-        flash[:error]="Rule is not valid: <br/>#{rule.errors.full_messages.join('<br/>')}"\r
-        redirect_to :action => 'new', :id => params[:id], :rule_id => params[:rule_id]\r
-      end\r
-    else\r
-      flash[:error]='Unknown rule'\r
-      redirect_to :action => 'index', :id => params[:id]\r
-    end\r
-  end\r
-\r
-\r
-  #\r
-  #\r
-  # POST /rules_configuration/delete/<profile id>?rule_id=<rule id>\r
-  #\r
-  #\r
-  def delete\r
-    rule=Rule.find(params[:rule_id])\r
-    if rule.editable?\r
-      rule.enabled=false\r
-      rule.save\r
-\r
-      # it's mandatory to execute 'destroy_all' but not 'delete_all' because active_rule_parameters must\r
-      # also be destroyed in cascade.\r
-      ActiveRule.destroy_all("rule_id=#{rule.id}")\r
-      flash[:notice]='Rule deleted'\r
-    else\r
-      flash[:error]='Unknown rule'\r
-    end\r
-    redirect_to :action => 'index', :id => params[:id]\r
-  end\r
-\r
-  #\r
-  #\r
-  # POST /rules_configuration/bulk_edit?id=<profile id>&bulk_rule_ids=<list of rule ids>&bulk_action=<action>\r
-  #\r
-  # Values of the parameter 'bulk_action' :\r
-  #   - 'activate' : activate all the selected rules with their default priority\r
-  #   - 'deactivate' : deactivate all the selected rules\r
-  #\r
-  #\r
-  def bulk_edit\r
-    profile = Profile.find(params[:id].to_i)\r
-    rule_ids = params[:bulk_rule_ids].split(',').map{|id| id.to_i}\r
-    status=params[:rule_status]\r
-    \r
-    case params[:bulk_action]\r
-    when 'activate'\r
-      count=activate_rules(profile, rule_ids)\r
-      flash[:notice]="#{count} rules have been activated."\r
-      status=STATUS_ACTIVE if status==STATUS_INACTIVE\r
-\r
-    when 'deactivate'\r
-      count=deactivate_rules(profile, rule_ids)\r
-      flash[:notice]="#{count} rules have been deactivated."\r
-      status=STATUS_INACTIVE if status==STATUS_ACTIVE\r
-    end\r
-\r
-    url_parameters=request.query_parameters.merge({:action => 'index', :bulk_action => nil, :bulk_rule_ids => nil, :id => profile.id, :rule_status => status})\r
-    redirect_to url_parameters\r
-  end\r
-\r
-\r
-\r
-  def update_param\r
-    is_admin=true # security has already been checked by controller filters\r
-    profile = Profile.find(params[:profile_id].to_i)\r
-    rule_param = RulesParameter.find(params[:param_id].to_i)\r
-    active_rule = ActiveRule.find(params[:active_rule_id].to_i)\r
-    active_param = ActiveRuleParameter.find(params[:id].to_i) if params[:id].to_i > 0\r
-    value = params[:value]\r
-    if !profile.provided?\r
-      if value != ""\r
-        active_param = ActiveRuleParameter.new(:rules_parameter => rule_param, :active_rule => active_rule ) if active_param.nil?\r
-        active_param.value = value\r
-        active_param.save\r
-        active_param.valid?\r
-        active_param.reload\r
-      elsif !active_param.nil?\r
-        active_param.destroy\r
-        active_param = nil\r
-      end\r
-      java_facade.ruleActivatedOrChanged(profile.id, active_rule.id)\r
-    end\r
-    render :partial => 'rule_param', :object => nil,\r
-      :locals => {:parameter => rule_param, :active_parameter => active_param, :profile => profile, :active_rule => active_rule, :is_admin => is_admin }\r
-  end\r
-\r
-  private\r
-\r
-  # return the number of newly activated rules\r
-  def activate_rules(profile, rule_ids)\r
-    count=0\r
-    rule_ids_to_activate=(rule_ids - profile.active_rules.map{|ar| ar.rule_id})\r
-    unless rule_ids_to_activate.empty?\r
-      rules_to_activate=Rule.find(:all, :conditions => {:enabled=>true, :id => rule_ids_to_activate})\r
-      count = rules_to_activate.size\r
-      rules_to_activate.each do |rule|\r
-        active_rule = profile.active_rules.create(:rule => rule, :failure_level => rule.priority)\r
-        java_facade.ruleActivatedOrChanged(profile.id, active_rule.id)\r
-      end\r
-    end\r
-    count\r
-  end\r
-\r
-  def deactivate_rules(profile, rule_ids)\r
-    count=0\r
-    profile.active_rules.each do |ar|\r
-      if rule_ids.include?(ar.rule_id) && !ar.inheritance.present?\r
-        ar.destroy\r
-        java_facade.ruleDeactivated(profile.id, ar.rule_id)\r
-        count+=1\r
-      end\r
-    end\r
-    count\r
-  end\r
-\r
-  def init_params\r
-    @id = params[:id]\r
-    @priorities = filter_any(params[:priorities]) || ['']\r
-    @plugins=filter_any(params[:plugins]) || ['']\r
-    @status=params[:rule_status] || STATUS_ACTIVE\r
-    @inheritance=params[:inheritance] || ''\r
-    @searchtext=params[:searchtext]\r
-  end\r
-\r
-  def filter_any(array)\r
-    if array && array.size>1 && array.include?('')\r
-      array=['']  #keep only 'any'\r
-    end\r
-    array\r
-  end\r
-\r
-end\r
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+#
+require 'cgi'
+
+class RulesConfigurationController < ApplicationController
+
+  SECTION=Navigation::SECTION_CONFIGURATION
+  
+  STATUS_ACTIVE = "ACTIVE"
+  STATUS_INACTIVE = "INACTIVE"
+  ANY_SELECTION = [["Any", '']]
+  RULE_PRIORITIES = Sonar::RulePriority.as_options.reverse
+
+  # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
+  verify :method => :post, :only => ['activate_rule', 'update_param', 'bulk_edit', 'create', 'update', 'delete', 'revert_rule'], :redirect_to => { :action => 'index' }
+
+  before_filter :admin_required, :except => [ 'index', 'export' ]
+
+  def index
+    unless params[:id].blank?
+      if params[:id].to_i<=0
+        redirect_to :controller => 'profiles'
+        return
+      end
+      begin
+        @profile = Profile.find(params[:id].to_i)
+      rescue
+        redirect_to :controller => 'profiles'
+        return
+      end
+    else
+      @profile = Profile.default_profile
+    end
+    
+    init_params()
+    
+    @select_plugins = ANY_SELECTION + java_facade.getRuleRepositoriesByLanguage(@profile.language).collect { |repo| [repo.getName(true), repo.getKey()]}.sort
+    @select_priority = ANY_SELECTION + RULE_PRIORITIES
+    @select_status = [['Any',''], ["Active", STATUS_ACTIVE], ["Inactive", STATUS_INACTIVE]]
+    @select_inheritance = [['Any',''], ["Not inherited", 'NOT'], ["Inherited", 'INHERITED'], ["Overrides", 'OVERRIDES']]
+
+    @rules = Rule.search(java_facade, {
+        :profile => @profile, :status => @status, :priorities => @priorities, :inheritance => @inheritance,
+        :plugins =>  @plugins, :searchtext => @searchtext, :include_parameters => true, :language => @profile.language})
+
+    unless @searchtext.blank?
+      if @status==STATUS_ACTIVE
+        @hidden_inactives=Rule.search(java_facade, {
+            :profile => @profile, :status => STATUS_INACTIVE, :priorities => @priorities,
+            :plugins =>  @plugins, :language => @profile.language, :searchtext => @searchtext, :include_parameters => false}).size
+
+      elsif @status==STATUS_INACTIVE
+        @hidden_actives=Rule.search(java_facade, {
+            :profile => @profile, :status => STATUS_ACTIVE, :priorities => @priorities,
+            :plugins =>  @plugins, :language => @profile.language, :searchtext => @searchtext, :include_parameters => false}).size
+      end
+    end
+
+  end
+
+
+  #
+  #
+  # POST /rules_configuration/revert_rule?id=<profile id>&active_rule_id=<active rule id>
+  #
+  #
+  def revert_rule
+    id = params[:id].to_i
+    rule_id = params[:active_rule_id].to_i
+    java_facade.revertRule(id, rule_id)
+    redirect_to request.query_parameters.merge({:action => 'index', :id => params[:id], :commit => nil})
+  end
+
+
+  #
+  #
+  # POST /rules_configuration/activate_rule?id=<profile id>&rule_id=<rule id>&level=<priority>
+  #
+  # If the parameter "level" is blank or null, then the rule is removed from the profile.
+  #
+  #
+  def activate_rule
+    profile = Profile.find(params[:id].to_i)
+    if profile && !profile.provided?
+      rule=Rule.find(:first, :conditions => {:id => params[:rule_id].to_i, :enabled => true})
+      priority=params[:level]
+
+      active_rule=profile.active_by_rule_id(rule.id)
+      if priority.blank?
+        # deactivate the rule
+        active_rule.destroy if active_rule
+        active_rule=nil
+        java_facade.ruleDeactivated(profile.id, rule.id)
+      else
+        # activate the rule
+        if active_rule.nil?
+          active_rule = ActiveRule.new(:profile_id => profile.id, :rule => rule)
+          rule.parameters.select{|p| p.default_value.present?}.each do |p|
+            active_rule.active_rule_parameters.build(:rules_parameter => p, :value => p.default_value)
+          end
+        end
+        active_rule.failure_level=Sonar::RulePriority.id(priority)
+        active_rule.save!
+        java_facade.ruleActivatedOrChanged(profile.id, active_rule.id)
+      end
+      if active_rule
+        active_rule.reload
+      end
+
+      is_admin=true # security has already been checked by controller filters
+      render :update do |page|
+        page.replace_html("rule_#{rule.id}", :partial => 'rule', :object => rule, :locals => {:profile => profile, :active_rule => active_rule, :is_admin => is_admin})
+        page.assign('localModifications', true)
+      end
+    end
+  end
+
+
+  #
+  #
+  # GET /rules_configuration/new/<profile id>?rule_id=<rule id>
+  #
+  #
+  def new
+    # form to duplicate a rule
+    @profile = Profile.find(params[:id].to_i)
+    @rule = Rule.find(params[:rule_id])
+  end
+
+  #
+  #
+  # POST /rules_configuration/create/<profile id>?rule_id=<rule id>&rule[name]=<new name>&...
+  #
+  #
+  def create
+    template=Rule.find(params[:rule_id])
+    rule=Rule.create(params[:rule].merge(
+      {
+      :priority => Sonar::RulePriority.id(params[:rule][:priority]),
+      :parent_id => template.id,
+      :plugin_name => template.plugin_name,
+      :cardinality => 'SINGLE',
+      :plugin_rule_key => "#{template.plugin_rule_key}_#{Time.now.to_i}",
+      :plugin_config_key => template.plugin_config_key,
+      :enabled => true}))
+
+    template.parameters.each do |template_parameter|
+      rule.rules_parameters.build(:name => template_parameter.name, :param_type => template_parameter.param_type, :description => template_parameter.description,
+         :default_value => params[:rule_param][template_parameter.name])
+    end
+
+    if rule.save
+      redirect_to :action => 'index', :id => params[:id], :searchtext => rule.name, :rule_status => 'INACTIVE', "plugins[]" => rule.plugin_name
+      
+    else
+      flash[:error]="Rule is not valid: <br/>#{rule.errors.full_messages.join('<br/>')}"
+      redirect_to :action => 'new', :id => params[:id], :rule_id => params[:rule_id]
+    end   
+  end
+
+
+  # deprecated since 2.3
+  def export
+    redirect_to request.query_parameters.merge({:controller => 'profiles', :action => 'export'}) 
+  end
+
+  #
+  #
+  # GET /rules_configuration/new/<profile id>?rule_id=<rule id>
+  #
+  #
+  def edit
+    # form to edit a rule
+    @profile = Profile.find(params[:id])
+    @rule = Rule.find(params[:rule_id])
+    if !@rule.editable?
+      redirect_to :action => 'index', :id => params[:id]
+    end
+  end
+
+  #
+  #
+  # POST /rules_configuration/update/<profile id>?rule_id=<rule id>&rule[name]=<new name>&...
+  #
+  #
+  def update
+    rule=Rule.find(params[:rule_id])
+    if rule.editable?
+      rule.name=params[:rule][:name]
+      rule.description=params[:rule][:description]
+      rule.priority=Sonar::RulePriority.id(params[:rule][:priority])
+      rule.parameters.each do |parameter|
+        parameter.default_value=params[:rule_param][parameter.name]
+        parameter.save
+      end
+      if rule.save
+        redirect_to :action => 'index', :id => params[:id], :searchtext => rule.name, :rule_status => '', "plugins[]" => rule.plugin_name
+      else
+        flash[:error]="Rule is not valid: <br/>#{rule.errors.full_messages.join('<br/>')}"
+        redirect_to :action => 'new', :id => params[:id], :rule_id => params[:rule_id]
+      end
+    else
+      flash[:error]='Unknown rule'
+      redirect_to :action => 'index', :id => params[:id]
+    end
+  end
+
+
+  #
+  #
+  # POST /rules_configuration/delete/<profile id>?rule_id=<rule id>
+  #
+  #
+  def delete
+    rule=Rule.find(params[:rule_id])
+    if rule.editable?
+      rule.enabled=false
+      rule.save
+
+      # it's mandatory to execute 'destroy_all' but not 'delete_all' because active_rule_parameters must
+      # also be destroyed in cascade.
+      ActiveRule.destroy_all("rule_id=#{rule.id}")
+      flash[:notice]='Rule deleted'
+    else
+      flash[:error]='Unknown rule'
+    end
+    redirect_to :action => 'index', :id => params[:id]
+  end
+
+  #
+  #
+  # POST /rules_configuration/bulk_edit?id=<profile id>&bulk_rule_ids=<list of rule ids>&bulk_action=<action>
+  #
+  # Values of the parameter 'bulk_action' :
+  #   - 'activate' : activate all the selected rules with their default priority
+  #   - 'deactivate' : deactivate all the selected rules
+  #
+  #
+  def bulk_edit
+    profile = Profile.find(params[:id].to_i)
+    rule_ids = params[:bulk_rule_ids].split(',').map{|id| id.to_i}
+    status=params[:rule_status]
+    
+    case params[:bulk_action]
+    when 'activate'
+      count=activate_rules(profile, rule_ids)
+      flash[:notice]="#{count} rules have been activated."
+      status=STATUS_ACTIVE if status==STATUS_INACTIVE
+
+    when 'deactivate'
+      count=deactivate_rules(profile, rule_ids)
+      flash[:notice]="#{count} rules have been deactivated."
+      status=STATUS_INACTIVE if status==STATUS_ACTIVE
+    end
+
+    url_parameters=request.query_parameters.merge({:action => 'index', :bulk_action => nil, :bulk_rule_ids => nil, :id => profile.id, :rule_status => status})
+    redirect_to url_parameters
+  end
+
+
+
+  def update_param
+    is_admin=true # security has already been checked by controller filters
+    profile = Profile.find(params[:profile_id].to_i)
+    rule_param = RulesParameter.find(params[:param_id].to_i)
+    active_rule = ActiveRule.find(params[:active_rule_id].to_i)
+    active_param = ActiveRuleParameter.find(params[:id].to_i) if params[:id].to_i > 0
+    value = params[:value]
+    if !profile.provided?
+      if value != ""
+        active_param = ActiveRuleParameter.new(:rules_parameter => rule_param, :active_rule => active_rule ) if active_param.nil?
+        active_param.value = value
+        active_param.save
+        active_param.valid?
+        active_param.reload
+      elsif !active_param.nil?
+        active_param.destroy
+        active_param = nil
+      end
+      java_facade.ruleActivatedOrChanged(profile.id, active_rule.id)
+    end
+    render :partial => 'rule_param', :object => nil,
+      :locals => {:parameter => rule_param, :active_parameter => active_param, :profile => profile, :active_rule => active_rule, :is_admin => is_admin }
+  end
+
+  private
+
+  # return the number of newly activated rules
+  def activate_rules(profile, rule_ids)
+    count=0
+    rule_ids_to_activate=(rule_ids - profile.active_rules.map{|ar| ar.rule_id})
+    unless rule_ids_to_activate.empty?
+      rules_to_activate=Rule.find(:all, :conditions => {:enabled=>true, :id => rule_ids_to_activate})
+      count = rules_to_activate.size
+      rules_to_activate.each do |rule|
+        active_rule = profile.active_rules.create(:rule => rule, :failure_level => rule.priority)
+        java_facade.ruleActivatedOrChanged(profile.id, active_rule.id)
+      end
+    end
+    count
+  end
+
+  def deactivate_rules(profile, rule_ids)
+    count=0
+    profile.active_rules.each do |ar|
+      if rule_ids.include?(ar.rule_id) && !ar.inheritance.present?
+        ar.destroy
+        java_facade.ruleDeactivated(profile.id, ar.rule_id)
+        count+=1
+      end
+    end
+    count
+  end
+
+  def init_params
+    @id = params[:id]
+    @priorities = filter_any(params[:priorities]) || ['']
+    @plugins=filter_any(params[:plugins]) || ['']
+    @status=params[:rule_status] || STATUS_ACTIVE
+    @inheritance=params[:inheritance] || ''
+    @searchtext=params[:searchtext]
+  end
+
+  def filter_any(array)
+    if array && array.size>1 && array.include?('')
+      array=['']  #keep only 'any'
+    end
+    array
+  end
+
+end
index bdd770fa23c8a2fc336940f6515627464bd9ea58..0604f018c45e53241570e08ce25ba15ec7de85cc 100644 (file)
@@ -1,35 +1,35 @@
-#\r
-# Sonar, entreprise quality control tool.\r
-# Copyright (C) 2009 SonarSource SA\r
-# mailto:contact AT sonarsource DOT com\r
-#\r
-# Sonar is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 3 of the License, or (at your option) any later version.\r
-#\r
-# Sonar is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with Sonar; if not, write to the Free Software\r
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
-#\r
-class RulesController < ApplicationController\r
-\r
-  SECTION=Navigation::SECTION_CONFIGURATION\r
-  \r
-  def show\r
-    key=params[:id]\r
-    if key.to_i==0\r
-      parts=key.split(':')\r
-      @rule=Rule.find(:first, :conditions => ['plugin_name=? and plugin_rule_key=?', parts[0], parts[1]])\r
-    else\r
-      @rule=Rule.find(key)\r
-    end\r
-    @page_title=@rule.name\r
-  end\r
-\r
-end\r
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+#
+class RulesController < ApplicationController
+
+  SECTION=Navigation::SECTION_CONFIGURATION
+  
+  def show
+    key=params[:id]
+    if key.to_i==0
+      parts=key.split(':')
+      @rule=Rule.find(:first, :conditions => ['plugin_name=? and plugin_rule_key=?', parts[0], parts[1]])
+    else
+      @rule=Rule.find(key)
+    end
+    @page_title=@rule.name
+  end
+
+end
index 2c74f55edee841e9c7156252c68af36790e2369c..5f9b1dc9a97d267f1e5162569896762a852f97e9 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 42d98aaf49fd40dfb548334f99d891e0ee8bfdaf..e7f95603788d61a6aa3f695ea1b967b17c242c76 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index b452dd7ab57c5e0b2f6f410d63978df196167df9..e3564346ad27540831657862bf6ca66ef4570f41 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 11a13c66b362d7efa8da203acc73308a566365ec..dcbc97240873b6ea139926709844e6fffde65558 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 627fc5a88df4e199fca6c8688391c091c4dd0c8c..febcdd9127d488cfc558cd8a1539f4b05f6ff69e 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 674263c87b7834cc5377759010f4bea2f3c54d7f..6a185e26f5ea431b4c041305ba08da87706c3c05 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 560075c0a30cc3f2a3e929d15fc07a0fc5aa90f6..19ccb8ae9852b0575e3456f5c637462bbf7561df 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index e86b999221a8dae503056b173c8473398cc4d2f0..3d2cb09006ba34a9019a1f6c413530831a12d998 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index dd1f5bd385c78f8ec7b603550bbd6849d436bbdd..3a06e83d21323ed59ddc4f4ce062ca9e4a2a6d2b 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index ee665411f86fc32c955e4d23be645a83f44c1a90..fd449acf97350e22a99ce57229762af8bb0e0d35 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 5c8aca6f1ba0e970e7f77fd478506d8d4e16c4c3..237e8d26e1b47a5b0c60739f99b62c05c048af2a 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 90b920a01748b7dc0d7408e2d99ee6c479b2015a..e1a34328ffb0911d2bc9af0b3ccce99d27624abe 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 6fb2a240cb71942ea8eea76c4d2edf511fd0c998..19537519d4d3f3e97e45eaf8afe9ae8c3f1d4ba9 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 27f66bda9134c2e1b0d6870db60e51edc9c9a5d1..81f59c5ffb35c95d7043cc00dadc9178de392eda 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 1f63cb06423461e3c34f97b93a55950dde907fa9..1f5fdab3e337bb35cfd88dbe97912a78cff34edc 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 079ee80723ae85b7ce4a1a1f6f7339765bd27838..b449c39d570f17812453ae3f3a39925288661bbb 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index ad7044b24a8843b3b76022d443146d32bce90e86..d9e3d3a5db59b5fe13810050e155c2839f1c764b 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 3cce0220a0b6a311a8a24c9f162e1ad29dde61ad..a1cc3ff7f7e009222c589091019a8dbaff9c1fc8 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 8706b3504bc7167b75f799b962227d72a1c81f44..c8b9cb1b4731f0c477050c6ccdca5287bfcb7809 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 75f6d4934caa78aa21524e90fa179cd02c9b0ece..e25a5d10066daf066703f909fdf17f53406c85dd 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 086ca699915cdd7ad72d8895c324f141dd325474..fff4c5c252f8dc342780d472c2cc3f846e364906 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 7b993d7913cf9b276d07b75450d7a6e6143c9c3b..92beb814a5658986e56f33f6d859ca1efc0c0782 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 856025ab7a7f8fe713e8640208b1863339507883..9a765c2857961ac33c38334917587adaf0becfbb 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 5c2753e4332d2a959ed5f1c5b4974622bcb35e44..c9c91ccf68df6d01c87cfa1349137f8dc4a611cb 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index bded9a5f141180bb834038a2966577e4b27d06f1..a44fe8abf2935d0172030644448451cf2d55b88b 100644 (file)
@@ -1,42 +1,42 @@
-#\r
-# Sonar, entreprise quality control tool.\r
-# Copyright (C) 2009 SonarSource SA\r
-# mailto:contact AT sonarsource DOT com\r
-#\r
-# Sonar is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 3 of the License, or (at your option) any later version.\r
-#\r
-# Sonar is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with Sonar; if not, write to the Free Software\r
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
-#\r
-module WidgetPropertiesHelper\r
-  \r
-   \r
-  def property_value_field(definition, value)\r
-    val=value || definition.defaultValue()\r
-    if definition.type.name()==WidgetProperty::TYPE_INTEGER\r
-      text_field_tag definition.key(), val, :size => 10\r
-      \r
-    elsif definition.type.name()==WidgetProperty::TYPE_FLOAT\r
-      text_field_tag definition.key(), val, :size => 10\r
-\r
-    elsif definition.type.name()==WidgetProperty::TYPE_BOOLEAN\r
-      check_box_tag definition.key(), "true", val=='true'\r
-\r
-    elsif definition.type.name()==WidgetProperty::TYPE_STRING\r
-      text_field_tag definition.key(), val, :size => 10\r
-\r
-    else\r
-      hidden_field_tag definition.key()\r
-    end\r
-  end\r
-    \r
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+#
+module WidgetPropertiesHelper
+  
+   
+  def property_value_field(definition, value)
+    val=value || definition.defaultValue()
+    if definition.type.name()==WidgetProperty::TYPE_INTEGER
+      text_field_tag definition.key(), val, :size => 10
+      
+    elsif definition.type.name()==WidgetProperty::TYPE_FLOAT
+      text_field_tag definition.key(), val, :size => 10
+
+    elsif definition.type.name()==WidgetProperty::TYPE_BOOLEAN
+      check_box_tag definition.key(), "true", val=='true'
+
+    elsif definition.type.name()==WidgetProperty::TYPE_STRING
+      text_field_tag definition.key(), val, :size => 10
+
+    else
+      hidden_field_tag definition.key()
+    end
+  end
+    
 end 
\ No newline at end of file
index 3ca3383aa8df9e98be615e651155757e50ece312..558d6cc36ce02e39d51f418aadbc2cf8c4e5b9d6 100644 (file)
@@ -1,59 +1,59 @@
-#\r
-# Sonar, entreprise quality control tool.\r
-# Copyright (C) 2009 SonarSource SA\r
-# mailto:contact AT sonarsource DOT com\r
-#\r
-# Sonar is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 3 of the License, or (at your option) any later version.\r
-#\r
-# Sonar is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with Sonar; if not, write to the Free Software\r
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
-#\r
-class ActiveDashboard < ActiveRecord::Base\r
-\r
-  belongs_to :user\r
-  belongs_to :dashboard\r
-\r
-  def name\r
-    dashboard.name\r
-  end\r
-\r
-  def order_index\r
-    read_attribute(:order_index) || 1\r
-  end\r
-\r
-  def shared?\r
-    dashboard.shared\r
-  end\r
-\r
-  def owner?(user)\r
-    dashboard.owner?(user)\r
-  end\r
-\r
-  def follower?(user)\r
-    self.user.nil? || self.user_id==user.id\r
-  end\r
-\r
-  def self.user_dashboards(user)\r
-    result=nil\r
-    if user && user.id\r
-      result=find(:all, :include => 'dashboard', :conditions => ['user_id=?', user.id], :order => 'order_index')\r
-    end\r
-    if result.nil? || result.empty?\r
-      result=default_dashboards\r
-    end\r
-    result\r
-  end\r
-\r
-  def self.default_dashboards\r
-    find(:all, :include => 'dashboard', :conditions => ['user_id IS NULL'], :order => 'order_index')\r
-  end\r
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+#
+class ActiveDashboard < ActiveRecord::Base
+
+  belongs_to :user
+  belongs_to :dashboard
+
+  def name
+    dashboard.name
+  end
+
+  def order_index
+    read_attribute(:order_index) || 1
+  end
+
+  def shared?
+    dashboard.shared
+  end
+
+  def owner?(user)
+    dashboard.owner?(user)
+  end
+
+  def follower?(user)
+    self.user.nil? || self.user_id==user.id
+  end
+
+  def self.user_dashboards(user)
+    result=nil
+    if user && user.id
+      result=find(:all, :include => 'dashboard', :conditions => ['user_id=?', user.id], :order => 'order_index')
+    end
+    if result.nil? || result.empty?
+      result=default_dashboards
+    end
+    result
+  end
+
+  def self.default_dashboards
+    find(:all, :include => 'dashboard', :conditions => ['user_id IS NULL'], :order => 'order_index')
+  end
 end
\ No newline at end of file
index f35a4d65ce6b311f2fd62be3aadd6b19e1563df9..6b0d07bed9a1dbd7dfa5db766fdb2da66c930b97 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index f06282f2569f9575ee40c8edc2aad1cd6fd04a4b..d02a4462c537fb520090e750fbb3a394af9b1a96 100644 (file)
-#\r
-# Sonar, entreprise quality control tool.\r
-# Copyright (C) 2009 SonarSource SA\r
-# mailto:contact AT sonarsource DOT com\r
-#\r
-# Sonar is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 3 of the License, or (at your option) any later version.\r
-#\r
-# Sonar is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with Sonar; if not, write to the Free Software\r
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
-#\r
-class ActiveRule < ActiveRecord::Base\r
-  belongs_to :rules_profile, :class_name => 'Profile', :foreign_key => 'profile_id'\r
-  belongs_to :rule\r
-  has_many :active_rule_parameters, :dependent => :destroy\r
-\r
-  def level\r
-    failure_level\r
-  end\r
-\r
-  def priority\r
-    failure_level\r
-  end\r
-\r
-  def priority_text\r
-    Sonar::RulePriority.to_s failure_level\r
-  end\r
-\r
-  def error?\r
-    Sonar::RulePriority::major?(failure_level)\r
-  end\r
-\r
-  def warning?\r
-    Sonar::RulePriority::minor?(failure_level)\r
-  end\r
-  \r
-  def info?\r
-     Sonar::RulePriority::info?(failure_level)\r
-  end\r
-  \r
-  def minor?\r
-    Sonar::RulePriority::minor?(failure_level)\r
-  end\r
-\r
-  def major?\r
-    Sonar::RulePriority::major?(failure_level)\r
-  end\r
-  \r
-  def critical?\r
-    Sonar::RulePriority::critical?(failure_level)\r
-  end\r
-  \r
-  def blocker?\r
-    Sonar::RulePriority::blocker?(failure_level)\r
-  end\r
-\r
-  def activated?\r
-    error? || warning?\r
-  end\r
-\r
-  def value(param_id)\r
-    active_rule_parameters.each do |param|\r
-      return param.value if param.rules_parameter_id == param_id\r
-    end\r
-    nil\r
-  end\r
-\r
-  def parameters\r
-    active_rule_parameters\r
-  end\r
-\r
-  def parameter(name)\r
-    result=nil\r
-    parameters.each do |param|\r
-      result=param if (param.name==name)\r
-    end\r
-    result\r
-  end\r
-\r
-  def active_param_by_param_id(param_id)\r
-    parameters.each do |param|\r
-      return param if param.rules_parameter_id==param_id\r
-    end\r
-    nil\r
-  end\r
-\r
-  def copy\r
-    new_active_rule = ActiveRule.new(:rule => rule, :failure_level => failure_level)\r
-    self.active_rule_parameters.each do |active_rule_parameter|\r
-      new_active_rule.active_rule_parameters << active_rule_parameter.copy\r
-    end     \r
-    new_active_rule \r
-  end\r
-\r
-  def inherited?\r
-    inheritance=='INHERITED'\r
-  end\r
-\r
-  def overrides?\r
-    inheritance=='OVERRIDES'\r
-  end\r
-end\r
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+#
+class ActiveRule < ActiveRecord::Base
+  belongs_to :rules_profile, :class_name => 'Profile', :foreign_key => 'profile_id'
+  belongs_to :rule
+  has_many :active_rule_parameters, :dependent => :destroy
+
+  def level
+    failure_level
+  end
+
+  def priority
+    failure_level
+  end
+
+  def priority_text
+    Sonar::RulePriority.to_s failure_level
+  end
+
+  def error?
+    Sonar::RulePriority::major?(failure_level)
+  end
+
+  def warning?
+    Sonar::RulePriority::minor?(failure_level)
+  end
+  
+  def info?
+     Sonar::RulePriority::info?(failure_level)
+  end
+  
+  def minor?
+    Sonar::RulePriority::minor?(failure_level)
+  end
+
+  def major?
+    Sonar::RulePriority::major?(failure_level)
+  end
+  
+  def critical?
+    Sonar::RulePriority::critical?(failure_level)
+  end
+  
+  def blocker?
+    Sonar::RulePriority::blocker?(failure_level)
+  end
+
+  def activated?
+    error? || warning?
+  end
+
+  def value(param_id)
+    active_rule_parameters.each do |param|
+      return param.value if param.rules_parameter_id == param_id
+    end
+    nil
+  end
+
+  def parameters
+    active_rule_parameters
+  end
+
+  def parameter(name)
+    result=nil
+    parameters.each do |param|
+      result=param if (param.name==name)
+    end
+    result
+  end
+
+  def active_param_by_param_id(param_id)
+    parameters.each do |param|
+      return param if param.rules_parameter_id==param_id
+    end
+    nil
+  end
+
+  def copy
+    new_active_rule = ActiveRule.new(:rule => rule, :failure_level => failure_level)
+    self.active_rule_parameters.each do |active_rule_parameter|
+      new_active_rule.active_rule_parameters << active_rule_parameter.copy
+    end     
+    new_active_rule 
+  end
+
+  def inherited?
+    inheritance=='INHERITED'
+  end
+
+  def overrides?
+    inheritance=='OVERRIDES'
+  end
+end
index 6b47d8fd407e9a8456b92f05b6be38db3dc5aed0..e517a949ce17394d26a98732cb7d786bb1770805 100644 (file)
@@ -1,40 +1,40 @@
-#\r
-# Sonar, entreprise quality control tool.\r
-# Copyright (C) 2009 SonarSource SA\r
-# mailto:contact AT sonarsource DOT com\r
-#\r
-# Sonar is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 3 of the License, or (at your option) any later version.\r
-#\r
-# Sonar is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with {library}; if not, write to the Free Software\r
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
-#\r
- class ActiveRuleParameter < ActiveRecord::Base\r
-   belongs_to :active_rule\r
-   belongs_to :rules_parameter\r
-\r
-   def name\r
-    rules_parameter.name\r
-   end\r
-\r
-   def parameter\r
-     rules_parameter\r
-   end\r
-\r
-   def validate_on_update\r
-     rules_parameter.validate_value(value, errors, "value" )\r
-   end\r
-\r
-   def copy\r
-     ActiveRuleParameter.new(:rules_parameter => rules_parameter, :value => value)\r
-   end\r
-\r
- end\r
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with {library}; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+#
+ class ActiveRuleParameter < ActiveRecord::Base
+   belongs_to :active_rule
+   belongs_to :rules_parameter
+
+   def name
+    rules_parameter.name
+   end
+
+   def parameter
+     rules_parameter
+   end
+
+   def validate_on_update
+     rules_parameter.validate_value(value, errors, "value" )
+   end
+
+   def copy
+     ActiveRuleParameter.new(:rules_parameter => rules_parameter, :value => value)
+   end
+
+ end
index 8f5109e02c158211890014a875f7f79fdc8f7a46..d4087cdeeb2616433c71eab87b7c6fb2ffc1de6b 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 623c92856d93a1b4314e6ce3cc8ca4325de00add..5b2d189a17316f191f84943e9180fec5ecc1dbb3 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index a86b18292135ae03e2cdacdf6e0d5777412f8415..2f37204dded197ac23b662e92ed9fc5caf7d559e 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 998aba65beab1a31e68656f08dd384c4f7643746..f0a9c19a4d97ac56bfaaaf9caa10e03b9c3fb149 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 0bae3cd67a3b61045ea3fae1d2d966e707da2dce..d4333884a8a34cfbd9e4c52aa36d16b25264459e 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 4d83219f212a2ccc50e8fac876a0f5df1e994994..0dc46459e7257504fc3ba43ed5177d7de14599ac 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 90b83ec7707d76b9d9aee18349a0407b78b06e91..1177f3c83fab8bb495eecf7a97d03975afca3eef 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 68eb11767f6452cb19c8dcc774442f71018eb19d..6d9bc22bedb0882b246b91682aa9086888b85af4 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 2a05055f8902c0ce6fd39a1c434aac8e15a0812d..71543d6d9ba1be7f8a29efad7533090b6c22fc0d 100644 (file)
@@ -1,80 +1,80 @@
-#\r
-# Sonar, entreprise quality control tool.\r
-# Copyright (C) 2009 SonarSource SA\r
-# mailto:contact AT sonarsource DOT com\r
-#\r
-# Sonar is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 3 of the License, or (at your option) any later version.\r
-#\r
-# Sonar is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with Sonar; if not, write to the Free Software\r
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
-#\r
-class Dashboard < ActiveRecord::Base\r
-\r
-  DEFAULT_LAYOUT='50%-50%'\r
-\r
-  belongs_to :user\r
-\r
-  has_many :widgets, :include => 'properties', :dependent => :delete_all\r
-  has_many :active_dashboards, :dependent => :delete_all\r
-\r
-  validates_length_of :name, :within => 1..256\r
-  validates_length_of :description, :maximum => 1000, :allow_blank => true, :allow_nil => true\r
-  validates_length_of :column_layout, :maximum => 20, :allow_blank => false, :allow_nil => false\r
-  validates_uniqueness_of :name, :scope => :user_id\r
-\r
-  def shared?\r
-    read_attribute(:shared) || false\r
-  end\r
-\r
-  def layout\r
-    column_layout\r
-  end\r
-\r
-  def user_name\r
-    user_id ? user.name : nil\r
-  end\r
-\r
-  def editable_by?(user)\r
-    (user && self.user_id==user.id) || (user_id.nil? && user.has_role?(:admin))\r
-  end\r
-\r
-  def owner?(user)\r
-    self.user_id==user.id\r
-  end\r
-\r
-  def number_of_columns\r
-    column_layout.split('-').size\r
-  end\r
-\r
-  def column_size(column_index)\r
-    last_widget=widgets.select{|w| w.column_index==column_index}.max{|x,y| x.row_index <=> y.row_index}\r
-    last_widget ? last_widget.row_index : 0\r
-  end\r
-\r
-  def deep_copy()\r
-    dashboard=Dashboard.new(attributes)\r
-    dashboard.shared=false\r
-    self.widgets.each do |child|\r
-      new_widget = Widget.create(child.attributes)\r
-\r
-      child.properties.each do |prop|\r
-        widget_prop = WidgetProperty.create(prop.attributes)\r
-        new_widget.properties << widget_prop\r
-      end\r
-\r
-      new_widget.save\r
-      dashboard.widgets << new_widget\r
-    end\r
-    dashboard.save\r
-    dashboard\r
-  end\r
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+#
+class Dashboard < ActiveRecord::Base
+
+  DEFAULT_LAYOUT='50%-50%'
+
+  belongs_to :user
+
+  has_many :widgets, :include => 'properties', :dependent => :delete_all
+  has_many :active_dashboards, :dependent => :delete_all
+
+  validates_length_of :name, :within => 1..256
+  validates_length_of :description, :maximum => 1000, :allow_blank => true, :allow_nil => true
+  validates_length_of :column_layout, :maximum => 20, :allow_blank => false, :allow_nil => false
+  validates_uniqueness_of :name, :scope => :user_id
+
+  def shared?
+    read_attribute(:shared) || false
+  end
+
+  def layout
+    column_layout
+  end
+
+  def user_name
+    user_id ? user.name : nil
+  end
+
+  def editable_by?(user)
+    (user && self.user_id==user.id) || (user_id.nil? && user.has_role?(:admin))
+  end
+
+  def owner?(user)
+    self.user_id==user.id
+  end
+
+  def number_of_columns
+    column_layout.split('-').size
+  end
+
+  def column_size(column_index)
+    last_widget=widgets.select{|w| w.column_index==column_index}.max{|x,y| x.row_index <=> y.row_index}
+    last_widget ? last_widget.row_index : 0
+  end
+
+  def deep_copy()
+    dashboard=Dashboard.new(attributes)
+    dashboard.shared=false
+    self.widgets.each do |child|
+      new_widget = Widget.create(child.attributes)
+
+      child.properties.each do |prop|
+        widget_prop = WidgetProperty.create(prop.attributes)
+        new_widget.properties << widget_prop
+      end
+
+      new_widget.save
+      dashboard.widgets << new_widget
+    end
+    dashboard.save
+    dashboard
+  end
 end
\ No newline at end of file
index e1d5afe7df03f38fd5e6c08d1b1120a1b37fe5d2..2f66151ddbea52d57af25aa4f216ce1efafb549b 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 7f916b07d1a765b956ec69e89530db1eb2806990..ecfa0a7f6b06f4cbbad48fd37b261ef67f2b84d6 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 41ea35d8cfd09797090c45275babf447da737dfa..ace9123e64f7192810ef4d05887dbc68f6fa1e38 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 45752172e1c4e02776ebf52abd0b929d09d9091b..85d76c17fc322f51bb7c4f8267f377f494c2e27f 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 7a80de2ae6ba4f7ea1a0da5a5a85a945cc67b2d2..34c50e1034f081e2ce5a8e7f8cb62161ba97779c 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 84606802e53ef8725b13d742724ecda6b3fa1aa8..d2208f6e47f82f04cdf750e9d289f2f0f2d37f3f 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 3145b1c26f3d18f06d68795fe8bc6962d81757dd..82dad3b41fa157ec0d7633fce947e288f2cdd49a 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 4bf41b20aacfb6e8df3d3e04235633a0928d6a89..ba62292961318c2dc734c6aac175eb720921946f 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index e2a4b18805642e583cac8f54a399001765290491..b9eebf383bb23c46b4f0c4998ac2e595799acd91 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index d7971393cf62677cb672e6586677cbb6acd6f578..390dc6bb581d16118d1f27b40f85fe20af1edb78 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 9394320a35a3fd4c518a95f189e05c8854f2af94..f72248c35b408a0d2a1bb2fe8b423c25408eea50 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index cc680cf71063354eae515d57bc99dce572054895..dd22621af4f63b0390d9d82b299d3b7174399a6e 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 43c93fa45edc38fd729f3987702dfda3b43f0cc6..5832321bac0863d2c0e4f6ad5f2f2245f93f1f63 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 1d6d69e281e81af081d58eb1a47ed435d8cb1c2b..ec7bd9d7ff346a49e9146827122d108ddfb9b6d6 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 40813c323808c2087475b0fa59df412f160d107c..e4104850b1337665f396c59342f94c52299dcaf8 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 52e986162b46fdc0cd8f0a80d848b79eca02e0fa..51c142c12e88fb72ff51f6adee35bb5a61309057 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 87b1ac4507e6abc1b8fe90a393985bcfeb322469..d1fd310a0861e31574e1ebfbc2d0a4c1a6237e26 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index fd33b68e5cf10497c3cfec91e092e09e953b4ba9..422e45cbf55f708924c3c272aa09e6d28bcf69c4 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 1e553e99659a93c17a05d56df76d4e08e7af4e30..c95f03ad08a80815fd40290f17304c7ab5022639 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 350882982270c74eacb9ce701e1ad49e2184f5b5..f32b9bfc2948cb565c7c19a0494433d8c8f44d6e 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 92082e47daa7aec54249e84ab91e54324eb53688..ffcb835346ad15d269dd449f9f344f960c5151e4 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index bce1bbf21c0210b348478b31809eb34024d8d10f..2cea36c7994deb38da93b03861216a123f1ef6f8 100644 (file)
@@ -1,22 +1,22 @@
- #\r
- # Sonar, entreprise quality control tool.\r
- # Copyright (C) 2009 SonarSource SA\r
- # mailto:contact AT sonarsource DOT com\r
- #\r
- # Sonar is free software; you can redistribute it and/or\r
- # modify it under the terms of the GNU Lesser General Public\r
- # License as published by the Free Software Foundation; either\r
- # version 3 of the License, or (at your option) any later version.\r
- #\r
- # Sonar is distributed in the hope that it will be useful,\r
- # but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- # Lesser General Public License for more details.\r
- #\r
- # You should have received a copy of the GNU Lesser General Public\r
- # License along with Sonar; if not, write to the Free Software\r
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- #\r
-class Role < ActiveRecord::Base\r
-  ADMIN = 'sonar_admin'\r
+ #
+ # Sonar, entreprise quality control tool.
+ # Copyright (C) 2008-2011 SonarSource
+ # mailto:contact AT sonarsource DOT com
+ #
+ # Sonar is free software; you can redistribute it and/or
+ # modify it under the terms of the GNU Lesser General Public
+ # License as published by the Free Software Foundation; either
+ # version 3 of the License, or (at your option) any later version.
+ #
+ # Sonar is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ # Lesser General Public License for more details.
+ #
+ # You should have received a copy of the GNU Lesser General Public
+ # License along with Sonar; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ #
+class Role < ActiveRecord::Base
+  ADMIN = 'sonar_admin'
 end
\ No newline at end of file
index c94e7887b3941883d2a11aca1c1f168b89f8de7c..c485d0d0736c7ec8be77cc50f0c6407c815daf07 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 64a2517af132292fc4b2c816bba09f6744f43189..3b4886f2dad501ec4587a58ef58a6464e38d6540 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 98f341ad8050a8c47654e121682c9f6fb0ef4c34..1bcc7fd012df880eb44d90715f4292a2eb2d2e02 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 9ee251c29c1dae319df6d3f811ff30f70195b07c..600aa7dc83401d2748ce1d56cbd35f60a5e2a8d5 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 408f32b9e263ab8e0e1632f6add4ee3c5913978e..065bbbe2fa9d0e2c4b8ba3f5715b946daf5e70a7 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 2c80cd4532bc8fa5f6bb0435ebf72a685ebabf78..daed9bbb57257f25c5612fb630db7b53a53b5604 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index bbef4793cfbd0c9d9e140b9b96368507cb550875..e2a8d1ce08dc4c6d3a599de530cd4b6d390ea2c0 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 93145461a19f9a43a91b65ee3a9a0a7e6a306099..1828a3e49b0d084279d3b7058f8c61132f7ecf2a 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 052c64e2c506c04a7b11cd5c571b50908ae7fc06..8f032d1be26820a49cd125b1cb95d73b92e28203 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 43f3fc2416bf43f4f801e0ac10ba3e4f5bb9850a..a5bd62a826b17e83bc3d040f80f5700a58450f84 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 91973a19e30b0a771db339177b188b9596db1f67..c136fa06156b508001ebc3c1b44d8043dd4bdd0e 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index cb9d2bfaa555a066a299c565eab0982e2b4b1bae..e7b924b015cc0e41bff5044b19f6f7a86df28e52 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index d79914f4be3ca50bb580b0762a2930845b6ca10b..0be1a8494c9332bb49ce0ffdb5e4163f84409a55 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 10dee295e636e957c8ff29397dde3b7088c10266..eb820ad2f92c789b753ae8b2453ea299fa9e4e89 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 6e08e3b17fdfd474d4415c84ba3b83bf84d15cec..677bdd2d07c13f303cf2671c0d2e690fafab6700 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 4ee3e05c5bb6d1550b5aefb3decdca521ba1366a..9957be1232336c7c5ce1332f6e4edb6cbf7f18f1 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 7c6c82a9abf965355191022fb32818460052417e..d10262a99ed78f518fb72f163fd95c5328a8baf1 100644 (file)
@@ -1,76 +1,76 @@
-#\r
-# Sonar, entreprise quality control tool.\r
-# Copyright (C) 2009 SonarSource SA\r
-# mailto:contact AT sonarsource DOT com\r
-#\r
-# Sonar is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 3 of the License, or (at your option) any later version.\r
-#\r
-# Sonar is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with Sonar; if not, write to the Free Software\r
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
-#\r
-class Widget < ActiveRecord::Base\r
-  has_many :properties, :dependent => :delete_all, :class_name => 'WidgetProperty'\r
-  belongs_to :dashboards\r
-\r
-  validates_presence_of     :name\r
-  validates_length_of       :name,    :within => 1..256\r
-\r
-  validates_presence_of     :widget_key\r
-  validates_length_of       :widget_key, :within => 1..256\r
-\r
-  def property(key)\r
-    properties().each do |p|\r
-      return p if (p.key==key)\r
-    end\r
-    nil\r
-  end\r
-\r
-  def property_value(key, default_value=nil)\r
-    prop=property(key)\r
-    (prop ? prop.value : nil) || default_value\r
-  end\r
-\r
-  def set_property(key, value, value_type)\r
-    prop=property(key)\r
-    if prop\r
-      prop.text_value=value\r
-      prop.value_type=value_type\r
-    else\r
-      prop=self.properties.build(:kee => key, :text_value => value, :value_type => value_type)\r
-    end\r
-    properties_as_hash[key]=prop.typed_value\r
-  end\r
-\r
-  def unset_property(key)\r
-    prop=property(key)\r
-    self.properties.delete(prop) if prop\r
-  end\r
-\r
-  def delete_property(key)\r
-    prop=property(key)\r
-    if prop\r
-      properties.delete(prop)\r
-    end\r
-  end\r
-\r
-  def properties_as_hash\r
-    @properties_hash ||=\r
-      begin\r
-        hash={}\r
-        properties.each do |prop|\r
-          hash[prop.key]=prop.typed_value\r
-        end\r
-        hash\r
-      end\r
-    @properties_hash\r
-  end\r
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+#
+class Widget < ActiveRecord::Base
+  has_many :properties, :dependent => :delete_all, :class_name => 'WidgetProperty'
+  belongs_to :dashboards
+
+  validates_presence_of     :name
+  validates_length_of       :name,    :within => 1..256
+
+  validates_presence_of     :widget_key
+  validates_length_of       :widget_key, :within => 1..256
+
+  def property(key)
+    properties().each do |p|
+      return p if (p.key==key)
+    end
+    nil
+  end
+
+  def property_value(key, default_value=nil)
+    prop=property(key)
+    (prop ? prop.value : nil) || default_value
+  end
+
+  def set_property(key, value, value_type)
+    prop=property(key)
+    if prop
+      prop.text_value=value
+      prop.value_type=value_type
+    else
+      prop=self.properties.build(:kee => key, :text_value => value, :value_type => value_type)
+    end
+    properties_as_hash[key]=prop.typed_value
+  end
+
+  def unset_property(key)
+    prop=property(key)
+    self.properties.delete(prop) if prop
+  end
+
+  def delete_property(key)
+    prop=property(key)
+    if prop
+      properties.delete(prop)
+    end
+  end
+
+  def properties_as_hash
+    @properties_hash ||=
+      begin
+        hash={}
+        properties.each do |prop|
+          hash[prop.key]=prop.typed_value
+        end
+        hash
+      end
+    @properties_hash
+  end
 end
\ No newline at end of file
index df755df822145679e8e0d43c105f3839b33badcb..a47ba81b6e5c7b13a3bda358c4fb873e8bcbb98d 100644 (file)
@@ -1,81 +1,81 @@
-#\r
-# Sonar, entreprise quality control tool.\r
-# Copyright (C) 2009 SonarSource SA\r
-# mailto:contact AT sonarsource DOT com\r
-#\r
-# Sonar is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 3 of the License, or (at your option) any later version.\r
-#\r
-# Sonar is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with Sonar; if not, write to the Free Software\r
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
-#\r
-class WidgetProperty < ActiveRecord::Base\r
-  TYPE_INTEGER = 'INTEGER'\r
-  TYPE_BOOLEAN = 'BOOLEAN'\r
-  TYPE_FLOAT = 'FLOAT'\r
-  TYPE_STRING = 'STRING'\r
-\r
-  belongs_to :widget\r
-\r
-  validates_length_of       :kee, :within => 1..100\r
-  validates_length_of       :text_value,   :maximum => 4000, :allow_blank => true, :allow_nil => true\r
-\r
-  def key\r
-    kee\r
-  end\r
-\r
-  def value\r
-    text_value\r
-  end\r
-\r
-  def typed_value\r
-    case value_type\r
-    when TYPE_INTEGER\r
-      value.to_i\r
-    when TYPE_FLOAT\r
-      Float(value)\r
-    when TYPE_BOOLEAN\r
-      value=='true'\r
-    else\r
-      value\r
-    end\r
-  end\r
-\r
-  def to_hash_json\r
-    {:key => key, :value => value.to_s}\r
-  end\r
-\r
-  def to_xml(xml=Builder::XmlMarkup.new(:indent => 0))\r
-    xml.property do\r
-      xml.key(prop_key)\r
-      xml.value {xml.cdata!(text_value.to_s)}\r
-    end\r
-    xml\r
-  end\r
-\r
-  def self.validate_definition(definition, value)\r
-    errors=[]\r
-    if value.empty?\r
-      errors<<"Missing value" unless definition.optional()\r
-    else\r
-      errors<<"Please type an integer (example: 123)" if definition.type.name()==TYPE_INTEGER && value.to_i.to_s!=value\r
-      if definition.type.name()==TYPE_FLOAT\r
-        begin\r
-          Float(value)\r
-        rescue\r
-          errors<<"Please type a number (example: 123.45)"\r
-        end\r
-      end\r
-      errors<<"Please check value" if definition.type.name()==TYPE_BOOLEAN && !(value=="true" || value=="false")\r
-    end\r
-    errors\r
-  end\r
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+#
+class WidgetProperty < ActiveRecord::Base
+  TYPE_INTEGER = 'INTEGER'
+  TYPE_BOOLEAN = 'BOOLEAN'
+  TYPE_FLOAT = 'FLOAT'
+  TYPE_STRING = 'STRING'
+
+  belongs_to :widget
+
+  validates_length_of       :kee, :within => 1..100
+  validates_length_of       :text_value,   :maximum => 4000, :allow_blank => true, :allow_nil => true
+
+  def key
+    kee
+  end
+
+  def value
+    text_value
+  end
+
+  def typed_value
+    case value_type
+    when TYPE_INTEGER
+      value.to_i
+    when TYPE_FLOAT
+      Float(value)
+    when TYPE_BOOLEAN
+      value=='true'
+    else
+      value
+    end
+  end
+
+  def to_hash_json
+    {:key => key, :value => value.to_s}
+  end
+
+  def to_xml(xml=Builder::XmlMarkup.new(:indent => 0))
+    xml.property do
+      xml.key(prop_key)
+      xml.value {xml.cdata!(text_value.to_s)}
+    end
+    xml
+  end
+
+  def self.validate_definition(definition, value)
+    errors=[]
+    if value.empty?
+      errors<<"Missing value" unless definition.optional()
+    else
+      errors<<"Please type an integer (example: 123)" if definition.type.name()==TYPE_INTEGER && value.to_i.to_s!=value
+      if definition.type.name()==TYPE_FLOAT
+        begin
+          Float(value)
+        rescue
+          errors<<"Please type a number (example: 123.45)"
+        end
+      end
+      errors<<"Please check value" if definition.type.name()==TYPE_BOOLEAN && !(value=="true" || value=="false")
+    end
+    errors
+  end
 end
\ No newline at end of file
index bd37c1644ff89ccc13930d79ddddb62158aba8d1..bd930663577a4fefdcc9b8f3d5eacec8a7b787bd 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 5e1797d539796f22c2a642a7ec46e8d85fea8716..2e011054f2400c660b53f4794d85158a7111b286 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 1fc10430ac0312a671bde154e5bf31c0ebc3fb81..635650bb47b781e9f830416556b58307b816f77c 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index ac7b9150e8223f12678d212d497f9ce746a5a8e2..607f8889cb03534d6210417efe4297373d50b98b 100644 (file)
@@ -1,28 +1,28 @@
-#\r
-# Sonar, entreprise quality control tool.\r
-# Copyright (C) 2009 SonarSource SA\r
-# mailto:contact AT sonarsource DOT com\r
-#\r
-# Sonar is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 3 of the License, or (at your option) any later version.\r
-#\r
-# Sonar is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with Sonar; if not, write to the Free Software\r
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
-#\r
-class AddMetricsNames < ActiveRecord::Migration\r
-\r
-  def self.up\r
-    add_column(:metrics, :domain, :string, :null => true, :limit => 64)\r
-    add_column(:metrics, :short_name, :string, :null => true, :limit => 64)\r
-    add_column(:metrics, :qualitative, :boolean, :null => false, :default => false)\r
-  end\r
-\r
-end\r
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+#
+class AddMetricsNames < ActiveRecord::Migration
+
+  def self.up
+    add_column(:metrics, :domain, :string, :null => true, :limit => 64)
+    add_column(:metrics, :short_name, :string, :null => true, :limit => 64)
+    add_column(:metrics, :qualitative, :boolean, :null => false, :default => false)
+  end
+
+end
index d1362f1ed8579984d3bcd8040c02c2a007d96c39..174a90cecd8e52c89a0a06969581bc4fccb2331b 100644 (file)
@@ -1,41 +1,41 @@
-#\r
-# Sonar, entreprise quality control tool.\r
-# Copyright (C) 2009 SonarSource SA\r
-# mailto:contact AT sonarsource DOT com\r
-#\r
-# Sonar is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 3 of the License, or (at your option) any later version.\r
-#\r
-# Sonar is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with Sonar; if not, write to the Free Software\r
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
-#\r
-class CreateRulesProfiles < ActiveRecord::Migration\r
-\r
-  def self.up\r
-    create_table 'rules_profiles'do |t|\r
-      t.column :name,   :string, :limit => 40, :null => false\r
-      t.column :active, :boolean, :default => false\r
-    end\r
-\r
-    create_table 'active_rules' do |t|\r
-      t.column :profile_id, :integer, :null => false\r
-      t.column :rule_id,             :integer,   :null => false\r
-      t.column :failure_level,       :integer,   :null => false\r
-    end\r
-\r
-    create_table :active_rule_parameters do |t|\r
-      t.column :active_rule_id,     :integer,   :null => false\r
-      t.column :rules_parameter_id,  :integer,   :null => false\r
-      t.column :value,               :string,    :limit => 4000, :null => true\r
-    end\r
-  end\r
-\r
-end\r
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+#
+class CreateRulesProfiles < ActiveRecord::Migration
+
+  def self.up
+    create_table 'rules_profiles'do |t|
+      t.column :name,   :string, :limit => 40, :null => false
+      t.column :active, :boolean, :default => false
+    end
+
+    create_table 'active_rules' do |t|
+      t.column :profile_id, :integer, :null => false
+      t.column :rule_id,             :integer,   :null => false
+      t.column :failure_level,       :integer,   :null => false
+    end
+
+    create_table :active_rule_parameters do |t|
+      t.column :active_rule_id,     :integer,   :null => false
+      t.column :rules_parameter_id,  :integer,   :null => false
+      t.column :value,               :string,    :limit => 4000, :null => true
+    end
+  end
+
+end
index 0e42e4f4a57933403ab871386d6bf7e3c0cd9e04..b5697a1d7ddd522711b35843dedd3fec7946dd65 100644 (file)
@@ -1,27 +1,27 @@
-#\r
-# Sonar, entreprise quality control tool.\r
-# Copyright (C) 2009 SonarSource SA\r
-# mailto:contact AT sonarsource DOT com\r
-#\r
-# Sonar is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 3 of the License, or (at your option) any later version.\r
-#\r
-# Sonar is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with Sonar; if not, write to the Free Software\r
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
-#\r
-class AddRulesProfilesProvidedColumn < ActiveRecord::Migration\r
-\r
-  def self.up\r
-    add_column(:rules_profiles, :provided, :boolean, :default => false, :null => false)\r
-    Profile.reset_column_information\r
-  end\r
-\r
-end\r
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# Sonar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+#
+class AddRulesProfilesProvidedColumn < ActiveRecord::Migration
+
+  def self.up
+    add_column(:rules_profiles, :provided, :boolean, :default => false, :null => false)
+    Profile.reset_column_information
+  end
+
+end
index e69193ba949e1b2af27ab1ef599f2c12333981ca..0f249815147d948657d6f7e986cb3550dd826bcc 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 19eda5fcf7b075bb27989b1fa729cdf81fb1f68f..84c5df8cf08addc5b5071a767bf01eec1f037d9c 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index b242f04d0df6c17e875985ffad8df1c7d78feed8..76f0cf9a21d606522bdff680208a6fc2eaf7e49e 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 724b1010aec7c2133e55ad7f3c6729519293d2c6..e48f6f6e9482ab6e2e7853b783837a75efe80da9 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 971e36123ecc4a462c484c9089187e050195920e..64fd7c37eb3436ec47822cda439094f85a326e87 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 3bba83b2167016b985d179129f9096c45190ece3..269022642c2b95fae434852779282702a38d80c1 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 409d230b5ed8ebe04c0b48995c4b79c06b2b6084..88121955ce2bcc31fd805db87f97290ca3d3c20c 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 99aaf2bb783c1b480d940608f7ce087aff61a959..36f1d2c29549e447b52e3af3ffd5103ec0c55daf 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index cdd2261df1d5776bb949701c6261d086c89478a7..97459dff70b1f68006271ecf4902af552aa56163 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 2fc1ac4889c71c60778ba1c5f8e4d5004eaac3d2..3d7112f69e6c9f4af4b94b4afbf5b02fc30c8fe2 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 46d2e9bb4704f35dd5d6d00e9f96b6174a987c3a..a03d052cc778dc30d590e78b0f2326ecb007682d 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 15b179316a0f51bd9279bd92d6312cdaab2e5ba9..ce8a605bd4833388d25946225f8076e3d26c1fcf 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 2ea365a61cc18ab71f5109ae325a0aedee9dea00..b63aef33688af4e1faaef1df99eff8e8704f93c1 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index ac59f71ab657cdc09690874736880df199602139..4307aa28eb3e7b2ebf4cb6a8913adbde19141b59 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 8d371c5aaf30a91040fbcb0ba388a22422250730..c724469946c19187ac0c74e6b1031d09c9d088a9 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 61a92a31803f61247e2f98ff6cf628434fe34347..2b110b2276127b86504041c4a56e0f6501eb9327 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index ab78e77cf2fdebfc70e1abfe64835fc4c2adad49..a2b6a43c807840a6572e0fb10540f79cb3ddfd84 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index eb864438ea11f8ca5f4c180d87e070d6c672cf8a..688a46d39b290db8a2589fcefe53a3396fafda73 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index c8230241ac628961e5d44bd533fd2af681b7e628..14205a37b86130aaafc2a30132726b362efe470b 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index b89c3437bdd2e762a427ed3c1d68d32c0a6bc79c..e53aadd92a05523d8732a9881b7478833e735814 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 5be2c8cbeef4a62e6b2732061c0b3ba5c403af7c..cfacedc0dc2e18c9ce71ad29021d0f5a6aa4d5eb 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 1f251153a7954c2e0f656b26536e9fbb7f613d6c..91111464251df0a95aed1a9ba3eaf33611fdd49a 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index d2d0a1a041d1a17bcfb06408bbef9456347a0bff..70b189784caed099f292826d7022fd61d0055490 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index f03c351f130dd999d27e436e760136d39e3b8742..ba00735f89eab0b4f351f06de0db4ff585eb1426 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index e6f88cff2b6511ef0d7b9bcb86132379d5ec7f63..cc361ccfcd49a21a84d5d46d4756cf87e627daef 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index eebc5b7ab13ef0b94df7f663fecca3d00b22bc91..303920a64aec8a0d4f72b20ee7aec64e2e85b9e4 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 7fa685c6c7bcd4c0baad1ec16dfe5dad4dfb454a..074dd969836a5c4f683b163b7a60d134b5348a20 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 2e092e73b0fe1a62aef63dff0c4e479456dccca9..fa2742b5fda18e09d28761b00839b28b5425c1a5 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index d9e634a8947a4d4f9fced6aecc879e707f1f9540..13eaa3c0d44445c2601e2767becbd99689c56a2a 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index cc0e3b23e64d1519b053215a4e074bc3ae89f59c..bb8758ceeabffc157182723f10f38c0d9834048b 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 22b845815577d7b5a7894036e703d9675e4f11db..6b36ffd5ecc89a6cbfe2c3ceeb80a957d676f432 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 42bc02b50ceef0652454087128e3edf55c003bfc..a4a97eba046105c2eed955814d7ac737e051feee 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 246962a67adc237570841b6046e34069e5659800..62760eb619edb03833728b21547c30219bf0947f 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 72608eee1847efc038a00c4df9a91e9c5de16308..5862bb4844b6ebc959684bcce13bc0099c4abdd1 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index b8d14e0715be4ed282f0e5a9590aec59b2e3a1e2..074c5d8f46d6c473d1c3c423f53d3e622fe055f8 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index af391d5561b777cd9da9af39a72b3e6c0f87c1cf..470fa91428374fd2b725025718ab490c6f445f3d 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index a0d635509068976f1a1b2f56521096d757559fdd..cd4751a3a550cd7e2d8a19af8f5f16c754c9399a 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index d24cd7a5d79a5d487e3c30e65bc69e016424c5b0..e8076d80ab3f0c27a503748efdd3b648be22e6f7 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index f5df428f8220d843379d34d6015b13b99c7cf9e1..a667100b95eacc539313dee6d1f4908a624429ec 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index cc585b6561feb266f7e3d7bbc0a889000850d163..351cf6f078927bbbb20c73f48054c9ac841baef3 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 0af16cdd90f3c22bae80209c021bb0803f428e19..7b90fb7f035820e3cdacc667ac01592d56f60ffd 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index db51416035de370624e56517aff6aa8938e04535..c5526de568e837e63415a443aa0ab8d35c67f283 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 4533b48bf78a5e0d02f518ff96de2fa67e24f49b..14991a2a6a6fae9b12ac16a0f27ff954f49a0f50 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index ec8d1620ab0d5eafc452ba0afd13c05ba6f7df1d..7475a2172a0cd2f3dcfe1f1b9bd7326d59302537 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index edd98d285cf10ed75bacce0e2169eeffe75a0b19..7322b8c8376cc0f93545e08f0557553b0af352d5 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index f3eaac8dde092155760596f13c428c2f22339411..ede5e05dc5d44bf757f59ec81c6ca648c6bb4608 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index d807f926fa413e38f194ff4c464f640e1e5e3418..e9ba4bffa598afe3169f7289db643cdb05d281aa 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 96ecabde10a58030b7fb8e1e81cf4d30cf47aad1..7af3cdb223f25e2da8b350068b50d52051a351b9 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index adc14ea6084a62aa7d51153d6b0013d587c3c0ff..71628aa99bb3e27ab4caf7e4b7fbba38b82d6436 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 376bfcbb23c355756588e9bce2bb2bc680cc039a..2cc1788ae696c727b491c92cbd84fce5d5ee822a 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 6047e6b08ee172e4071021bdfb4076d05099c76c..f76a7e9a68b36bfb43675dbd3ba653d575960535 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 030380445d32c76239571df828e45d3b82745014..9c149cd644dc055d07a439089155f5b3120e540c 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 570367391f23af5e82817a9d12dec061e31f319f..43845cce0ae34a4cfc981381bd976e3138dca27c 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 8c98a680c9695826940d866ca95d8255b8c97217..933e816310b4c1b26166d6190d814edd5aa1db1a 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 35eae9bcdea1189f2223a1939457086bec728101..cbd81d46e8a479e2b410532724d5aaba85ca8151 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 43c310e949fd5a5340b421c0472618e7cc5cf459..28b7fbde9c2edaa3f836e727e1a0a5fec1a110b0 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 3fc09b20966fb563cd838cce3c24929f18897fc1..f9f512dec11efdf5341d5a52d427ce6f81d6f4f2 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index cdd3f690de2bc0af4850fd9adf93474944862e6b..09a80851cc44d700593a750aae7c47bedf7335e4 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 9649ac93c493e65d173a601151c1e6c937c7261b..8cb2486f272385d0dff1d52bb388268b3808eeb0 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index c9df90d98c5eb8b3859575882f3d18b1a05f618f..905f7b1d118ee52536c4a43bc6c3158af21e1f0b 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 2bc3678d79eca562217268b6fdae798d31cf3c08..a4043d95055eb997c062ea03e161acb0dfae15ae 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 1aacfa706a395af8fec298e9c9e87595188ba32c..4d53d8898e64773409c0c14ecfad2e53a42ff9e7 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 0474d771ee79a83f05b5c187bc22b2020bf4438b..efb604cfc2e19d400580c7e6689992bc65141140 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index f15f6ec3518d1225a501aa638bb9eef6bb62670f..4d7eebaeb9c64312e69041cbd7b8dc71a0a68aad 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 41a68b9173a13dd655978559291b4c07b6e6104b..b3ff67c0f2212d79a27cca1e10884f22b3076b97 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 6f4868b888531286d7deaf6d7e637d826ce88fe5..22f7ddd9223650e987b9f37bb8e66558d86e686a 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 106ff2374a04c27908873afbab8f77232cd3917e..9ede6b89667eae335ae5cc8546ba4bc48f8f650f 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index c4a9d1d8aea1450622abf141918b1da0181645a4..c69e2a87aa749f15e6cbd5221df16ddddbdd339a 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index c146ef9f9d42524c6b506c536d9b363344a09cbc..feae3e279127a4951be55fb7efee5d798c4a52e5 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 3faa46fc0d3765d320611e76f4cdce5454ebf501..ec028fa1ec5717d06cf776cff0f6cfc021a01a35 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index bcdfb838226fb8a57e91cb15629d55e3457f0748..941f1a0892f336c2b13e43208955ae2d2eea5416 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 9ba2eb52e3c5083e81101ed40abd06672714872d..e39844f228d3ca8a65194c11bdc5bf940a9bdcf9 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index e16f0c6a6a9c61738c082bde2877383996df15ae..7fa69e9f69f8a5a4d10b15e235fd9dd2a57d55a0 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 4ee855ea473842a94249360b1aa40885132bb575..a30b36ad7f2f4cc763f34ee51cc71e40ba9f78d1 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index c821fa8fed3a623347b765db88daf01649b3dd9c..76682cd07e55055b58d732658a45881e9b41096c 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 2869047cbe0aef150e282fdde975a4127adabd9c..16577e7cb9a0ec9494d1cb74cfc9e8f786d46d5f 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 62048e4bfbaf568baa4f2c25a1cda60475942a63..4fc96eb2d5eff5359c64c9a82520accb2637bca6 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index b6667c5fe9bf3bf9c1c59e79e7cb406b53b1a8d0..24bc760676ba4260e068451e87d53152d025ae95 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 874c8101969b8b7d859e713c7bd6a71af610eaa0..834dda798d72e63e2ad63d0f4c9c64f88c67c919 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 3eb65808165865939eabecd09a994e8221c0858e..f0a4e78f334ff3df056ad52b5687836eae364456 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 23be6b35b04f169fccc800274d58da6a7104e51e..b5273b750a9845e4ebd9294800342928bf3777d4 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 9b6e23b62a47bc5e20e2b15966dba51740b5f433..28206277d4b2d5e0c3e634547e609174dea55740 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index e14e0dfa50675ae191f9e301c9929af8ecbdc7a3..0666c2a3ca698ab08196822ec3d59980496e2d3a 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index da3087a1f6b1f0b826c67d6dabc09ab196c80e65..ec4fad631cb59dd221de7de99cb4811d19588d21 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index d9f4236d9123da4fbac30d0a1d5f75a875c751f4..04d3fbff8f6746c8bfdc6fc45402489112b71ed8 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 3a6e097835b9f7e7b3f7b3ade62365bde8a29fc6..c5cb4a9e4f7949da23ce4cd33f60c07a6b96187e 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 893342fdb71e116548a22469ac81890bd971e739..21d3b3d92896622b0fe1f3d3655e97e3fbda3a1e 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 1b97915efb3b06c54e149dff8baabcaec060b912..af5cbb497c72f27a081fac6101d9d8facf725720 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 1811eff25723a8a8690cb788bdc8e6e2859afd07..eb07a59672015b9c70c42bf29e088694411bc42e 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index a1201f86486ebd0eb902849130fe016ebdfbc0f2..bde096664fab2c24c9fc2a9672b9ccdf23a75bc5 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 084915e064887a1c21cc07b35de34e01833bac5a..a880840fde5cb74b0e8ccca56fc5f30ca4ec6c8b 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index 3302cffd6ec4a7b20263496bd19d1fd9ef0f89dd..6f50bd9821ec48dd6d7c54763103ee3cc22586b3 100644 (file)
@@ -1,6 +1,6 @@
  #
  # Sonar, entreprise quality control tool.
- # Copyright (C) 2009 SonarSource SA
+ # Copyright (C) 2008-2011 SonarSource
  # mailto:contact AT sonarsource DOT com
  #
  # Sonar is free software; you can redistribute it and/or
index 86fad2d3383b085169d7e0f1fbe015e793900e6c..375093744376698f2d1865311dadf12aff5ec2e1 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, entreprise quality control tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index ba519fe1383c758fa17305d9392390818e8bb98a..fc62845b9afc4fd63ddc147503cbcaa53736b4b3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cce39dd7091e348073fdb673eaf565889a724f0c..203590faf555b08ec76eee8312d52ce3190d6ad7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 59f3c40c79b1d1c1574afa39d1ee82dbbbb8c73d..b5513ccc29eeffe0a67275ca4ef2154c63d87142 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.server.charts.deprecated;\r
-\r
-import org.junit.Ignore;\r
-import org.junit.Test;\r
-\r
-import java.awt.image.BufferedImage;\r
-import java.io.IOException;\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
-public class BarChartTest extends BaseChartWebTest {\r
-\r
-  @Test\r
-  public void testBarChartDefaultDimensions() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    BarChart chart = new BarChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "bar-chart-default.png");\r
-    assertChartSizeGreaterThan(img, 100);\r
-  }\r
-\r
-  @Test\r
-  public void testBarChartRange() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_RANGEMAX, "200");\r
-    BarChart chart = new BarChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "bar-chart-range.png");\r
-    assertChartSizeGreaterThan(img, 100);\r
-  }\r
-\r
-  @Test\r
-  public void testBarChartSpecificDimensions() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "750x250");\r
-    BarChart chart = new BarChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "bar-chart-specific-dimensions.png");\r
-    assertChartSizeGreaterThan(img, 100);\r
-  }\r
-\r
-  @Test\r
-  public void testBarChartOneValue() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, "100");\r
-    BarChart chart = new BarChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "bar-chart-one-value.png");\r
-    assertChartSizeGreaterThan(img, 100);\r
-  }\r
-\r
-  @Test\r
-  public void testBarChartOthersColors() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_COLORS, "FFFF00,9900FF");\r
-    BarChart chart = new BarChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "bar-chart-others-colors.png");\r
-    assertChartSizeGreaterThan(img, 100);\r
-  }\r
-\r
-  @Test\r
-  public void testBarChartNullValues() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, null);\r
-    BarChart chart = new BarChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "bar-chart-null-values.png");\r
-    assertChartSizeGreaterThan(img, 100);\r
-  }\r
-\r
-  @Test\r
-  public void testBarChartWrongValues() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, "wrong,value");\r
-    BarChart chart = new BarChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "bar-chart-wrong-values.png");\r
-    assertChartSizeGreaterThan(img, 100);\r
-  }\r
-\r
-  @Test\r
-  public void testBarChartTitle() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet");\r
-    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "750x250");\r
-    BarChart chart = new BarChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "bar-chart-title.png");\r
-    assertChartSizeGreaterThan(img, 100);\r
-  }\r
-\r
-  @Test\r
-  @Ignore\r
-  public void testBarChartTitle2() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet");\r
-    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "750x250");\r
-    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_VERTICAL);\r
-    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES, "0+,5+,10+,20+,30+,60+,90+");\r
-    params.put(BaseChartWeb.CHART_PARAM_SERIES, "1,2,3");\r
-    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE, "y");\r
-    params.put(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE, "y");\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,50,75,92,30,58");\r
-    BarChart chart = new BarChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "bar-chart-vertical-multi-series.png");\r
-    assertChartSizeGreaterThan(img, 100);\r
-  }\r
-\r
-  @Test\r
-  public void testStackedBarCharteightyTwenty() throws IOException {\r
-    Map<String, String> params = new HashMap<String, String>();\r
-    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.STACKED_BAR_CHART);\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, "80,20");\r
-    BarChart chart = new BarChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "stacked-bar-chart-80-20.png");\r
-    assertChartSizeGreaterThan(img, 100);\r
-  }\r
-\r
-  @Test\r
-  public void testStackedBarChartfiftyFifty() throws IOException {\r
-    Map<String, String> params = new HashMap<String, String>();\r
-    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.STACKED_BAR_CHART);\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, "50,50");\r
-    BarChart chart = new BarChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "stacked-bar-chart-50-50.png");\r
-    assertChartSizeGreaterThan(img, 100);\r
-  }\r
-\r
-  private Map<String, String> getDefaultParams() {\r
-    Map<String, String> params = new HashMap<String, String>();\r
-    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_HORIZONTAL);\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,50");\r
-    return params;\r
-  }\r
-\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.server.charts.deprecated;
+
+import org.junit.Ignore;
+import org.junit.Test;
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class BarChartTest extends BaseChartWebTest {
+
+  @Test
+  public void testBarChartDefaultDimensions() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    BarChart chart = new BarChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "bar-chart-default.png");
+    assertChartSizeGreaterThan(img, 100);
+  }
+
+  @Test
+  public void testBarChartRange() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_RANGEMAX, "200");
+    BarChart chart = new BarChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "bar-chart-range.png");
+    assertChartSizeGreaterThan(img, 100);
+  }
+
+  @Test
+  public void testBarChartSpecificDimensions() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "750x250");
+    BarChart chart = new BarChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "bar-chart-specific-dimensions.png");
+    assertChartSizeGreaterThan(img, 100);
+  }
+
+  @Test
+  public void testBarChartOneValue() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, "100");
+    BarChart chart = new BarChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "bar-chart-one-value.png");
+    assertChartSizeGreaterThan(img, 100);
+  }
+
+  @Test
+  public void testBarChartOthersColors() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_COLORS, "FFFF00,9900FF");
+    BarChart chart = new BarChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "bar-chart-others-colors.png");
+    assertChartSizeGreaterThan(img, 100);
+  }
+
+  @Test
+  public void testBarChartNullValues() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, null);
+    BarChart chart = new BarChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "bar-chart-null-values.png");
+    assertChartSizeGreaterThan(img, 100);
+  }
+
+  @Test
+  public void testBarChartWrongValues() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, "wrong,value");
+    BarChart chart = new BarChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "bar-chart-wrong-values.png");
+    assertChartSizeGreaterThan(img, 100);
+  }
+
+  @Test
+  public void testBarChartTitle() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet");
+    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "750x250");
+    BarChart chart = new BarChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "bar-chart-title.png");
+    assertChartSizeGreaterThan(img, 100);
+  }
+
+  @Test
+  @Ignore
+  public void testBarChartTitle2() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet");
+    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "750x250");
+    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_VERTICAL);
+    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES, "0+,5+,10+,20+,30+,60+,90+");
+    params.put(BaseChartWeb.CHART_PARAM_SERIES, "1,2,3");
+    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE, "y");
+    params.put(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE, "y");
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,50,75,92,30,58");
+    BarChart chart = new BarChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "bar-chart-vertical-multi-series.png");
+    assertChartSizeGreaterThan(img, 100);
+  }
+
+  @Test
+  public void testStackedBarCharteightyTwenty() throws IOException {
+    Map<String, String> params = new HashMap<String, String>();
+    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.STACKED_BAR_CHART);
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, "80,20");
+    BarChart chart = new BarChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "stacked-bar-chart-80-20.png");
+    assertChartSizeGreaterThan(img, 100);
+  }
+
+  @Test
+  public void testStackedBarChartfiftyFifty() throws IOException {
+    Map<String, String> params = new HashMap<String, String>();
+    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.STACKED_BAR_CHART);
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, "50,50");
+    BarChart chart = new BarChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "stacked-bar-chart-50-50.png");
+    assertChartSizeGreaterThan(img, 100);
+  }
+
+  private Map<String, String> getDefaultParams() {
+    Map<String, String> params = new HashMap<String, String>();
+    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_HORIZONTAL);
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,50");
+    return params;
+  }
+
+}
index 898fa7dc5498f504be825d5b60b7a11284f4ae24..cb3707036a4b526e267bc2d9d4ad23e83ce08949 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3936e05ed15917cb96ac1c22bf02030d7764e762..a9be5c12b4604c65d0cc241c4e1fb7a94cc4ecbf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 48a639eaf665512fc490e7fa6f7d114b9d954807..8c6f2628455172f865becc5064f81a12f01d2179 100644 (file)
@@ -1,90 +1,90 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.server.charts.deprecated;\r
-\r
-import org.junit.Test;\r
-\r
-import java.awt.image.BufferedImage;\r
-import java.io.IOException;\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
-public class CustomBarChartTest extends BaseChartWebTest {\r
-\r
-  @Test\r
-  public void testEmptyParameters() throws IOException {\r
-    Map<String, String> params = new HashMap<String, String>();\r
-    CustomBarChart chart = new CustomBarChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "custom-horizontal-bar-chart-empty.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  @Test\r
-  public void testAllParameters() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet");\r
-    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "750x250");\r
-    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE, "y");\r
-    params.put(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE, "y");\r
-    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM);\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, "6,2,3,7,5,1,9");\r
-    params.put(BaseChartWeb.CHART_PARAM_SERIES, "1,2");\r
-    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES, "0+,5+,10+,20+,30+,60+,90+");\r
-    params.put(BaseChartWeb.CHART_PARAM_COLORS, "FF0000,FF0000,FF0000,CC9900,CC9900,CC9900,00FF00,00FF00,00FF00");\r
-    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER, "0.05");\r
-    params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER, "0.05");\r
-    params.put(BaseChartWeb.CHART_PARAM_INSETS, "20");\r
-    CustomBarChart chart = new CustomBarChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "custom-horizontal-bar-chart-all.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  @Test\r
-  public void testComplexityChart() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "150x100");\r
-    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE, "y");\r
-    params.put(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE, "y");\r
-    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM);\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, "6,2,3");\r
-    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES, "0+,5+,10+,20+,30+,60+,90+");\r
-    params.put(BaseChartWeb.CHART_PARAM_COLORS, "4192D9");\r
-    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER, "0.05");\r
-    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_LOWER, "0.05");\r
-    params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER, "0.2");\r
-    params.put(BaseChartWeb.CHART_PARAM_INSETS, "1");\r
-    params.put(BaseChartWeb.CHART_PARAM_OUTLINE_RANGEGRIDLINES_VISIBLE, "y");\r
-    params.put(BaseChartWeb.CHART_PARAM_OUTLINE_VISIBLE, "y");\r
-    CustomBarChart chart = new CustomBarChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "custom-horizontal-bar-chart-complexity.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  private Map<String, String> getDefaultParams() {\r
-    Map<String, String> params = new HashMap<String, String>();\r
-    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_HORIZONTAL);\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,50");\r
-    return params;\r
-  }\r
-\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.server.charts.deprecated;
+
+import org.junit.Test;
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class CustomBarChartTest extends BaseChartWebTest {
+
+  @Test
+  public void testEmptyParameters() throws IOException {
+    Map<String, String> params = new HashMap<String, String>();
+    CustomBarChart chart = new CustomBarChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "custom-horizontal-bar-chart-empty.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  @Test
+  public void testAllParameters() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet");
+    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "750x250");
+    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE, "y");
+    params.put(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE, "y");
+    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM);
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, "6,2,3,7,5,1,9");
+    params.put(BaseChartWeb.CHART_PARAM_SERIES, "1,2");
+    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES, "0+,5+,10+,20+,30+,60+,90+");
+    params.put(BaseChartWeb.CHART_PARAM_COLORS, "FF0000,FF0000,FF0000,CC9900,CC9900,CC9900,00FF00,00FF00,00FF00");
+    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER, "0.05");
+    params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER, "0.05");
+    params.put(BaseChartWeb.CHART_PARAM_INSETS, "20");
+    CustomBarChart chart = new CustomBarChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "custom-horizontal-bar-chart-all.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  @Test
+  public void testComplexityChart() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "150x100");
+    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_VISIBLE, "y");
+    params.put(BaseChartWeb.CHART_PARAM_RANGEAXIS_VISIBLE, "y");
+    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_VERTICAL_CUSTOM);
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, "6,2,3");
+    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES, "0+,5+,10+,20+,30+,60+,90+");
+    params.put(BaseChartWeb.CHART_PARAM_COLORS, "4192D9");
+    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_UPPER, "0.05");
+    params.put(BaseChartWeb.CHART_PARAM_CATEGORIES_AXISMARGIN_LOWER, "0.05");
+    params.put(BaseChartWeb.CHART_PARAM_SERIES_AXISMARGIN_UPPER, "0.2");
+    params.put(BaseChartWeb.CHART_PARAM_INSETS, "1");
+    params.put(BaseChartWeb.CHART_PARAM_OUTLINE_RANGEGRIDLINES_VISIBLE, "y");
+    params.put(BaseChartWeb.CHART_PARAM_OUTLINE_VISIBLE, "y");
+    CustomBarChart chart = new CustomBarChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "custom-horizontal-bar-chart-complexity.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  private Map<String, String> getDefaultParams() {
+    Map<String, String> params = new HashMap<String, String>();
+    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.BAR_CHART_HORIZONTAL);
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,50");
+    return params;
+  }
+
 }
\ No newline at end of file
index 63c3ad2f06dfc05394bd3462e629583553242087..0b3fac3e68661bbbcb7b4ae9be2f0bb534ae7380 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.server.charts.deprecated;\r
-\r
-import org.junit.Test;\r
-\r
-import java.awt.image.BufferedImage;\r
-import java.io.IOException;\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
-public class PieChartTest extends BaseChartWebTest {\r
-\r
-  @Test\r
-  public void testPieChartDefaultDimensions() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    PieChart chart = new PieChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "pie-chart-default.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  @Test\r
-  public void testPieChartSpecificDimensions() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200");\r
-    PieChart chart = new PieChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "pie-chart-specific-dimensions.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  @Test\r
-  public void testPieChartOneValue() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, "100");\r
-    PieChart chart = new PieChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "pie-chart-one-value.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  @Test\r
-  public void testPieChartOthersColors() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_COLORS, "FFFF00,9900FF");\r
-    PieChart chart = new PieChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "pie-chart-others-colors.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  @Test\r
-  public void testPieChartNullValues() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, null);\r
-    PieChart chart = new PieChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "pie-chart-null-values.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  @Test\r
-  public void testPieChartWrongValues() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, "wrong,value");\r
-    PieChart chart = new PieChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "pie-chart-wrong-values.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  @Test\r
-  public void testPieChartTitle() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet");\r
-    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200");\r
-    PieChart chart = new PieChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "pie-chart-title.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  private Map<String, String> getDefaultParams() {\r
-    Map<String, String> params = new HashMap<String, String>();\r
-    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.PIE_CHART);\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,50");\r
-    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "50x50");\r
-    return params;\r
-  }\r
-\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.server.charts.deprecated;
+
+import org.junit.Test;
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class PieChartTest extends BaseChartWebTest {
+
+  @Test
+  public void testPieChartDefaultDimensions() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    PieChart chart = new PieChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "pie-chart-default.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  @Test
+  public void testPieChartSpecificDimensions() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200");
+    PieChart chart = new PieChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "pie-chart-specific-dimensions.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  @Test
+  public void testPieChartOneValue() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, "100");
+    PieChart chart = new PieChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "pie-chart-one-value.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  @Test
+  public void testPieChartOthersColors() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_COLORS, "FFFF00,9900FF");
+    PieChart chart = new PieChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "pie-chart-others-colors.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  @Test
+  public void testPieChartNullValues() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, null);
+    PieChart chart = new PieChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "pie-chart-null-values.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  @Test
+  public void testPieChartWrongValues() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, "wrong,value");
+    PieChart chart = new PieChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "pie-chart-wrong-values.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  @Test
+  public void testPieChartTitle() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet");
+    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200");
+    PieChart chart = new PieChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "pie-chart-title.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  private Map<String, String> getDefaultParams() {
+    Map<String, String> params = new HashMap<String, String>();
+    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.PIE_CHART);
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,50");
+    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "50x50");
+    return params;
+  }
+
 }
\ No newline at end of file
index dee9f92a2ae2d338f316b91915e5ffb4080275c8..d4b574c9ed52306a47c59c6318c15312ddc0ad0a 100644 (file)
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.server.charts.deprecated;\r
-\r
-import org.junit.Test;\r
-\r
-import java.awt.image.BufferedImage;\r
-import java.io.IOException;\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
-public class SparkLinesChartTest extends BaseChartWebTest {\r
-\r
-  @Test\r
-  public void testSparkLinesChartDefaultDimensions() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    SparkLinesChart chart = new SparkLinesChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "sparklines-chart-default.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  @Test\r
-  public void testSparklinesChartSpecificDimensions() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200");\r
-    SparkLinesChart chart = new SparkLinesChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "sparklines-chart-specific-dimensions.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  @Test\r
-  public void testSparklinesChartOneValue() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,100");\r
-    SparkLinesChart chart = new SparkLinesChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "sparklines-chart-one-value.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  @Test\r
-  public void testSparklinesChartOthersColors() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_COLORS, "9900FF");\r
-    SparkLinesChart chart = new SparkLinesChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "sparklines-chart-others-colors.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  @Test\r
-  public void testSparklinesChartNullValues() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, null);\r
-    SparkLinesChart chart = new SparkLinesChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "sparklines-chart-null-values.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  @Test\r
-  public void testSparklinesChartWrongValues() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, "wrong,value");\r
-    SparkLinesChart chart = new SparkLinesChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "sparklines-chart-wrong-values.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  @Test\r
-  public void testSparklinesChartTitle() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet");\r
-    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200");\r
-    SparkLinesChart chart = new SparkLinesChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "sparklines-chart-title.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  @Test\r
-  public void testSparklinesChartDates() throws IOException {\r
-    Map<String, String> params = getDefaultParams();\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, "20080101,1,20080201,4,20080301,3,20080401,5,20080501,5,20080601,7,20080701,7,20080801,8");\r
-    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200");\r
-    SparkLinesChart chart = new SparkLinesChart(params);\r
-    BufferedImage img = chart.getChartImage();\r
-    saveChart(img, "sparklines-chart-dates.png");\r
-    assertChartSizeGreaterThan(img, 50);\r
-  }\r
-\r
-  private Map<String, String> getDefaultParams() {\r
-    Map<String, String> params = new HashMap<String, String>();\r
-    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.SPARKLINES_CHART);\r
-    params.put(BaseChartWeb.CHART_PARAM_VALUES, "1,1,2,4,3,3,4,5,5,5,6,7,7,7,8,8");\r
-    return params;\r
-  }\r
-\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.server.charts.deprecated;
+
+import org.junit.Test;
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class SparkLinesChartTest extends BaseChartWebTest {
+
+  @Test
+  public void testSparkLinesChartDefaultDimensions() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    SparkLinesChart chart = new SparkLinesChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "sparklines-chart-default.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  @Test
+  public void testSparklinesChartSpecificDimensions() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200");
+    SparkLinesChart chart = new SparkLinesChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "sparklines-chart-specific-dimensions.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  @Test
+  public void testSparklinesChartOneValue() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, "100,100");
+    SparkLinesChart chart = new SparkLinesChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "sparklines-chart-one-value.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  @Test
+  public void testSparklinesChartOthersColors() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_COLORS, "9900FF");
+    SparkLinesChart chart = new SparkLinesChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "sparklines-chart-others-colors.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  @Test
+  public void testSparklinesChartNullValues() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, null);
+    SparkLinesChart chart = new SparkLinesChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "sparklines-chart-null-values.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  @Test
+  public void testSparklinesChartWrongValues() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, "wrong,value");
+    SparkLinesChart chart = new SparkLinesChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "sparklines-chart-wrong-values.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  @Test
+  public void testSparklinesChartTitle() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_TITLE, "JFreeChart by Servlet");
+    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200");
+    SparkLinesChart chart = new SparkLinesChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "sparklines-chart-title.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  @Test
+  public void testSparklinesChartDates() throws IOException {
+    Map<String, String> params = getDefaultParams();
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, "20080101,1,20080201,4,20080301,3,20080401,5,20080501,5,20080601,7,20080701,7,20080801,8");
+    params.put(BaseChartWeb.CHART_PARAM_DIMENSIONS, "200x200");
+    SparkLinesChart chart = new SparkLinesChart(params);
+    BufferedImage img = chart.getChartImage();
+    saveChart(img, "sparklines-chart-dates.png");
+    assertChartSizeGreaterThan(img, 50);
+  }
+
+  private Map<String, String> getDefaultParams() {
+    Map<String, String> params = new HashMap<String, String>();
+    params.put(BaseChartWeb.CHART_PARAM_TYPE, BaseChartWeb.SPARKLINES_CHART);
+    params.put(BaseChartWeb.CHART_PARAM_VALUES, "1,1,2,4,3,3,4,5,5,5,6,7,7,7,8,8");
+    return params;
+  }
+
 }
\ No newline at end of file
index d27b3042bc4fa4471ff62ebe3eaa0183d7de6706..4975a48e69213740b375196fc234b6cfa9e08c8b 100644 (file)
@@ -1,85 +1,85 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.server.charts.jruby;\r
-\r
-import org.sonar.server.charts.deprecated.BaseChartTest;\r
-\r
-import java.awt.image.BufferedImage;\r
-import java.io.IOException;\r
-import java.text.ParseException;\r
-\r
-public class TrendsChartTest extends BaseChartTest {\r
-  private static final int WIDTH = 900;\r
-  private static final int HEIGHT = 350;\r
-\r
-  private TrendsChart chart;\r
-\r
-  public void testTrendsChart() throws ParseException, IOException {\r
-    chart = new TrendsChart(WIDTH, HEIGHT, "fr", true);\r
-    chart.initSerie(0L, "Global", false);\r
-    chart.initSerie(6L, "Efficiency", true);\r
-    chart.initSerie(9L, "Maintanability", false);\r
-    chart.initSerie(3L, "Portability", false);\r
-    chart.initSerie(24L, "Reliability", true);\r
-    chart.initSerie(60L, "Usability", false);\r
-\r
-    chart.addMeasure(20.0, stringToDate("12-10-07 8h30"), 0L);\r
-    chart.addMeasure(35.0, stringToDate("12-10-07 8h30"), 6L);\r
-    chart.addMeasure(12.4, stringToDate("12-10-07 8h30"), 9L);\r
-    chart.addMeasure(99.99, stringToDate("12-10-07 8h30"), 3L);\r
-    chart.addMeasure(2.3, stringToDate("12-10-07 8h30"), 24L);\r
-    chart.addMeasure(12.5, stringToDate("12-10-07 8h30"), 60L);\r
-\r
-    chart.addMeasure(10.0, stringToDate("12-11-07 8h30"), 0L);\r
-    chart.addMeasure(30.0, stringToDate("12-11-07 8h30"), 6L);\r
-    chart.addMeasure(22.4, stringToDate("12-11-07 8h30"), 9L);\r
-    chart.addMeasure(99.99, stringToDate("12-11-07 8h30"), 3L);\r
-    chart.addMeasure(0.3, stringToDate("12-11-07 8h30"), 24L);\r
-    chart.addMeasure(12.5, stringToDate("12-11-07 8h30"), 60L);\r
-\r
-    chart.addMeasure(30.0, stringToDate("12-12-07 8h30"), 0L);\r
-    chart.addMeasure(15.0, stringToDate("12-12-07 8h30"), 6L);\r
-    chart.addMeasure(82.4, stringToDate("12-12-07 8h30"), 9L);\r
-    chart.addMeasure(99.99, stringToDate("12-12-07 8h30"), 3L);\r
-    chart.addMeasure(52.3, stringToDate("12-12-07 8h30"), 24L);\r
-    chart.addMeasure(12.5, stringToDate("12-12-07 8h30"), 60L);\r
-\r
-    chart.addLabel(stringToDate("12-11-07 12h35"), "Label A");\r
-    chart.addLabel(stringToDate("11-11-07 12h35"), "Label B", true);\r
-\r
-    BufferedImage img = chart.getChartImage();\r
-    assertChartSizeGreaterThan(img, 1000);\r
-    saveChart(img, "trends-chart.png");\r
-  }\r
-\r
-\r
-  public void testSingleSerieWithoutLegends() throws ParseException, IOException {\r
-    chart = new TrendsChart(WIDTH, HEIGHT, "fr", false);\r
-    chart.initSerie(0L, "single", false);\r
-\r
-    chart.addMeasure(20.0, stringToDate("12-10-07 8h30"), 0L);\r
-    chart.addMeasure(10.0, stringToDate("12-11-07 8h30"), 0L);\r
-    chart.addMeasure(30.0, stringToDate("12-12-07 8h30"), 0L);\r
-\r
-    BufferedImage img = chart.getChartImage();\r
-    assertChartSizeGreaterThan(img, 1000);\r
-    saveChart(img, "trends-single-without-legends.png");\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.server.charts.jruby;
+
+import org.sonar.server.charts.deprecated.BaseChartTest;
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.text.ParseException;
+
+public class TrendsChartTest extends BaseChartTest {
+  private static final int WIDTH = 900;
+  private static final int HEIGHT = 350;
+
+  private TrendsChart chart;
+
+  public void testTrendsChart() throws ParseException, IOException {
+    chart = new TrendsChart(WIDTH, HEIGHT, "fr", true);
+    chart.initSerie(0L, "Global", false);
+    chart.initSerie(6L, "Efficiency", true);
+    chart.initSerie(9L, "Maintanability", false);
+    chart.initSerie(3L, "Portability", false);
+    chart.initSerie(24L, "Reliability", true);
+    chart.initSerie(60L, "Usability", false);
+
+    chart.addMeasure(20.0, stringToDate("12-10-07 8h30"), 0L);
+    chart.addMeasure(35.0, stringToDate("12-10-07 8h30"), 6L);
+    chart.addMeasure(12.4, stringToDate("12-10-07 8h30"), 9L);
+    chart.addMeasure(99.99, stringToDate("12-10-07 8h30"), 3L);
+    chart.addMeasure(2.3, stringToDate("12-10-07 8h30"), 24L);
+    chart.addMeasure(12.5, stringToDate("12-10-07 8h30"), 60L);
+
+    chart.addMeasure(10.0, stringToDate("12-11-07 8h30"), 0L);
+    chart.addMeasure(30.0, stringToDate("12-11-07 8h30"), 6L);
+    chart.addMeasure(22.4, stringToDate("12-11-07 8h30"), 9L);
+    chart.addMeasure(99.99, stringToDate("12-11-07 8h30"), 3L);
+    chart.addMeasure(0.3, stringToDate("12-11-07 8h30"), 24L);
+    chart.addMeasure(12.5, stringToDate("12-11-07 8h30"), 60L);
+
+    chart.addMeasure(30.0, stringToDate("12-12-07 8h30"), 0L);
+    chart.addMeasure(15.0, stringToDate("12-12-07 8h30"), 6L);
+    chart.addMeasure(82.4, stringToDate("12-12-07 8h30"), 9L);
+    chart.addMeasure(99.99, stringToDate("12-12-07 8h30"), 3L);
+    chart.addMeasure(52.3, stringToDate("12-12-07 8h30"), 24L);
+    chart.addMeasure(12.5, stringToDate("12-12-07 8h30"), 60L);
+
+    chart.addLabel(stringToDate("12-11-07 12h35"), "Label A");
+    chart.addLabel(stringToDate("11-11-07 12h35"), "Label B", true);
+
+    BufferedImage img = chart.getChartImage();
+    assertChartSizeGreaterThan(img, 1000);
+    saveChart(img, "trends-chart.png");
+  }
+
+
+  public void testSingleSerieWithoutLegends() throws ParseException, IOException {
+    chart = new TrendsChart(WIDTH, HEIGHT, "fr", false);
+    chart.initSerie(0L, "single", false);
+
+    chart.addMeasure(20.0, stringToDate("12-10-07 8h30"), 0L);
+    chart.addMeasure(10.0, stringToDate("12-11-07 8h30"), 0L);
+    chart.addMeasure(30.0, stringToDate("12-12-07 8h30"), 0L);
+
+    BufferedImage img = chart.getChartImage();
+    assertChartSizeGreaterThan(img, 1000);
+    saveChart(img, "trends-single-without-legends.png");
+  }
+}
index c6e72df8451f94544b07147ef3e80d5147332a09..5bcf0fc19abebb30b31f91647dc01529083e0f6d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fc523af77c731768fdf7aae9b0e4b76bab93d64e..4c7e2aa39a3609e2673ba01a453139f9af727786 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f1907ebcf5321512afeb6495fabbe8db7413d974..1b95129ad952b1c1b25778e6fe6d9dcc2c75863d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bb80bea4153d799c8e8eecb4504e9ecc2c2c14aa..d8054dc9a99dbaf5c1e6f37deba0cbc23929dd1a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2387aba138f3f37966125516d4c4b1218024e7fa..fe912d794165f9d92476f452126c3ee9b57d762c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2820933f37a4bbe661707c1d7357beeadfb267c4..43374bd3d68008384c1847e548f22e7c503f1ca9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0dd552ed7534762704b2ee865f001a0fa3245cc7..7b6f191a81593016fb1f7fedf5a02653b038a5ce 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1d51c3fd775f56464fa20cc75f7edb63e47c53ef..df3b6f5ead03420712b5f8a448ed75e74836d773 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index de6c13604c66e87ca7a8aacde2eb68a63dbeacec..b58d1b6c1ccd39a90ba858f053700d4cbf802736 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5ea80d4561b57ced39032300d4f3612b31287640..39a266ec0a40f2e521efe7dbdd82ba95b3256988 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d2912ac966ff0f19797bfa698efafda94d0315d3..34d54f642a17b7d9856609b990b18af9b4951885 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 45f0bb3a78d4e61f526a92306a5a4b510ade4da6..1dc8be73d9894a1988f376a521b25cbc7e4570e7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 627561b4f4fe986745d03291e9654902cb0f6e2a..c8c539274a3aaa0ac6cc7443cab0bc8a4122ea2c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 03f278d83cc089f4fe0d1828549c1d0b924f9344..27caf4452c6df9ee15d735fb1513776437dd7875 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cae01cf902597142f747ee5fd15833ab51f684a2..9ec06199bd45771455dc54f634e42bf942456291 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b2b0328f793a20011db79f1ca55946c18510af03..4ade6a5b250624ca0111bf9974a2acfb84248602 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1bec355705f8ad526c85655685c9955e4a51a860..f79b1129669af5f0621f36617f7007d830973cb9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ecfe58793c419b0c62ad8426fb87b02385b8f4ca..776f1c6ed0a6e056ad0557c09d52f96fec6ec973 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5312ba08930d1dfaa34d3011ad127d746739aa84..d0ef238566f4490bc0c7c6351ce4a43a37cc4280 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index eed3f16645c7ce2573ad98cfba850a2d885db273..583772a50bb0eeebe538c0757c2c86a08fcb33e6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 30c3304cb22bdd6076667e204a2cb425e1779d24..0e980f3983d5f8839e2c95ec7c274d49c22d748b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 192854a08d545139072f6d38fd8422a215c0909f..5efec710ae8cf45469d01c03b975a2dc5f3d74dd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d673767c872925e842b87f711d6c7aa2ef711bec..f7acccd64c0a9a08470708a20ab7e9abc9ea418a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 02f5041d4b8df81527d8327b1ae203aa9d43f5cd..868464c7879dc51abb12ee78f36826bfcbac6a51 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c664d919f601a7eca2f482fdea4d7ea969d36316..b3c4ff799d1d437ec72d6f38a5eb85ba268769bc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fa997910d16c3fd0912361e8cdc95edd236ec265..567ce07c731ce74df82f04b1fd0ada375b2509a9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 99190fe2bebe847334ff08e7b7f32eeaf244f034..0eb01ed9b0e154632574e78c046b7e8223737ff9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 45369fd481626164a177a4c247351d7d7ce5c7de..260fd69a98f0884d414af01759c1cc7bc48084e7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3dc4bf884c5ca73d7208fe1b2c3f16bbadd668d6..b01e8b2ff96a70256af32fdacd2782d7b446eeff 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1031c88fd2359658e883295b47864ee287cf494c..6d03deaf019530a6a7631f61130fc34fdf7fab40 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b8c162acdc8f5cf5b139692e7c578bc091c16a46..4c1ee5e6cb1f6f0019b7005412bbcd37211bae4f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b84597ca2897ef8c68fba301ca2e2385ba7c535c..6d737b5370e69161252c6d106daeb225535eb72b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 73d2e9b893830169dbf3544766e8a8091f14073f..bc7d5e4dc3ec0ea273385ba7527979ded2f19b25 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7ae3f3bcda04551edf94f0293e6c164be7a8fe3a..4fa8af9d61c242aba2f42bc93dc54616a23e22df 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 438058322de7f778e4eb7560f1ff66b8b25c966c..db61eb27c0b2a4d41e9b40efb2f327ba601e2640 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c7ec1fec3955dd8d7355f05030e09b9d27586a10..4b347a5c149064103331908dbbeb740105411800 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5851586f937cc69aecd83d5a13c1c2db730f3725..b1437f662a1919e9a829fc0a4dba091b3637c07d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 90ace4561ccb3f208e7c405fb615a79aa3d6e351..827a505d00fbe9f2449def0673db31b6a901b0d1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 49670f559cabb0f66857fb90a8624edaa19711a6..da2ce307cd3f5f66d116c780fdad40e78ed3e392 100644 (file)
@@ -1,81 +1,81 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package org.sonar.server.startup;\r
-\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-import org.junit.Test;\r
-import org.sonar.api.measures.CoreMetrics;\r
-import org.sonar.api.measures.Metric;\r
-import org.sonar.jpa.dao.MeasuresDao;\r
-import org.sonar.jpa.test.AbstractDbUnitTestCase;\r
-\r
-import java.sql.SQLException;\r
-import java.util.ArrayList;\r
-import java.util.Arrays;\r
-import java.util.List;\r
-\r
-public class RegisterMetricsTest extends AbstractDbUnitTestCase {\r
-\r
-  @Test\r
-  public void shouldSaveIfNew() {\r
-    setupData("shouldSaveIfNew");\r
-\r
-    Metric metric1 = new Metric("new1", "short1", "desc1", Metric.ValueType.FLOAT, 1, true, "domain1", false);\r
-    Metric metric2 = new Metric("new2", "short2", "desc2", Metric.ValueType.FLOAT, 1, true, "domain2", false);\r
-    RegisterMetrics synchronizer = new RegisterMetrics(getSession(), new MeasuresDao(getSession()), null);\r
-    synchronizer.register(Arrays.asList(metric1, metric2));\r
-    checkTables("shouldSaveIfNew", "metrics");\r
-  }\r
-\r
-  @Test\r
-  public void shouldUpdateIfAlreadyExists() {\r
-    setupData("shouldUpdateIfAlreadyExists");\r
-\r
-    final List<Metric> metrics = new ArrayList<Metric>();\r
-    metrics.add(new Metric("key", "new short name", "new description", Metric.ValueType.FLOAT, -1, true, "new domain", false));\r
-    RegisterMetrics synchronizer = new RegisterMetrics(getSession(), new MeasuresDao(getSession()), null);\r
-    synchronizer.register(metrics);\r
-\r
-    checkTables("shouldUpdateIfAlreadyExists", "metrics");\r
-  }\r
-\r
-  @Test\r
-  public void enableOnlyLoadedMetrics() throws SQLException {\r
-    setupData("enableOnlyLoadedMetrics");\r
-\r
-    RegisterMetrics loader = new RegisterMetrics(getSession(), new MeasuresDao(getSession()), null);\r
-    loader.start();\r
-\r
-    assertFalse(getDao().getMeasuresDao().getMetric("deprecated").getEnabled());\r
-    assertTrue(getDao().getMeasuresDao().getMetric(CoreMetrics.COMPLEXITY).getEnabled());\r
-  }\r
-\r
-  @Test\r
-  public void cleanAlerts() throws SQLException {\r
-    setupData("cleanAlerts");\r
-\r
-    RegisterMetrics loader = new RegisterMetrics(getSession(), new MeasuresDao(getSession()), null);\r
-    loader.cleanAlerts();\r
-\r
-    checkTables("cleanAlerts", "metrics", "alerts");\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package org.sonar.server.startup;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.sonar.api.measures.CoreMetrics;
+import org.sonar.api.measures.Metric;
+import org.sonar.jpa.dao.MeasuresDao;
+import org.sonar.jpa.test.AbstractDbUnitTestCase;
+
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class RegisterMetricsTest extends AbstractDbUnitTestCase {
+
+  @Test
+  public void shouldSaveIfNew() {
+    setupData("shouldSaveIfNew");
+
+    Metric metric1 = new Metric("new1", "short1", "desc1", Metric.ValueType.FLOAT, 1, true, "domain1", false);
+    Metric metric2 = new Metric("new2", "short2", "desc2", Metric.ValueType.FLOAT, 1, true, "domain2", false);
+    RegisterMetrics synchronizer = new RegisterMetrics(getSession(), new MeasuresDao(getSession()), null);
+    synchronizer.register(Arrays.asList(metric1, metric2));
+    checkTables("shouldSaveIfNew", "metrics");
+  }
+
+  @Test
+  public void shouldUpdateIfAlreadyExists() {
+    setupData("shouldUpdateIfAlreadyExists");
+
+    final List<Metric> metrics = new ArrayList<Metric>();
+    metrics.add(new Metric("key", "new short name", "new description", Metric.ValueType.FLOAT, -1, true, "new domain", false));
+    RegisterMetrics synchronizer = new RegisterMetrics(getSession(), new MeasuresDao(getSession()), null);
+    synchronizer.register(metrics);
+
+    checkTables("shouldUpdateIfAlreadyExists", "metrics");
+  }
+
+  @Test
+  public void enableOnlyLoadedMetrics() throws SQLException {
+    setupData("enableOnlyLoadedMetrics");
+
+    RegisterMetrics loader = new RegisterMetrics(getSession(), new MeasuresDao(getSession()), null);
+    loader.start();
+
+    assertFalse(getDao().getMeasuresDao().getMetric("deprecated").getEnabled());
+    assertTrue(getDao().getMeasuresDao().getMetric(CoreMetrics.COMPLEXITY).getEnabled());
+  }
+
+  @Test
+  public void cleanAlerts() throws SQLException {
+    setupData("cleanAlerts");
+
+    RegisterMetrics loader = new RegisterMetrics(getSession(), new MeasuresDao(getSession()), null);
+    loader.cleanAlerts();
+
+    checkTables("cleanAlerts", "metrics", "alerts");
+  }
+}
index 002b2abff9a2f550bf2221c12e75827286f9190f..8fb696d0d3d5e6e0e6ca94ea9889da22bdb287fd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a43aa3403b1f79f0353615c4890165726e4ffd35..f1bf19aa25d90836309bb35b09ed07fb5cdde25d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 83e17f882eae17ea50168a91bfd2da63044f204b..81ed38316ddcf9b7d461081a5a48fb03ba514194 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6914c20cf8055a17e00e49d768452fe724da4e49..81fc553cdfb1f578f78a19eb7e897c18967b1d6b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dbdf030aad98c7133f1207c27fde4463583c27fd..8e9d9653bb26211dd54c6df42eacb1cf9808ce0c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a61d7c5168da0f6d559183b1fee4234fd5634667..f4d85b8d4582f63fd1f2bac47deba826f841a7d2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 04b1172e27b3499847da19556a84c8bf5415c388..787af528cfca94349fbac62fc9db5b8a61e34a8d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index edc78acaafaa78e83de4b99766fea2b6ededeb52..06c4ea36332bb9210dc326cfd1d57d4559fb7ca9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 69584d249f0cd4b4b288f01c96cfc1669a605c53..b05a115d532e02075870a1a3412d1ca190d6e50c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d1603ea5674e796dc5eae7483e2e93f25f8c1e37..1702f6f23dd81d8498bfbd6047561cfe9393ee5a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 604c28f01158be5f8fa87fb645a05631d002ff1a..59bbdc1aaac7c3a1a5d93eab1f95fff2af742437 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b20846371baca205aa457bff22d27f9c1d84efb1..8e5a73806c21ec7fd7c79dd8787098902c38ddfb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index aaaeeab9f1fcbea96b3cfa2b922e7888e779d720..7661e65cb99bbd6825c4c8b8ce758d1867148ffe 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0d7a84d70a8d03f17b46fb0898757af750fab668..4fa27464295d2cc585fab5896e79f0a3a8f0d12b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 63fde3442cf260c53335277c290da7f9dda533b7..399cb269c8d31b471775e60e515daa33ae2cdffd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e7e8f19fcb9c5a870ea05dd23389bfffa918c5d1..daf3a8c85c85ce30620a04e69f0d7ef1054e8fc4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7badb42ea43bad61ada38ead562726627c96ca61..6e5794e78bc5bec7274bbdbbe3817635c6d5158c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cbadf4d6a052f6c66399663b3f4b5f08ecf465fa..4114818c0e77a52af1a67780fea78591f5d0b383 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 322a6d3e640df1e71808f84d8bf36a21aa69a932..521d53804dcc31deba76d5188df65a6e5ea2df8e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fba1e56a8d1a27fd50074a1e3396e5219c25d28e..68a2db44ec0b63f96d0aef92dfd6c4f61913f297 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3eadd2e4862f33973c36df4ac1403ca6238bbe76..2a756c52a0bbd39f7ca51667de490396253b5489 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2f9c682d1a2e068bc094fc0e5272e1fd98659fa9..153150514634adfb2a6648ed08cb87a420046508 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 397a5de6fee5cdb4e56dfeeef7f67c53d17cd587..8035f90ec2d30315c36d719c5d878d8ac8ef4c4f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c80f59d1075599a61a1cbc68bf382c51ec9a0f57..b9355b88a489baea691fe1b12d1b5606a4eb94ca 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 29f0c0116edc6f7be40a237250cd16c03a067af5..5b4aac737768d08043c9356787eac8c58d76ee19 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f41ace8aea13849435feb81141ab38c4e2a99b18..e22e7ade5b297f14182d85a2eda9203c2419a800 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 469b46b71a801672a8ed56922e52e25c995682e4..22f6fa45a3ec47bae4ab84e032667b84428c9fad 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9d627c641ce04ed280a8ef278255a586c3bf035a..d2a75d9520878f0e4d66e10f54924411232d5aa2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index eb8e4820e7ef6bf4467dee080b11c92689f89c3e..4a414c39d17e4d4009e501100eb8cfe5710d27fe 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index df1bfebcd79048af8b35ac41bb26115bbdbcb104..4afdc7196e6965e499fe807cedbd71bab49f9547 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9c657661653283696be124b4a0c331cf738a4505..9be2fa8213f0fe1d4c06bae00aaf56b9eb360877 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f902ee403b713723562d8dc887b00577b2710cfd..b5624ccd561d2f2c06b3051993b91217873fedc9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7b829f9285c95be14faedcf5ec02ee17dadc2c5f..a476ff885fa3f41d2f3114428098f43f3aa3cd78 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 31369bfafff1618644c92781faae1a4f81a44df8..36eb1bc216446efc6d3353ef6046e2cff278831f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 802e6900159d988c1daf1096aab748f61beb9c74..b7207a1fb5ede48d58ded26d1fdc9dd6e9a7d40b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5ce74aa0fe9b3729b4c03aa3f46a555ba8783b08..7d6c100c53d6954678b7a56e29c8999484acde78 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 81d9b1b0d505e8b0409fb55e48872bfafc0c335a..852305ab37c5bb16944e80aef24562502330a4ad 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bb58954f779cc297457923f3a307c4abcc61ebfb..d1e92e16ff41705519a707d826f63c703b1a2342 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5444d2aa5bc90c1f569b0f9722db2c4a0a1c9735..69d6128ccf1199cf413255e706bd0ff412340f68 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 90959f8ca7499bed81234dde628f774468cae826..98a7e5438561244c76bacbacfb0ccbcd5b7000f9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f9779a029e6004355cde82b0003f145b6cbde004..d51ff6a9c39a36df421ebdc83b4aaa9986e1f783 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 86e7ff6bd63180b67d8f55957b4955ea566dcd21..7b77696c6a023f50f3a613e285198c37e3874a2d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7017c9bc8d825a4210a17b6c14b1173c5e48633c..37020ddcbd4ff6863fcf1a596563377a5a8d6e6d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 49faa0e6aab28408cfadb58e88c476c647e06104..57093055ff2f069a9e4bea4bb649fac1ad2cb6de 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9ee58e5e5e5c59522a78172b8fe8f2699a99a371..901d846136e323094c966cfcef2ba96e51513aec 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 327abeb9e8a255948c0077fd781e81d9d1c24d19..2be2a54b79e5e18e91a66e5208c9f77004bf8bd8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cc62b45dc436e5f15048020ab862b7f723ae6154..e7e23e85cf841228e57bb396826f48e13aa6b8bc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a1adb586ed8d64459309d5edc47bf49bcb8565cd..7fa7fdd0a1d017c8438769b9db1591a6485716f7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 34f6f2c6b24d2ea0d6d8f2a9d18e91b6fada3053..90c4991019c92aeccca1285e1066848ec09fe5a8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a66753a436e36dc21caabcd23b9903c9720c8c82..dedb31442e61bc8aedce0e135ff47b3f30c7cbc9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 665a0c7e41675c9da48b4c38605d0260507a5b79..d322a141cddd253fd94f305d686bd72ffbbcb007 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 12e6324f305017680660d0d1cf362387d04541f4..37c859db83ac791c7fafae0d36c1e4f94b513405 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a0616a1317551e903a3ed608c4b508bb71c9b6d4..bcf8f276bdaa217c8d310636728f54023aa89994 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 95a4db2dab016cfffd4d23b4da6e9a01108ea615..07eb2113d0e61a51a18849153cbac76b653118cd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0b3cbe7a20cb3aa0388f873cc8a5bca2807dc368..eb89d482d7ea3aebee23d4868b91982f6e966f37 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 490c321a8c042d43c2c25a6741f6d171cf28863b..2c173359fa028cead27c69f5ad33ad9e14841a8d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1d817ee11fc664db6668a419953708ec8107bf31..a583fd949756d48e48f00333d5d3fc9d8f2769af 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 304d9991a5838acfe94cf8e07f60cd0d11037afa..d962cc112734ffef3fe741c094d1ecf56b39d18d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 77add8235a4f97aabf9b35c2df924e36df8e987a..86bad4bceb6f0ee09191ed522b1b03b903b622de 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3cf490600a6b6626febc3180724af9d6d7ed2ddc..27a7bcbfc1e5e8d9e3862843ff8ebf604cedb3cc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3314b5f953be4fbc16bd31f8278bd8003d9855b5..b8d14406a2c0122baea434db527216a305d434ef 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 802a421c35fbe2859bf9cb8aecd93032c3adea02..3ac2ef79103594434cf0532328b2819f92a5c344 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1fa85a44d0b54a6009058afc5e1ebe148dfb5c3d..f20026c9556e4193303934e8af316563272a00ed 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c9b2e9cabae22d458158fd4406385c1b4425440b..2ca916bdabd2fb8744e98a32eb7a9859b153114b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index aab0d1ba237af62c3c5e325cb0efb6cf4ef4e812..8e6b51b47147d82002b3aa9483f6ef3f0e472ce9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e079e427057637705b79a0f6eb17e4b9c6d9e150..66c82baa972f3524634142fa58626e23baafd07a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6c2a6e6d43e5773969c7ba52783d650410b8fbf4..4d8ba3f215bb0a775bc296fb08e45248bb3e6df3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9e71cf712f03c4b0815058d5e6a936c0f84f9ecd..74fe2429e5f544b13aa6edbf43beeec5ca1ead0d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6e1b1e705a7c3effadbf223ed69e7229dd8d3a21..3ed753159a014d6c8636fd415f31edd87aa7b44b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8508dcca691f07da445bfa50b84f189c91ce895d..66bffdbc02bae5c97fd79384ab4e84dfd5ce30ef 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b71bb5ffd25bc00108d0d2eb983b5f933986c7ba..86c8f59978635399e3e4ff37f8b88778761e4bb1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c8fe1b30d861dbf936fbe90723f2dff5c64a2bac..1d9a18cbf18731e134a2e5c4444903d9e958c34c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index cfdd027b538d9916f143f6fb48030ec4101f8715..64b36b5e97300a4981c1046ed8aa4b96b79f3f8d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c33e2cdeac4cc03c404c6684f7c8f0950b4692e6..2269f947ae45dbea9ec676e0cda8db39c5daf01b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 885c3ca05d2524ca57bc990e8b4bd646be4160c1..518ca01772b1d394b4a4c9ebf43affbd930ac46a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1731d094f3c7acadc78a2509800a94bdf3e704b3..66f7f48b2f252c37c92baac44addfbed191158db 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5ef13c813d447785ed838278b4972b549fecc916..bf5d0714a0e0ec1b6e2120c971e39499e13d015b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 932b23644b43dd9cabce9546cec076f35b46e5af..849b10c4ecdb69844c253274fd40fa04c751f732 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9fe3fea833855dd85c8762e4d902c033354ac5a2..24dfa9240f2bbbe78cfcb4ab8ce64c0b76925920 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9712fb8dea9af914314fb7138b6f1b92d5f72de2..6acf31ecf27057764b7c296b5565ff5e937259cb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c27defbd260af345d3044412f2db7d733afdb2b8..56334ef3e11fc21381bc4590e44140fa325453b8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 10f74336a1c7d6712d0dfb0587e664cb7d9d3d78..095b4a26258e1459b9f44c45db0f75ebd1a71411 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a30031de250179c3eeeac3b9bec4e48b9a88f73c..5f0062b40fef998cef1024b319d643402277f87e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 297dc6aa311a60fcc6446dcff2b06589ff29f8d1..237879579e5e6936aa8454a59d90b0b156b89106 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 87e64bf27be8263fbf3b3b4e3fe53ce843155619..d4b7ed64bf0b06766fb68df2e5624c9ff55086aa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 59c9ad20b5b04aee5c5426a2558853960afc688f..cff651bc491560c3466f6724154ba750fe8c19c2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index baa54880b3992610016baf4ec85b80196cfcbf34..61abb7a0357820d32a664077d7d5893cdd4c4b97 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 847cf7d54f329af9584a709282bbf2839cbe3950..728e67de9dd481039796b4432f95d4891f9ee85e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index def19bedb2d54285da5a4f5658d6b6ebca86593d..17e529fd135d39e67a039494905f46112da2319d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4fd09f009815a1dda74cf4a1a7559b55fc7965ee..6d43a7f02a36ebb53ad5f2c5d6677172888d39df 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index aceab76bc8bbab796c4282569ee1b3aa23ff0f33..6b197c0e5e07eb837a9e2628ebd3e718e8c2182a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9091ce87e9d57b59088cee692e3442227f7faef4..37cdcdb725da11416487959278fd15904fdab3c3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 940ab4aaf4b5367bb924a725e80b915c1be32306..e4c2da9efccba7f53a9bd9166fd35cc255531079 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 78264e00598aad0264b885007f038656a4f03207..9db93057c1acc2e75ee338710db7dc70cc1c3cba 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4afb020958032905655404c44619b8a7d9122a90..889c2f3702b79bab7a24e53dc5eeff68969828ab 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 221684b9fa57cf696f4e5948ac1199d24a8aae5c..302d78538bc5d0f6217af056db0d1a7d5fc0c58a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 88e03987f0d2233db38d67cf430ae820915fbcf3..d331f2be923e04ea6edd4ee5674117d5cb8cbbb8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ab29167ae65038cf3b825adedaeb93c79f653e49..b434cefe23a33c5f71f5d300c48c5ed9bd985085 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index df4152c32b22068df93fdbf029602fccb9610353..c92be0960aa5a49006c5e58f82324d4f0b94a735 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f0cefec7c38f8f8dd9ef2fea229bd29d42cc442a..63ac2f6336f7453cb4ba130a1c14d9676b05a486 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0afd4f28c5582454e1e098a63ee45afb831865a4..d3b8dc0095f9063af137e86e881a8d5edcd15cd3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b2beaad138ba55d8c23a80ee9c1fdb216eb4b792..d9349f08212e52912eb60a44431a8138de48511a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d1f21e42646b47fadb27bc528cefe0446b7e665d..1683eba4dbc706395f422bf8c5c5f04f3a306dde 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3f5fbf129ccadd796681b8560495d7ef74eb0554..6426f58d78bbccb7a8db4252d14c8827c1408760 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 370fe02c5338e8f3855564ec174d6e94673ffb28..c814642196a1f80f246a1e726a700d03c2b8eae1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c7e2176029b7ac6c27240900e78df82c5153ec02..105bdbafbdccbb7ad65e22adb23fcb30c73accc8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e47ffa144d47d46464ceb7e4c46c29a7f1abcaab..a863742aaf1c44baaf806e3a3f2fb339a06ae915 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 34c8c795f3cffbf70c56a5f144cef1d6aa15cac5..94cf646b6c941c7d039cee6524a240ecc9c470d7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8cb372d284cec1e21e0e4d9cd27666c9d3dd5b6d..d85796ebc551ef7238e04c37abb598a85810fafd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4ceb4443aa18982f5fb33f2c87400171f359cdc8..923830480e4cb2f5481ef950e91609a2db901bea 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f43200604d8636d04c07427e1c6a20d6726f77e5..29e4672f51bc0481e875a64ae884450ca66c8809 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0126452bfa71dd6620e784afa90502c528ff1997..5a3df918436a5dcd223366587a7cd282dc2fec57 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e6d84d6a1f1deaf0700757d21d55bea145c8d437..b7aebd57ca18edb9b2007e2ef2d667ab1d603e62 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7d5f10601d5122c2d447712e89aad82b7afbde82..65e4447c7f2067a28ea8c7da3f9ac2db40d638c9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 86c3eb377a4d4e403f82236497ac5887cba86f2c..b3448f3154eefb594e7a085fc3bf2091780c9c4b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b5dad4332599ac3e3c1abf4bd60c67d0052e599f..27e25081a526b1bcaa0e400073f6a64d7ab3f99e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e2181170655e95c5de3475e8fa6e24b29aaf5d0f..c18fc3e053745d013bda8728dd3c727571d9ac8c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9c3e1e3231a62a32de4c8f20a7112452502d8574..1e8bffc023a160e2e1b5fbce6f40b2c6f2225fba 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3e7dfdbe8092844590a0313768a72af31edba9d7..f0c495072beb1ffaa9e5ea47e355b42ae208585a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6791784698458c90e164b371bbd96b25aafe70dc..632080401db2370dd9f903d0283c3d53cc6fe8f1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 62484b1c17e337905b8ce1e3a2868df78ab07fd0..9ec9958e3ec4dd5b1ecbedaa52c528f7490702b9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f11702f587d28b04e3795e4ce921d1a181fc11fe..b1d64eaca7b13cc4a961320c218defa4c9bda343 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 314389e8fa44c53565382f7b797eb55f83f33b01..5098e0a864101e7382d6e0466743ffff31459e84 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7679100cd56b24cd84280a0d55003c1f7e9c6160..8327d9d8eefd62bda078d57098b9332ab0fd2158 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 07ede19e5db3d86f8ea2f75606eedcc90465e3ef..5d64405841908be7b8ecdf0e6761ee674696deee 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6870cde0da863a0de6240357f043b1f3f04e6423..708d4836639d4cb27e2b11efe0f3c83ad62b8e0a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3f864877549b6d32e1a953bb011558baf550d459..0a745d65a48b1add8bd76cc984a0c64156c51d9b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9ee0569b3768e5d082954a95047dee6842355d8b..5c945ce6205e8ef53f3051c6a1d0800b9b99db9f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fd86599c1069c14aebe8c7048477bed3f3d217dd..9d4a6a67c855138c74f7fdb9b851954cb8235881 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d1d2921d10caae4847145a5419a2297073eaabf3..2a1f9d4651453b06c837b79ec14df0c0fec95541 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 07c6a193f100a0d4c9b563938c8eca6f3b23f644..316059671c4f05d4a5352e2b1263af154dce9619 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8fa3a95ea9de7cc4185a115ee4507bed97243879..d4dbbfd2d54db30f49f29ea026e8a82d741233fe 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f66583fbe9f9c18039f794b0cf4d9ece7cd23f3b..749870393ce1dac50f87d2d017e1f7d90d9204c3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 345fc109cc3d4f06f6a141ee1b9cbedb086edc62..9189b4c283b179008cdcaaa67912de91a08a420a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6df1d4d744b3aaf8cc66c34c66a50346976684ce..aad1808a5f18802182d3c1310a6da7eb2a97f99b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ee8fc17f77a390d7a76b7251ff3fd745243f0eb3..b8f0b31935631a651735306ec4bdff256beb6da9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c639d8b331a461a1bd712b6884f224d414786bcb..9407dd776cf7477738284a97568525c05e8c71f0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7ef61cf2fea0cb241487750ffe8609170411301e..6b97ceae5748f078416abca0746812bdbaf0d9b7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 181ab9810b4be7139e3223607cebbf237211cc3f..027b59e0156999c075d26c4ab990162667aeee0b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 7967a348ce54bfaf4b5f9673e00509634e1c1760..e3258eb1c3ce72d7cf6fd83095c5e5deb167a536 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ef88ed16df697f472d473770c839b47fdbe08eb0..37ae59e6a71de84c61ebb98b684541996ae508b5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b703f725c891414e796d76d4e6f87e589271a400..a7997a3c5328042a691a9297a1f96758fb579624 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2d79d662640db572c6ea59b670f1179d83051217..d4c9070fa347f67fe3c223fd53b69e2938ade706 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fc859009ea06e4fece92c3c6268c24dcdb57cdb7..67cf0e2f6cbdbc480e4dc08a78c97e975920a764 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3f3beb188cfaec06fcb580f5232352ff3f8f59c7..c3069be8ff71c8b167c4b85f93ead54748871525 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1d9bd009e365f146197200cb022bcc2f61d9ba06..321a468aa75d6a3de4b772c073f1e29d216cb8cd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 04fa7c4ea8f0d74b843f19534308217048247b42..c965edef6d62d4dfa424534d84f94426deba19fc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 78791240c1ec5aac977f4d06ae75bd6a24d74b6e..daef570e4990067eeac4d4b95232c6f2f3ad936a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3676a927a301d4daf1be5b589e429304c074a38e..1e21bf0a8604800a09c844d10d42780cff6f2974 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index baeba6806f71c767d4262e12f07f1c09e2f738c0..b1a6edf1bd6b897fb13c7d776c186d109dddb906 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4d3a3161539dffc4022851fd929a6d914ee9b270..972cc8d4e34ea2312000d1a0b5ecb169e7bf139d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d52b08f3fcffe6be1ba8faa4ab357d77e95d0102..999375228d425240e3cdeef5c99e0053070bc566 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3484e4d03cb56b2696ff5a6f7b59bc0296c9c30f..f993b14321fb3bc38f6f283e25fb767e717a24b0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1288dfc9d2ee3da330cf9eb16b969b019770c3fe..0fc6d244d572bb705a4fd6ca1a614d05f3da8d82 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8119bacee8cb4dd2e9bf6c7e62b4048db936a6ab..6afab73fb9d90bb3cdaff6ab112a7b16d17424cd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 13ddb93409d48db0408f6aa50b7727ae966ba40a..ccfbad6bbf326139f50e7e1491dfddcfb6eaf4e4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f91b8af085dbe12c87ece3b6402309d82c51cfe4..76735bd0bcf22c5cf14f257ea586383fe18ef65d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bf8b19db704db2f6a3c8127c01838c0a0b226b88..c48ac4b0ea0d69f2a7ea1e014f02ef09f07c2a19 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index adff1c0f2db842202733baa5007665edb6fc248c..11bbfc72c19160b6a64ad165d415bd240b82f90f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1d40609208e73f313202820599d5050c13bcf5e7..9bda442bb4cb513d2450b849cb60e07bfce61e75 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8a7092741a70e3be4ccee0a408a2a70810791f7b..008eddc2539b19b639c89530d54178ecd8a2c06e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 123e94583c1762341d6dc487996b7a0bbd2f5493..65af95a3c3b1a7083a612046ad6df6d464714c87 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6d688870deed90bf549bf7595fb6a796d881fed3..d3b0917de241a1a487fc20fa5074dc21bc8b1d6e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5efea1ca8411d6e059ecdb257cb77c02455220a1..2659ea1286fdec2d04276d36776f49c6f27b1910 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bdb9db20e17f34e160119804a1b9e225657b1c4f..e322ac458f283aba5cb7dc6ad60dab96875131cf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9cb3b12f56e8033f4f408bc912d1949e78b099e1..4d9c391f7d4b2854661f9d1e69dab47cf381a22b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 829b174dc4788802d1a0a97307978d2e9cb10667..3379f23292082a586c35adaec8724af40106c2ad 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 16eb4aff98dae47318b845f18213e5872c9479a0..1cc92edc10079d6db04099dabb5d8c4e72e04ff1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 08a0ac26d879a7584d108be0a670144def6136f3..dfd0769cdf4bba26c525ea5b0ab489dd92a8ab91 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index bed74add09a58e32c4a76d9f1708ea48e862f99a..b3a51749daf9243dd10b5879cd38991678ecf4d2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ece84d4e2b317f3322086c31db59d3306680ae3b..a97d7a45cca876ccf225f9c85988eb88955b03e0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 18c297b22cb95a8b4ccfb6042e5494121510c6bd..0df77ae74fcf5ea2fea40b04b25175807efba3ec 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d4c74cdb08b4384c62d054091b2668f00e788703..741347a33bf0be460eab9b75805ab40ee1c9b5e8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b81c6dcbfa3804f712612d8be43ebb36222fd099..f7060438e8af69f036a0033a15560a3008135cd2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 48cd7636977a1ad93a0b07a6ebe7355815695b16..2dce64af80380ab90dae737835cd62b62193b607 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5546dde1910aa6166d1f09849ba69ff84804aaa9..1794466a5e2d6f137d1ecf3ef5ed5b4d78675564 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 4646b43ffe3384e1816a5f3f26a75056fe73f129..76e73b8832d3e512b2ca82e1d17f15d48711d50d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 291c3a00d6dd802fea5e0aa2c8412a841fb9d8e2..b19568040deac1d30841798853e03d2980356a0e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b3a4eb62270875969f273762333d366d9f28c892..332d1eb966bd47c30c56b598c5f5f989e4b2081a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a466a51548415c81a270effdbf28baafb3628f2e..1cb9a9b1dfcb77fd3367a9a1ae39867b4f2db225 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 01eeaa933843ce74cae5b21886f48ef9ba4f7d16..3b9690dc43d6fbbcbf6f5f7e1841a8faac58de67 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c465af21b5e2d57f9460fd6f5b2cb6aae0564187..9d1c321648a37a61e08f313694f4bf68b0d491ce 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d55babe08317fbaa4d652c65f5f6e63ed9043e75..0c9b7484cd5e23348eddbb62add2dcabaac2f810 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 66e6f6e3b2928cd9e19d27e463a945e720b68856..4c1e5cc15f2a43f461597b6351746981f5baf09b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6581518d4bfac6b559d56e0d769dd5ff510524ee..6d9b506bbb42866b6d0af5003b681adac9b44803 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0d28f9cd1e1c24b6c9b63ab12388872ded854a41..cba51079c5810ab30cbfd1ed5317920f57c6d47d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 92bcd40f30fc06037be969e931e20b69c9dc4069..14ed894a2777e90fa05e24350e6e61552ca8508b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e4ac4b6844504ef8a9eb950fe8527aa91d86fb2d..6f93db0171c028bd79a6d625fd709364ae21aa16 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 51dfc9bd34b65e04d487441c7b906006001fd90a..710296c201fdfdeb0f4c41c73f2a7e1af6c603d6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 236e80a44eb178955f61d969b5da2774c647e6c0..cd20be13f04d08159190779ec3cab96caee085b6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 633dbca9a17e8a454f0c6e4933150468c3cda433..c0d51e181916b210081fd21b1e5d0a724f394992 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b2e1f16353ff9df3dd37fd1be25791b2d5f3e0b6..ad60316a29f1ea30fed312d5be959c08368fadb2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f29462123d61fa8ecada4523495840160ddfc6b8..4978ff2d73942b72bc1557b3febb337172b96145 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 881a113aeb6acf89c78bcfdc9164e156ca5470c0..818ad935c3fde9b626390ca9a8780f73e71e289b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b96defeba12d843b877de43e0683886808b36c1a..b2d47e09e36cc2197c85a8120b7f1b90a744a8f3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1ad4d090a2aea60746e0bb8caa984b60efb2bdcc..cef3497e56d889d8ff525d4388db982cfa147a3e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b5c19029f0b898047b392653f16e46fb0d9744de..4fa2314fa46285b8d3dceb55097ffaf3bb63b2a2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ef2e1c3aaf016bfaf5c50a2debf5e8ebcbb7f40d..d14fc150b381c598316faf56f4dff4668f569f5b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0eb4ff65fa7f04e84ff4d735d3a04a0308c9895d..333f78a47038bc45f3de459eb7181ebcf30690a9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index dc2391e82323208e6571110518e4a6e12356e1b9..7a920dd3ec3e276822b0551b03aec1b8c4d10e02 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 9ffb0de4b8c848da0ddbfbf3e3aeb807a2ac0256..0a32fb793f80d4d6881f051352dd51aa498bf356 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index acfda91f3e55b49f022d01fc2d6c62087bd4df21..ef98b1a58e960352f4ee355eb1b1af529f919d2b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6f75b766871f93b700b791be96a79ee4d271bc45..d2743dfee2f55115e686effdd09714f35486dfc6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c6936bc56a5380eeb3af272c9eef55c11ce60f17..5be4a31809682877b2a140ee9931fe63da077072 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b97d71c216f7943ec70956cc75633f1d1eb83055..857d0a936dcd9bc9c6aef4ebac970b9a91911185 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
@@ -35,7 +35,7 @@ public class SourceUnmarshallerTest extends UnmarshallerTestCase {
 
     source = new SourceUnmarshaller().toModel(loadFile("/sources/source.json"));
     assertThat(source.getLines().size(), is(236));
-    assertThat(source.getLine(3), is(" * Copyright (C) 2009 SonarSource SA"));
+    assertThat(source.getLine(3), is(" * Copyright (C) 2008-2011 SonarSource"));
   }
 
   @Test
@@ -43,7 +43,7 @@ public class SourceUnmarshallerTest extends UnmarshallerTestCase {
     Source source = new SourceUnmarshaller().toModel(loadFile("/sources/from_line_to_line.json"));
     assertThat(source.getLines().size(), is(15));
     assertThat(source.getLine(1), nullValue());
-    assertThat(source.getLine(3), is(" * Copyright (C) 2009 SonarSource SA"));
+    assertThat(source.getLine(3), is(" * Copyright (C) 2008-2011 SonarSource"));
   }
 
 }
index bad185a6b7912f5ac0df3ff4afe0cac3ec21f0a7..d900019bf72dfcd7c2c34c7cbc9a298c8baf681c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index b070e5b5d6e7bbe2d94117a25267a192ae43a968..ef5f03afa67a63d6a63e44a010567a9f8a57b98e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f37add54159a4dcd958364db3be3fbf6c9f5887a..0f1e3094e9d65f62509c649c65c8452b5115603d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fd83fcca74bc4c2a3d45250a668efad87c6e596d..614ed46b79f0438af0c9df890e699cd1427e969a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c4c7ed0050917e4da3c32158b11fca12dcec26c6..04f3ca9bd64a08e5b27b9051d5f8f8a1f112212e 100644 (file)
@@ -1 +1 @@
-[{"3":" * Copyright (C) 2009 SonarSource SA","4":" * mailto:contact AT sonarsource DOT com","5":" *","6":" * Sonar is free software; you can redistribute it and\/or","7":" * modify it under the terms of the GNU Lesser General Public","8":" * License as published by the Free Software Foundation; either","9":" * version 3 of the License, or (at your option) any later version.","10":" *","11":" * Sonar is distributed in the hope that it will be useful,","12":" * but WITHOUT ANY WARRANTY; without even the implied warranty of","13":" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU","14":" * Lesser General Public License for more details.","15":" *","16":" * You should have received a copy of the GNU Lesser General Public","17":" * License along with Sonar; if not, write to the Free Software"}]
\ No newline at end of file
+[{"3":" * Copyright (C) 2008-2011 SonarSource","4":" * mailto:contact AT sonarsource DOT com","5":" *","6":" * Sonar is free software; you can redistribute it and\/or","7":" * modify it under the terms of the GNU Lesser General Public","8":" * License as published by the Free Software Foundation; either","9":" * version 3 of the License, or (at your option) any later version.","10":" *","11":" * Sonar is distributed in the hope that it will be useful,","12":" * but WITHOUT ANY WARRANTY; without even the implied warranty of","13":" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU","14":" * Lesser General Public License for more details.","15":" *","16":" * You should have received a copy of the GNU Lesser General Public","17":" * License along with Sonar; if not, write to the Free Software"}]
\ No newline at end of file
index 5042d43778e8d32b538c17157dfd50516a79bc1b..d804cadf7d5eec2a43c0042a49dd5f49336b0836 100644 (file)
@@ -1 +1 @@
-[{"1":"\/*","2":" * Sonar, open source software quality management tool.","3":" * Copyright (C) 2009 SonarSource SA","4":" * mailto:contact AT sonarsource DOT com","5":" *","6":" * Sonar is free software; you can redistribute it and\/or","7":" * modify it under the terms of the GNU Lesser General Public","8":" * License as published by the Free Software Foundation; either","9":" * version 3 of the License, or (at your option) any later version.","10":" *","11":" * Sonar is distributed in the hope that it will be useful,","12":" * but WITHOUT ANY WARRANTY; without even the implied warranty of","13":" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU","14":" * Lesser General Public License for more details.","15":" *","16":" * You should have received a copy of the GNU Lesser General Public","17":" * License along with Sonar; if not, write to the Free Software","18":" * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02","19":" *\/","20":"package org.sonar.api.utils;","21":"","22":"import com.google.common.collect.Multiset;","23":"import org.apache.commons.collections.Bag;","24":"import org.apache.commons.lang.StringUtils;","25":"import org.apache.commons.lang.math.NumberUtils;","26":"import org.sonar.api.rules.RulePriority;","27":"import org.slf4j.LoggerFactory;","28":"","29":"import java.util.HashMap;","30":"import java.util.Map;","31":"","32":"\/**","33":" * Util class to format key\/value data. Output is a string representation ready to be","34":" * injected into the database","35":" *","36":" * @since 1.10","37":" *\/","38":"public final class KeyValueFormat {","39":"","40":"  private KeyValueFormat() {","41":"  }","42":"","43":"  \/**","44":"   * Transforms a string with the following format : &quot;key1=value1;key2=value2...&quot;","45":"   * into a Map&lt;KEY, VALUE&gt;. Requires to implement the transform(key,value) method","46":"   *","47":"   * @param data        the input string","48":"   * @param transformer the interface to implement","49":"   * @return a Map of &lt;key, value&gt;","50":"   *\/","51":"  public static &lt;KEY, VALUE&gt; Map&lt;KEY, VALUE&gt; parse(String data, Transformer&lt;KEY, VALUE&gt; transformer) {","52":"    Map&lt;String, String&gt; rawData = parse(data);","53":"    Map&lt;KEY, VALUE&gt; map = new HashMap&lt;KEY, VALUE&gt;();","54":"    for (Map.Entry&lt;String, String&gt; entry : rawData.entrySet()) {","55":"      KeyValue&lt;KEY, VALUE&gt; keyVal = transformer.transform(entry.getKey(), entry.getValue());","56":"      if (keyVal != null) {","57":"        map.put(keyVal.getKey(), keyVal.getValue());","58":"      }","59":"    }","60":"    return map;","61":"  }","62":"","63":"  \/**","64":"   * Transforms a string with the following format : &quot;key1=value1;key2=value2...&quot;","65":"   * into a Map&lt;String,String&gt;","66":"   *","67":"   * @param data the string to parse","68":"   * @return a map","69":"   *\/","70":"  public static Map&lt;String, String&gt; parse(String data) {","71":"    Map&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();","72":"    String[] pairs = StringUtils.split(data, &quot;;&quot;);","73":"    for (String pair : pairs) {","74":"      String[] keyValue = StringUtils.split(pair, &quot;=&quot;);","75":"      String key = keyValue[0];","76":"      String value = (keyValue.length == 2 ? keyValue[1] : &quot;&quot;);","77":"      map.put(key, value);","78":"    }","79":"    return map;","80":"  }","81":"","82":"  \/**","83":"   * Transforms a map&lt;KEY,VALUE&gt; into a string with the format : &quot;key1=value1;key2=value2...&quot;","84":"   *","85":"   * @param map the map to transform","86":"   * @return the formatted string","87":"   *\/","88":"  public static &lt;KEY, VALUE&gt; String format(Map&lt;KEY, VALUE&gt; map) {","89":"    StringBuilder sb = new StringBuilder();","90":"    boolean first = true;","91":"    for (Map.Entry&lt;?, ?&gt; entry : map.entrySet()) {","92":"      if (!first) {","93":"        sb.append(&quot;;&quot;);","94":"      }","95":"      sb.append(entry.getKey().toString());","96":"      sb.append(&quot;=&quot;);","97":"      if (entry.getValue() != null) {","98":"        sb.append(entry.getValue());","99":"      }","100":"      first = false;","101":"    }","102":"","103":"    return sb.toString();","104":"  }","105":"","106":"  \/**","107":"   * @since 1.11","108":"   * @deprecated use Multiset from google collections instead of commons-collections bags","109":"   *\/","110":"  public static String format(Bag bag) {","111":"    return format(bag, 0);","112":"  }","113":"","114":"  \/**","115":"   * @since 1.11","116":"   * @deprecated use Multiset from google collections instead of commons-collections bags","117":"   *\/","118":"  public static String format(Bag bag, int var) {","119":"    StringBuilder sb = new StringBuilder();","120":"    boolean first = true;","121":"    for (Object obj : bag.uniqueSet()) {","122":"      if (!first) {","123":"        sb.append(&quot;;&quot;);","124":"      }","125":"      sb.append(obj.toString());","126":"      sb.append(&quot;=&quot;);","127":"      sb.append(bag.getCount(obj) + var);","128":"      first = false;","129":"    }","130":"","131":"    return sb.toString();","132":"  }","133":"","134":"  \/**","135":"   * Transforms a Multiset&lt;?&gt; into a string with the format : &quot;key1=count1;key2=count2...&quot;","136":"   *","137":"   * @param set the set to transform","138":"   * @return the formatted string","139":"   *\/","140":"  public static String format(Multiset&lt;?&gt; set) {","141":"    StringBuilder sb = new StringBuilder();","142":"    boolean first = true;","143":"    for (Multiset.Entry&lt;?&gt; entry : set.entrySet()) {","144":"      if (!first) {","145":"        sb.append(&quot;;&quot;);","146":"      }","147":"      sb.append(entry.getElement().toString());","148":"      sb.append(&quot;=&quot;);","149":"      sb.append(entry.getCount());","150":"      first = false;","151":"    }","152":"    return sb.toString();","153":"  }","154":"","155":"  \/**","156":"   * Transforms a Object... into a string with the format : &quot;object1=object2;object3=object4...&quot;","157":"   *","158":"   * @param objects the object list to transform","159":"   * @return the formatted string","160":"   *\/","161":"  public static String format(Object... objects) {","162":"    StringBuilder sb = new StringBuilder();","163":"    boolean first = true;","164":"    if (objects != null) {","165":"      for (int i = 0; i &lt; objects.length; i++) {","166":"        if (!first) {","167":"          sb.append(&quot;;&quot;);","168":"        }","169":"        sb.append(objects[i++].toString());","170":"        sb.append(&quot;=&quot;);","171":"        sb.append(objects[i]);","172":"        first = false;","173":"      }","174":"    }","175":"    return sb.toString();","176":"  }","177":"","178":"  public interface Transformer&lt;KEY, VALUE&gt; {","179":"    KeyValue&lt;KEY, VALUE&gt; transform(String key, String value);","180":"  }","181":"","182":"  \/**","183":"   * Implementation of Transformer&lt;String, Double&gt;","184":"   *\/","185":"  public static class StringNumberPairTransformer implements Transformer&lt;String, Double&gt; {","186":"","187":"    public KeyValue&lt;String, Double&gt; transform(String key, String value) {","188":"      return new KeyValue&lt;String, Double&gt;(key, toDouble(value));","189":"    }","190":"  }","191":"","192":"  \/**","193":"   * Implementation of Transformer&lt;Double, Double&gt;","194":"   *\/","195":"  public static class DoubleNumbersPairTransformer implements Transformer&lt;Double, Double&gt; {","196":"","197":"    public KeyValue&lt;Double, Double&gt; transform(String key, String value) {","198":"      return new KeyValue&lt;Double, Double&gt;(toDouble(key), toDouble(value));","199":"    }","200":"  }","201":"","202":"  \/**","203":"   * Implementation of Transformer&lt;Integer, Integer&gt;","204":"   *\/","205":"  public static class IntegerNumbersPairTransformer implements Transformer&lt;Integer, Integer&gt; {","206":"","207":"    public KeyValue&lt;Integer, Integer&gt; transform(String key, String value) {","208":"      return new KeyValue&lt;Integer, Integer&gt;(toInteger(key), toInteger(value));","209":"    }","210":"  }","211":"","212":"  \/**","213":"   * Implementation of Transformer&lt;RulePriority, Integer&gt;","214":"   *\/","215":"  public static class RulePriorityNumbersPairTransformer implements Transformer&lt;RulePriority, Integer&gt; {","216":"","217":"    public KeyValue&lt;RulePriority, Integer&gt; transform(String key, String value) {","218":"      try {","219":"        if (StringUtils.isBlank(value)) { value = &quot;0&quot;; }","220":"        return new KeyValue&lt;RulePriority, Integer&gt;(RulePriority.valueOf(key.toUpperCase()), Integer.parseInt(value));","221":"      }","222":"      catch (Exception e) {","223":"        LoggerFactory.getLogger(RulePriorityNumbersPairTransformer.class).warn(&quot;Property &quot; + key + &quot; has invalid value: &quot; + value, e);","224":"        return null;","225":"      }","226":"    }","227":"  }","228":"","229":"  private static Double toDouble(String value) {","230":"    return StringUtils.isBlank(value) ? null : NumberUtils.toDouble(value);","231":"  }","232":"","233":"  private static Integer toInteger(String value) {","234":"    return StringUtils.isBlank(value) ? null : NumberUtils.toInt(value);","235":"  }","236":"}"}]
\ No newline at end of file
+[{"1":"\/*","2":" * Sonar, open source software quality management tool.","3":" * Copyright (C) 2008-2011 SonarSource","4":" * mailto:contact AT sonarsource DOT com","5":" *","6":" * Sonar is free software; you can redistribute it and\/or","7":" * modify it under the terms of the GNU Lesser General Public","8":" * License as published by the Free Software Foundation; either","9":" * version 3 of the License, or (at your option) any later version.","10":" *","11":" * Sonar is distributed in the hope that it will be useful,","12":" * but WITHOUT ANY WARRANTY; without even the implied warranty of","13":" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU","14":" * Lesser General Public License for more details.","15":" *","16":" * You should have received a copy of the GNU Lesser General Public","17":" * License along with Sonar; if not, write to the Free Software","18":" * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02","19":" *\/","20":"package org.sonar.api.utils;","21":"","22":"import com.google.common.collect.Multiset;","23":"import org.apache.commons.collections.Bag;","24":"import org.apache.commons.lang.StringUtils;","25":"import org.apache.commons.lang.math.NumberUtils;","26":"import org.sonar.api.rules.RulePriority;","27":"import org.slf4j.LoggerFactory;","28":"","29":"import java.util.HashMap;","30":"import java.util.Map;","31":"","32":"\/**","33":" * Util class to format key\/value data. Output is a string representation ready to be","34":" * injected into the database","35":" *","36":" * @since 1.10","37":" *\/","38":"public final class KeyValueFormat {","39":"","40":"  private KeyValueFormat() {","41":"  }","42":"","43":"  \/**","44":"   * Transforms a string with the following format : &quot;key1=value1;key2=value2...&quot;","45":"   * into a Map&lt;KEY, VALUE&gt;. Requires to implement the transform(key,value) method","46":"   *","47":"   * @param data        the input string","48":"   * @param transformer the interface to implement","49":"   * @return a Map of &lt;key, value&gt;","50":"   *\/","51":"  public static &lt;KEY, VALUE&gt; Map&lt;KEY, VALUE&gt; parse(String data, Transformer&lt;KEY, VALUE&gt; transformer) {","52":"    Map&lt;String, String&gt; rawData = parse(data);","53":"    Map&lt;KEY, VALUE&gt; map = new HashMap&lt;KEY, VALUE&gt;();","54":"    for (Map.Entry&lt;String, String&gt; entry : rawData.entrySet()) {","55":"      KeyValue&lt;KEY, VALUE&gt; keyVal = transformer.transform(entry.getKey(), entry.getValue());","56":"      if (keyVal != null) {","57":"        map.put(keyVal.getKey(), keyVal.getValue());","58":"      }","59":"    }","60":"    return map;","61":"  }","62":"","63":"  \/**","64":"   * Transforms a string with the following format : &quot;key1=value1;key2=value2...&quot;","65":"   * into a Map&lt;String,String&gt;","66":"   *","67":"   * @param data the string to parse","68":"   * @return a map","69":"   *\/","70":"  public static Map&lt;String, String&gt; parse(String data) {","71":"    Map&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();","72":"    String[] pairs = StringUtils.split(data, &quot;;&quot;);","73":"    for (String pair : pairs) {","74":"      String[] keyValue = StringUtils.split(pair, &quot;=&quot;);","75":"      String key = keyValue[0];","76":"      String value = (keyValue.length == 2 ? keyValue[1] : &quot;&quot;);","77":"      map.put(key, value);","78":"    }","79":"    return map;","80":"  }","81":"","82":"  \/**","83":"   * Transforms a map&lt;KEY,VALUE&gt; into a string with the format : &quot;key1=value1;key2=value2...&quot;","84":"   *","85":"   * @param map the map to transform","86":"   * @return the formatted string","87":"   *\/","88":"  public static &lt;KEY, VALUE&gt; String format(Map&lt;KEY, VALUE&gt; map) {","89":"    StringBuilder sb = new StringBuilder();","90":"    boolean first = true;","91":"    for (Map.Entry&lt;?, ?&gt; entry : map.entrySet()) {","92":"      if (!first) {","93":"        sb.append(&quot;;&quot;);","94":"      }","95":"      sb.append(entry.getKey().toString());","96":"      sb.append(&quot;=&quot;);","97":"      if (entry.getValue() != null) {","98":"        sb.append(entry.getValue());","99":"      }","100":"      first = false;","101":"    }","102":"","103":"    return sb.toString();","104":"  }","105":"","106":"  \/**","107":"   * @since 1.11","108":"   * @deprecated use Multiset from google collections instead of commons-collections bags","109":"   *\/","110":"  public static String format(Bag bag) {","111":"    return format(bag, 0);","112":"  }","113":"","114":"  \/**","115":"   * @since 1.11","116":"   * @deprecated use Multiset from google collections instead of commons-collections bags","117":"   *\/","118":"  public static String format(Bag bag, int var) {","119":"    StringBuilder sb = new StringBuilder();","120":"    boolean first = true;","121":"    for (Object obj : bag.uniqueSet()) {","122":"      if (!first) {","123":"        sb.append(&quot;;&quot;);","124":"      }","125":"      sb.append(obj.toString());","126":"      sb.append(&quot;=&quot;);","127":"      sb.append(bag.getCount(obj) + var);","128":"      first = false;","129":"    }","130":"","131":"    return sb.toString();","132":"  }","133":"","134":"  \/**","135":"   * Transforms a Multiset&lt;?&gt; into a string with the format : &quot;key1=count1;key2=count2...&quot;","136":"   *","137":"   * @param set the set to transform","138":"   * @return the formatted string","139":"   *\/","140":"  public static String format(Multiset&lt;?&gt; set) {","141":"    StringBuilder sb = new StringBuilder();","142":"    boolean first = true;","143":"    for (Multiset.Entry&lt;?&gt; entry : set.entrySet()) {","144":"      if (!first) {","145":"        sb.append(&quot;;&quot;);","146":"      }","147":"      sb.append(entry.getElement().toString());","148":"      sb.append(&quot;=&quot;);","149":"      sb.append(entry.getCount());","150":"      first = false;","151":"    }","152":"    return sb.toString();","153":"  }","154":"","155":"  \/**","156":"   * Transforms a Object... into a string with the format : &quot;object1=object2;object3=object4...&quot;","157":"   *","158":"   * @param objects the object list to transform","159":"   * @return the formatted string","160":"   *\/","161":"  public static String format(Object... objects) {","162":"    StringBuilder sb = new StringBuilder();","163":"    boolean first = true;","164":"    if (objects != null) {","165":"      for (int i = 0; i &lt; objects.length; i++) {","166":"        if (!first) {","167":"          sb.append(&quot;;&quot;);","168":"        }","169":"        sb.append(objects[i++].toString());","170":"        sb.append(&quot;=&quot;);","171":"        sb.append(objects[i]);","172":"        first = false;","173":"      }","174":"    }","175":"    return sb.toString();","176":"  }","177":"","178":"  public interface Transformer&lt;KEY, VALUE&gt; {","179":"    KeyValue&lt;KEY, VALUE&gt; transform(String key, String value);","180":"  }","181":"","182":"  \/**","183":"   * Implementation of Transformer&lt;String, Double&gt;","184":"   *\/","185":"  public static class StringNumberPairTransformer implements Transformer&lt;String, Double&gt; {","186":"","187":"    public KeyValue&lt;String, Double&gt; transform(String key, String value) {","188":"      return new KeyValue&lt;String, Double&gt;(key, toDouble(value));","189":"    }","190":"  }","191":"","192":"  \/**","193":"   * Implementation of Transformer&lt;Double, Double&gt;","194":"   *\/","195":"  public static class DoubleNumbersPairTransformer implements Transformer&lt;Double, Double&gt; {","196":"","197":"    public KeyValue&lt;Double, Double&gt; transform(String key, String value) {","198":"      return new KeyValue&lt;Double, Double&gt;(toDouble(key), toDouble(value));","199":"    }","200":"  }","201":"","202":"  \/**","203":"   * Implementation of Transformer&lt;Integer, Integer&gt;","204":"   *\/","205":"  public static class IntegerNumbersPairTransformer implements Transformer&lt;Integer, Integer&gt; {","206":"","207":"    public KeyValue&lt;Integer, Integer&gt; transform(String key, String value) {","208":"      return new KeyValue&lt;Integer, Integer&gt;(toInteger(key), toInteger(value));","209":"    }","210":"  }","211":"","212":"  \/**","213":"   * Implementation of Transformer&lt;RulePriority, Integer&gt;","214":"   *\/","215":"  public static class RulePriorityNumbersPairTransformer implements Transformer&lt;RulePriority, Integer&gt; {","216":"","217":"    public KeyValue&lt;RulePriority, Integer&gt; transform(String key, String value) {","218":"      try {","219":"        if (StringUtils.isBlank(value)) { value = &quot;0&quot;; }","220":"        return new KeyValue&lt;RulePriority, Integer&gt;(RulePriority.valueOf(key.toUpperCase()), Integer.parseInt(value));","221":"      }","222":"      catch (Exception e) {","223":"        LoggerFactory.getLogger(RulePriorityNumbersPairTransformer.class).warn(&quot;Property &quot; + key + &quot; has invalid value: &quot; + value, e);","224":"        return null;","225":"      }","226":"    }","227":"  }","228":"","229":"  private static Double toDouble(String value) {","230":"    return StringUtils.isBlank(value) ? null : NumberUtils.toDouble(value);","231":"  }","232":"","233":"  private static Integer toInteger(String value) {","234":"    return StringUtils.isBlank(value) ? null : NumberUtils.toInt(value);","235":"  }","236":"}"}]
\ No newline at end of file
index 5fd5809f3b36b689a5e5b0f6fbdb4a2ae2a4e182..3d727a9ce013bb24bab0abe0e3ab544132b78433 100644 (file)
@@ -1,71 +1,71 @@
-/*\r
- * Sonar, open source software quality management tool.\r
- * Copyright (C) 2009 SonarSource SA\r
- * mailto:contact AT sonarsource DOT com\r
- *\r
- * Sonar is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 3 of the License, or (at your option) any later version.\r
- *\r
- * Sonar is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with Sonar; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\r
- */\r
-package itests;\r
-\r
-import itests.footer.SampleFooter;\r
-import itests.languages.LanguageWithoutRulesEngine;\r
-import itests.page.GwtSamplePage;\r
-import itests.page.RubyApiTestsPage;\r
-import itests.resourcetab.SampleResourceTab;\r
-import itests.ws.RubyWebService;\r
-import org.sonar.api.Plugin;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-public class ITestsPlugin implements Plugin {\r
-\r
-  public String getKey() {\r
-    return "it";\r
-  }\r
-\r
-  public String getName() {\r
-    return "Integration tests";\r
-  }\r
-\r
-  public String getDescription() {\r
-    return "Integration tests";\r
-  }\r
-\r
-  public List getExtensions() {\r
-    List extensions = new ArrayList();\r
-\r
-    extensions.add(SampleSensor.class);\r
-    extensions.add(LanguageWithoutRulesEngine.class);\r
-    extensions.add(ServerSideExtensionUsingExternalDependency.class);\r
-    extensions.add(ExcludedResourceFilter.class);\r
-\r
-    // web\r
-    extensions.add(SampleResourceTab.class);\r
-    extensions.add(SampleFooter.class);\r
-    extensions.add(GwtSamplePage.class);\r
-    extensions.add(RubyApiTestsPage.class);\r
-    \r
-    // web service\r
-    extensions.add(RubyWebService.class);\r
-\r
-    return extensions;\r
-  }\r
-\r
-  @Override\r
-  public String toString() {\r
-    return getKey();\r
-  }\r
-}\r
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2011 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+package itests;
+
+import itests.footer.SampleFooter;
+import itests.languages.LanguageWithoutRulesEngine;
+import itests.page.GwtSamplePage;
+import itests.page.RubyApiTestsPage;
+import itests.resourcetab.SampleResourceTab;
+import itests.ws.RubyWebService;
+import org.sonar.api.Plugin;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ITestsPlugin implements Plugin {
+
+  public String getKey() {
+    return "it";
+  }
+
+  public String getName() {
+    return "Integration tests";
+  }
+
+  public String getDescription() {
+    return "Integration tests";
+  }
+
+  public List getExtensions() {
+    List extensions = new ArrayList();
+
+    extensions.add(SampleSensor.class);
+    extensions.add(LanguageWithoutRulesEngine.class);
+    extensions.add(ServerSideExtensionUsingExternalDependency.class);
+    extensions.add(ExcludedResourceFilter.class);
+
+    // web
+    extensions.add(SampleResourceTab.class);
+    extensions.add(SampleFooter.class);
+    extensions.add(GwtSamplePage.class);
+    extensions.add(RubyApiTestsPage.class);
+    
+    // web service
+    extensions.add(RubyWebService.class);
+
+    return extensions;
+  }
+
+  @Override
+  public String toString() {
+    return getKey();
+  }
+}
index b4172e8b5bf5239744d08430f1395a4f9eaac788..0ec5c71953b66c379f94f438f5cd2201c4c812ce 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3debe0b73f9bf3aa69c8c1a18124c0f2115271c4..53d241c0651e1cd491f96ae7754bc842ec07de50 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 6db3846990da0dfcc931db77098f8dc2f31a3c18..32895e87e111588117356cbcf9ca22ea88e7d9fe 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 787551c058f4bb445a37cdecd4766a700e3bd808..b4951db60ba18a081ea1e815ecd6dc1926b90e70 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e2c045d126d3403ab7c6faed1f394674a8bf5b5b..9b208ef9682793a4f088706b94e544316c9f349e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 021bb584458d6a441285154f119b0051aa3e4647..f39c949411a1b112e7ca9b2b221ac3e787cee741 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d65b4a21f904c1e35e577cd07a2470ecf5b880bd..19aa9c2e82056ef8494a35af7ad4adff0d6f3b0f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8906e4452c70e3a92960ad2d387091de4d811492..5e875599f6a22b93e4f2112305adf12e07259743 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d788e93333edf5249d24c034c32bc4edde3bdcb5..efeb007d8018ca81e301785f2f6a12497dc8d7fe 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5ae5ebc7044322ff6331ded68d142033a7307035..9cd876435b0027cab473a365ed7a5ffd41a7d507 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e48166dc4bb1dfe0f8c69353ea2b68ee2bc15f39..40ad00c542408fda3916c81d92ef0a0cd4dad40b 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Sonar, open source software quality management tool.
-# Copyright (C) 2009 SonarSource SA
+# Copyright (C) 2008-2011 SonarSource
 # mailto:contact AT sonarsource DOT com
 #
 # Sonar is free software; you can redistribute it and/or
index d1011beab44d1cea81f2e7c5fba05e8418d10e8d..61455ae5cfe0ce2744ac2cae241523f32db65fb9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 06dac0ed168c43ad1ab6560f2a0a102121f891bd..62e663da06f65c3dcf75faa66ec9f9f531780de3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 752e55963fe4c6a0214c14db043f237c8a20a481..a0736b2c8d0c9c017b77a381cfc2bc83dcb5ffd1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 0ce164b80350ff030c5d2788ae1a28b5cc91b092..d847f24d8e7ae538d8f1d7aae86bdfc6f543e7a4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8d063767b0dfb30ea0bc86c7b55fcd5c3d6ce1a2..28ae766f1632f1e18b9726e6deaa0c217b44d287 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c4391079d1df9a24acece8d6cba225b1f90fae20..6cb454fdaee1cc1a6feb35f82702876a58378494 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 312b6c926e8dce1b5ec252b4e4e2607d10c9f0b9..d3df3bcb11c6de7f4d2ae93c3c7d8623ecab18f9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3b8a8eab78eb7d6c6befacd5ae88953da07e690f..d9b5ac533918df6325f2182b28d676d6971f0acf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 96a504875bb87880ac4eb7054885c56b6a73f5e9..c4898ae975225d84d3d12cecf4b0b97651815efe 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1f5dccf9981c5b4617c65e92c196a04b2b66be18..232fdc4444d9a56c2d1419be6aea9d7e534676bd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 1082de85e0409e841d31c9a2234a2bce237fe0b2..bd934492c3107f85fe26fdc6ffcb61bd22b9197a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c633601034a82f97f055c68d884a189149c4a597..989740136b183b05de57a1da600ddb00ac5deacf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 3731edac18bee4e5b30a0b9af3222dd82a5facaa..ccd43d8d9f260fe6299831a9e4696f0a228ac935 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 49109afa02321b6e70c08bb6b0dfa78c6c253021..c7d2397738cbb108072bdf27cb6f24ebaa9cfacf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 557967ab4b9a1a9a58686de8ee229f5cb7f79f90..dd134de124c7b1e274631a401393b1e0728f12c9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 588d4f66e253f47dfb663a8364da6f44223998b2..46aa3d9194a8e511fb25d82480ed2a8619787b4b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 5da9168674ac6fea9c095ebfafd14b6f8520fd72..bb0b9b52e835ff2bac3faaeca95f30ce31045d99 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index c6f4c52edc92c806e8b9db2813d34cdc4a933f7e..8b64e1504f8543581eb7a3546fb88237c3853c4f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index a4e1aaf59323c8ec1bee1d8c1ed303a8a8aeaa99..253a5ca4b4213edbc24300a7dc3104060f8f8136 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index f7431f6ff01726f0faf661404f79338979b9f212..ee3fe2063372331941765a9804e60e6830424b33 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 598b68bc71278c3b6afcb157e1e46f5c61011a34..3b76045a5c2a3b4dfb0aac779dd19c31a74e032d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 49d93f5f2c6e34ee81ecfe00b02a814c9a5fe20f..bc97f6c29c086d1b0b674bc9c01a67333f5ae4a9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 2ba61531f8623db4419a0da64ce4b82004966c01..b5bb1dcfd67b3f8eebcba0e799944331a0002bc9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e6d0ec79dd1445c7ad295b224dc4b33c82b8c2d6..fea9937e868b194de0cff4858ecab0f5ce974ddb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 96af69d950a7b5f70c9183772f31e58145942b3a..4d712570141d51c310d0ec6b3b0f8b1c3cbf22da 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 34a4f58269e0709aecb45c78cd88508d704bce3c..c72ec7b0ac0a42c904c0ca140047138016ba7221 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index d608b39bfd8b08314e0b0cb80fb36ea7ee9ec5df..cd43308d8e2e3c820d9e47abed2b2524c18e62ca 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index ba50e2213a963a6464a64648db62801e31c4452c..2a8ced7122e34129f372cf20f6be0c75591ab17d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index e794306ddadf3334f0bccba7773e8c112c5f113c..501fb2969bd32355dd8b848fe702a19070b81207 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 19cb48869a222758c73aec4375832cb7d8857829..f1931a4e4e2ac8b1430a10a57ff6cc21ad51dff1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 998a6cbbef088e80535fe1b515f8b3cb7670b443..aaacfc98a9c0d758b60afbb4e61353d460be42cf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 8c6a2d9aadd770707c1a9e9032d668a19f2a54f0..96f663578b31ea74b47b04781a287142ed47a9d8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index fa56aac27e62df0d8a4ae3c37afba072650dfbdf..65b0a2375521f54844b8e39c3df460b1d8ab92bb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or
index 71f339b62849cc95d440c12d4b9653b479ca16b4..453f817198a78b42918d007e8be1bad8b92bcae1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sonar, open source software quality management tool.
- * Copyright (C) 2009 SonarSource SA
+ * Copyright (C) 2008-2011 SonarSource
  * mailto:contact AT sonarsource DOT com
  *
  * Sonar is free software; you can redistribute it and/or