aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2013-07-30 11:35:10 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2013-07-30 16:13:25 +0200
commitd8366dfacb0f88f51accc2b716d020bf2c0e68c8 (patch)
tree02db4aba8fa955841fac9ddb39d936c6ab569473 /plugins
parent7bcfec5b031b0d1c8da7319a6e22f4571ebb8b5a (diff)
downloadsonarqube-d8366dfacb0f88f51accc2b716d020bf2c0e68c8.tar.gz
sonarqube-d8366dfacb0f88f51accc2b716d020bf2c0e68c8.zip
SONAR-4531 Remove Dependencies tab from Component Viewer
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties10
-rw-r--r--plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/DesignPlugin.java3
-rw-r--r--plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/DependenciesViewer.java51
-rw-r--r--plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/dependencies/dependencies_viewer.html.erb62
4 files changed, 0 insertions, 126 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
index 1ee078c3dd9..26919c5abcb 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
@@ -370,7 +370,6 @@ comparison.page=Compare
# GWT pages
org.sonar.plugins.design.ui.page.DesignPage.page=Design
org.sonar.plugins.design.ui.libraries.LibrariesPage.page=Libraries
-org.sonar.plugins.design.ui.dependencies.DependenciesTab.page=Dependencies
#------------------------------------------------------------------------------
@@ -1214,15 +1213,6 @@ code_viewer.no_info_displayed_due_to_security=Due to security settings, no infor
#------------------------------------------------------------------------------
#
-# DEPENDENCIES VIEWER
-#
-#------------------------------------------------------------------------------
-dependencies.ca=Afferent (incoming) couplings
-dependencies.ce=Efferent (outgoing) couplings
-
-
-#------------------------------------------------------------------------------
-#
# TESTS VIEWER
#
#------------------------------------------------------------------------------
diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/DesignPlugin.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/DesignPlugin.java
index ad1666c9951..7cb74ef381c 100644
--- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/DesignPlugin.java
+++ b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/DesignPlugin.java
@@ -27,7 +27,6 @@ import org.sonar.plugins.design.batch.MavenDependenciesSensor;
import org.sonar.plugins.design.batch.PackageTangleIndexDecorator;
import org.sonar.plugins.design.batch.ProjectDsmDecorator;
import org.sonar.plugins.design.batch.SuspectLcom4DensityDecorator;
-import org.sonar.plugins.design.ui.dependencies.DependenciesViewer;
import org.sonar.plugins.design.ui.libraries.GwtLibrariesPage;
import org.sonar.plugins.design.ui.page.GwtDesignPage;
import org.sonar.plugins.design.ui.widgets.FileDesignWidget;
@@ -39,7 +38,6 @@ import java.util.List;
public class DesignPlugin extends SonarPlugin {
- @SuppressWarnings("unchecked")
public List<Class<? extends Extension>> getExtensions() {
return ImmutableList.of(
// Batch
@@ -52,7 +50,6 @@ public class DesignPlugin extends SonarPlugin {
// UI
GwtDesignPage.class,
- DependenciesViewer.class,
FileDesignWidget.class,
PackageDesignWidget.class,
LCOM4Widget.class,
diff --git a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/DependenciesViewer.java b/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/DependenciesViewer.java
deleted file mode 100644
index f2aab462d86..00000000000
--- a/plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/dependencies/DependenciesViewer.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2013 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube 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.
- *
- * SonarQube 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 this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.plugins.design.ui.dependencies;
-
-import org.sonar.api.measures.CoreMetrics;
-import org.sonar.api.resources.Qualifiers;
-import org.sonar.api.web.AbstractRubyTemplate;
-import org.sonar.api.web.DefaultTab;
-import org.sonar.api.web.NavigationSection;
-import org.sonar.api.web.RequiredMeasures;
-import org.sonar.api.web.ResourceQualifier;
-import org.sonar.api.web.RubyRailsPage;
-import org.sonar.api.web.UserRole;
-
-@RequiredMeasures(allOf = {CoreMetrics.AFFERENT_COUPLINGS_KEY, CoreMetrics.EFFERENT_COUPLINGS_KEY})
-@ResourceQualifier({Qualifiers.FILE, Qualifiers.CLASS, Qualifiers.PACKAGE, Qualifiers.PROJECT, Qualifiers.MODULE})
-@DefaultTab(metrics = {CoreMetrics.AFFERENT_COUPLINGS_KEY, CoreMetrics.EFFERENT_COUPLINGS_KEY})
-@NavigationSection({NavigationSection.RESOURCE_TAB})
-@UserRole(UserRole.CODEVIEWER)
-public class DependenciesViewer extends AbstractRubyTemplate implements RubyRailsPage {
-
- public String getId() {
- return "dependencies";
- }
-
- public String getTitle() {
- return "Dependencies";
- }
-
- @Override
- protected String getTemplatePath() {
- return "/org/sonar/plugins/design/ui/dependencies/dependencies_viewer.html.erb";
- }
-}
diff --git a/plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/dependencies/dependencies_viewer.html.erb b/plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/dependencies/dependencies_viewer.html.erb
deleted file mode 100644
index 97bcd6ca045..00000000000
--- a/plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/dependencies/dependencies_viewer.html.erb
+++ /dev/null
@@ -1,62 +0,0 @@
-<style>
- .dependenciesCol {
- float: left;
- margin: 10px;
- border: 1px solid #ccc;
- }
- .dependenciesColTitle {
- padding: 3px 10px;
- text-align: center;
- background-color: #efefef;
- }
- .dependenciesColBody {
- padding: 3px;
- border-top: 1px solid #ccc;
- }
- .dependenciesColBody > div {
- padding: 3px;
- }
-</style>
-<div>
- <%
- ca = @snapshot.measure('ca')
- ce = @snapshot.measure('ce')
- dependencies = Dependency.find(:all,
- :include => ['from', 'to'],
- :conditions => ['(dependencies.from_snapshot_id=? OR dependencies.to_snapshot_id=?)', @snapshot.id, @snapshot.id])
-
- resource_id = @resource.id
- dependencies_by_measure = []
- dependencies_by_measure << {:metric => 'ca', :measure => ca,
- :dependencies => dependencies.select { |dep| dep.to_resource_id == resource_id }}
- dependencies_by_measure << {:metric => 'ce', :measure => ce,
- :dependencies => dependencies.select { |dep| dep.from_resource_id == resource_id }}
-
- dependencies_by_measure.each do |deps_by_m|
- metric_name = deps_by_m[:metric]
- measure = deps_by_m[:measure]
- deps = deps_by_m[:dependencies]
- %>
-
- <div id="<%= @resource.key.parameterize -%>-<%= metric_name -%>" class="dependenciesCol">
- <div class="dependenciesColTitle">
- <%= message('dependencies.' + metric_name) -%>: <b><%= format_measure(measure) -%></b>
- </div>
-
- <% unless deps.empty? %>
- <div class="dependenciesColBody">
- <%
- deps.each do |dep|
- resource = metric_name=='ca' ? dep.from : dep.to
- %>
- <div>
- <%= image_tag 'q/CLA.png' -%>
- <%= link_to_resource resource, resource.long_name, {:tab => 'dependencies'} -%> (<%= dep.weight -%>)
- </div>
- <% end %>
- </div>
- <% end %>
- </div>
- <% end %>
- <div class="clear"></div>
-</div>