diff options
author | David Gageot <david@gageot.net> | 2012-05-11 09:29:01 +0200 |
---|---|---|
committer | David Gageot <david@gageot.net> | 2012-05-11 09:35:45 +0200 |
commit | f3b56ae24cae9ff40879f098916ade30dba79331 (patch) | |
tree | 151c55bee75c24d0811c7ff610157a682f78f44b | |
parent | 3982a403b371a53d51fd26546f959457fe4bf619 (diff) | |
download | sonarqube-f3b56ae24cae9ff40879f098916ade30dba79331.tar.gz sonarqube-f3b56ae24cae9ff40879f098916ade30dba79331.zip |
Remove GlobalDashboard and GlobalWidget. Those were prototypes
6 files changed, 66 insertions, 148 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java index 2541173c051..e9daf7bf788 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java @@ -19,12 +19,14 @@ */ package org.sonar.plugins.core; -import org.sonar.plugins.core.dashboards.GlobalDashboard; - import com.google.common.collect.Lists; -import org.sonar.api.*; -import org.sonar.api.checks.NoSonarFilter; +import org.sonar.api.CoreProperties; +import org.sonar.api.Extension; +import org.sonar.api.Properties; +import org.sonar.api.Property; import org.sonar.api.PropertyType; +import org.sonar.api.SonarPlugin; +import org.sonar.api.checks.NoSonarFilter; import org.sonar.api.resources.Java; import org.sonar.plugins.core.batch.ExcludedResourceFilter; import org.sonar.plugins.core.batch.IndexProjectPostJob; @@ -39,13 +41,69 @@ import org.sonar.plugins.core.dashboards.HotspotsDashboard; import org.sonar.plugins.core.dashboards.ReviewsDashboard; import org.sonar.plugins.core.dashboards.TimeMachineDashboard; import org.sonar.plugins.core.security.ApplyProjectRolesDecorator; -import org.sonar.plugins.core.sensors.*; +import org.sonar.plugins.core.sensors.BranchCoverageDecorator; +import org.sonar.plugins.core.sensors.CheckAlertThresholds; +import org.sonar.plugins.core.sensors.CommentDensityDecorator; +import org.sonar.plugins.core.sensors.CoverageDecorator; +import org.sonar.plugins.core.sensors.DirectoriesDecorator; +import org.sonar.plugins.core.sensors.FilesDecorator; +import org.sonar.plugins.core.sensors.GenerateAlertEvents; +import org.sonar.plugins.core.sensors.ItBranchCoverageDecorator; +import org.sonar.plugins.core.sensors.ItCoverageDecorator; +import org.sonar.plugins.core.sensors.ItLineCoverageDecorator; +import org.sonar.plugins.core.sensors.LineCoverageDecorator; +import org.sonar.plugins.core.sensors.ManualMeasureDecorator; +import org.sonar.plugins.core.sensors.ManualViolationInjector; +import org.sonar.plugins.core.sensors.ProfileEventsSensor; +import org.sonar.plugins.core.sensors.ProfileSensor; +import org.sonar.plugins.core.sensors.ProjectLinksSensor; +import org.sonar.plugins.core.sensors.ReviewNotifications; +import org.sonar.plugins.core.sensors.ReviewWorkflowDecorator; +import org.sonar.plugins.core.sensors.ReviewsMeasuresDecorator; +import org.sonar.plugins.core.sensors.UnitTestDecorator; +import org.sonar.plugins.core.sensors.VersionEventsSensor; +import org.sonar.plugins.core.sensors.ViolationSeverityUpdater; +import org.sonar.plugins.core.sensors.ViolationsDecorator; +import org.sonar.plugins.core.sensors.ViolationsDensityDecorator; +import org.sonar.plugins.core.sensors.WeightedViolationsDecorator; import org.sonar.plugins.core.testdetailsviewer.TestsViewerDefinition; -import org.sonar.plugins.core.timemachine.*; +import org.sonar.plugins.core.timemachine.NewCoverageAggregator; +import org.sonar.plugins.core.timemachine.NewCoverageFileAnalyzer; +import org.sonar.plugins.core.timemachine.NewItCoverageFileAnalyzer; +import org.sonar.plugins.core.timemachine.NewViolationsDecorator; +import org.sonar.plugins.core.timemachine.ReferenceAnalysis; +import org.sonar.plugins.core.timemachine.TendencyDecorator; +import org.sonar.plugins.core.timemachine.TimeMachineConfigurationPersister; +import org.sonar.plugins.core.timemachine.VariationDecorator; +import org.sonar.plugins.core.timemachine.ViolationPersisterDecorator; +import org.sonar.plugins.core.timemachine.ViolationTrackingDecorator; import org.sonar.plugins.core.web.Lcom4Viewer; -import org.sonar.plugins.core.widgets.*; +import org.sonar.plugins.core.widgets.AlertsWidget; +import org.sonar.plugins.core.widgets.CommentsDuplicationsWidget; +import org.sonar.plugins.core.widgets.ComplexityWidget; +import org.sonar.plugins.core.widgets.CoverageWidget; +import org.sonar.plugins.core.widgets.CustomMeasuresWidget; +import org.sonar.plugins.core.widgets.DescriptionWidget; +import org.sonar.plugins.core.widgets.EventsWidget; +import org.sonar.plugins.core.widgets.FilterWidget; +import org.sonar.plugins.core.widgets.HotspotMetricWidget; +import org.sonar.plugins.core.widgets.HotspotMostViolatedResourcesWidget; +import org.sonar.plugins.core.widgets.HotspotMostViolatedRulesWidget; +import org.sonar.plugins.core.widgets.ImageWidget; +import org.sonar.plugins.core.widgets.ItCoverageWidget; +import org.sonar.plugins.core.widgets.RulesWidget; +import org.sonar.plugins.core.widgets.SizeWidget; +import org.sonar.plugins.core.widgets.TimeMachineWidget; +import org.sonar.plugins.core.widgets.TimelineWidget; +import org.sonar.plugins.core.widgets.TreemapWidget; import org.sonar.plugins.core.widgets.actionPlans.ActionPlansWidget; -import org.sonar.plugins.core.widgets.reviews.*; +import org.sonar.plugins.core.widgets.reviews.FalsePositiveReviewsWidget; +import org.sonar.plugins.core.widgets.reviews.MyReviewsWidget; +import org.sonar.plugins.core.widgets.reviews.PlannedReviewsWidget; +import org.sonar.plugins.core.widgets.reviews.ProjectReviewsWidget; +import org.sonar.plugins.core.widgets.reviews.ReviewsMetricsWidget; +import org.sonar.plugins.core.widgets.reviews.ReviewsPerDeveloperWidget; +import org.sonar.plugins.core.widgets.reviews.UnplannedReviewsWidget; import java.util.List; @@ -267,7 +325,6 @@ public final class CorePlugin extends SonarPlugin { extensions.add(ActionPlansWidget.class); extensions.add(ReviewsMetricsWidget.class); extensions.add(TreemapWidget.class); - extensions.add(GlobalWidget.class); extensions.add(ImageWidget.class); extensions.add(FilterWidget.class); @@ -276,7 +333,6 @@ public final class CorePlugin extends SonarPlugin { extensions.add(HotspotsDashboard.class); extensions.add(ReviewsDashboard.class); extensions.add(TimeMachineDashboard.class); - extensions.add(GlobalDashboard.class); // chart extensions.add(XradarChart.class); diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/dashboards/GlobalDashboard.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/dashboards/GlobalDashboard.java deleted file mode 100644 index bdb044f8bc7..00000000000 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/dashboards/GlobalDashboard.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2012 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.dashboards; - -import org.sonar.api.web.Dashboard; -import org.sonar.api.web.DashboardLayout; -import org.sonar.api.web.DashboardTemplate; - -/** - * Global dashboard for Sonar. - * - * @since 3.1 - */ -public final class GlobalDashboard extends DashboardTemplate { - @Override - public String getName() { - return "Global"; - } - - @Override - public Dashboard createDashboard() { - Dashboard dashboard = Dashboard.create(); - dashboard.setGlobal(true); - dashboard.setLayout(DashboardLayout.ONE_COLUMN); - - addWidget(dashboard); - - return dashboard; - } - - private void addWidget(Dashboard dashboard) { - dashboard.addWidget("image", 1); - dashboard.addWidget("global", 1); - } -} diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/GlobalWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/GlobalWidget.java deleted file mode 100644 index 2a7d3fd8d92..00000000000 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/GlobalWidget.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2012 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.RubyRailsWidget; -import org.sonar.api.web.WidgetCategory; -import org.sonar.api.web.WidgetGlobal; - -@WidgetCategory({"Global", "Misc"}) -@WidgetGlobal -public class GlobalWidget extends AbstractRubyTemplate implements RubyRailsWidget { - - public String getId() { - return "global"; - } - - public String getTitle() { - return "Global"; - } - - @Override - protected String getTemplatePath() { - return "/org/sonar/plugins/core/widgets/global.html.erb"; - } -} diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/global.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/global.html.erb deleted file mode 100644 index 34fa97df868..00000000000 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/global.html.erb +++ /dev/null @@ -1 +0,0 @@ -<div>Hello World</div>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/GlobalDashboardTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/GlobalDashboardTest.java deleted file mode 100644 index e16c1983aec..00000000000 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/dashboards/GlobalDashboardTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2012 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.dashboards; - -import org.junit.Test; -import org.sonar.api.web.Dashboard; -import org.sonar.api.web.DashboardLayout; - -import static org.fest.assertions.Assertions.assertThat; - -public class GlobalDashboardTest { - @Test - public void should_create_dashboard() { - GlobalDashboard template = new GlobalDashboard(); - - Dashboard dashboard = template.createDashboard(); - - assertThat(template.getName()).isEqualTo("Global"); - assertThat(dashboard.getLayout()).isEqualTo(DashboardLayout.ONE_COLUMN); - assertThat(dashboard.getWidgets()).onProperty("id").containsOnly("global", "image"); - } -} diff --git a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties index de40f14bc95..516ca6a8881 100644 --- a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -766,9 +766,6 @@ widget.reviews_metrics.added_unreviewed_violations=Added: widget.treemap-widget.name=Treemap of components widget.treemap-widget.description=Displays a treemap of all direct components of the selected resource -widget.global.name=Hello World -widget.global.description=Shows Hello Word - widget.image.name=Image widget.image.description=Shows an image with a link |