]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6806 Show component key as tooltip to help identify original source file
authorJulien HENRY <julien.henry@sonarsource.com>
Fri, 13 May 2016 14:43:05 +0000 (16:43 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Fri, 13 May 2016 14:46:22 +0000 (16:46 +0200)
sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/ResourceReport.java
sonar-scanner-engine/src/main/resources/org/sonar/batch/scan/report/issuesreport.ftl

index 6267335baf02bece7db99b17f67d3325a2ce987f..c2d14b20c35768c4da689cd9925ad49841299fb7 100644 (file)
  */
 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();
   }
index e027da8cb2fbba989e8706babaa77fe14064ad53..78a82809274fd127210e1f9c439237dffd98d493 100644 (file)
     <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>