diff options
Diffstat (limited to 'sonar-scanner-engine/src')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/ResourceReport.java | 14 | ||||
-rw-r--r-- | sonar-scanner-engine/src/main/resources/org/sonar/batch/scan/report/issuesreport.ftl | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/ResourceReport.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/ResourceReport.java index 6267335baf0..c2d14b20c35 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/ResourceReport.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/ResourceReport.java @@ -19,18 +19,16 @@ */ package org.sonar.batch.scan.report; -import org.sonar.batch.issue.tracking.TrackedIssue; - -import org.sonar.api.batch.rule.Rule; import com.google.common.collect.Maps; -import org.sonar.api.rules.RulePriority; -import org.sonar.batch.index.BatchComponent; - import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; +import org.sonar.api.batch.rule.Rule; +import org.sonar.api.rules.RulePriority; +import org.sonar.batch.index.BatchComponent; +import org.sonar.batch.issue.tracking.TrackedIssue; public final class ResourceReport { private final BatchComponent resource; @@ -55,6 +53,10 @@ public final class ResourceReport { return resource.resource().getName(); } + public String getKey() { + return resource.inputComponent().key(); + } + public String getType() { return resource.resource().getScope(); } diff --git a/sonar-scanner-engine/src/main/resources/org/sonar/batch/scan/report/issuesreport.ftl b/sonar-scanner-engine/src/main/resources/org/sonar/batch/scan/report/issuesreport.ftl index e027da8cb2f..78a82809274 100644 --- a/sonar-scanner-engine/src/main/resources/org/sonar/batch/scan/report/issuesreport.ftl +++ b/sonar-scanner-engine/src/main/resources/org/sonar/batch/scan/report/issuesreport.ftl @@ -293,7 +293,7 @@ <tr class="total"> <th align="left" colspan="2" nowrap> <div class="file_title"> - <img src="issuesreport_files/${resourceReport.getType()}.png" title="Resource icon"/> + <img src="issuesreport_files/${resourceReport.getType()}.png" title="${resourceReport.getKey()}"/> <a href="#" onclick="$('.resource-details-${resourceReport_index?c}').toggleClass('masked'); return false;" style="color: black">${resourceReport.getName()}</a> </div> </th> |