From 45b4fc44842d66987859f19975a5057930cf8a25 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Fri, 23 Mar 2012 12:42:22 +0100 Subject: SONAR-2197 Be able to display Design/Libraries tab for any languages Also modified to be displayed only when required measures are available: - the Dependencies tab - the LCOM4 tab --- .../main/java/org/sonar/plugins/core/web/Lcom4Viewer.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'plugins/sonar-core-plugin') diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/web/Lcom4Viewer.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/web/Lcom4Viewer.java index b4cb02c2a0a..c0a042e0fe5 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/web/Lcom4Viewer.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/web/Lcom4Viewer.java @@ -19,13 +19,19 @@ */ package org.sonar.plugins.core.web; -import org.sonar.api.resources.Java; +import org.sonar.api.measures.CoreMetrics; import org.sonar.api.resources.Qualifiers; -import org.sonar.api.web.*; +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(mandatory = {CoreMetrics.LCOM4_KEY}) @NavigationSection(NavigationSection.RESOURCE_TAB) @UserRole(UserRole.CODEVIEWER) -@ResourceLanguage(Java.KEY) @ResourceQualifier(Qualifiers.CLASS) @DefaultTab(metrics = {"lcom4", "lcom4_blocks"}) public class Lcom4Viewer extends AbstractRubyTemplate implements RubyRailsPage { @@ -42,4 +48,4 @@ public class Lcom4Viewer extends AbstractRubyTemplate implements RubyRailsPage { protected String getTemplatePath() { return "/org/sonar/plugins/core/web/lcom4_viewer.html.erb"; } -} \ No newline at end of file +} -- cgit v1.2.3