inspections: further cleanup of generated html of inspection results

GitOrigin-RevId: 88bfe0ea9a1e6b6da6108bf3fbcba19e3391cfc7
This commit is contained in:
Bas Leijdekkers
2024-06-03 15:50:19 +02:00
committed by intellij-monorepo-bot
parent 0104fae86b
commit a4bbeea5dc
4 changed files with 4 additions and 11 deletions

View File

@@ -43,7 +43,6 @@ public class DeadHTMLComposer extends HTMLComposerImpl {
doneProblemDescription(buf);
if (toExternalHtml) {
buf.append(BR).append(BR);
appendResolution(buf, refElement, DescriptorComposer.quickFixTexts(refElement, myToolPresentation));
}
refElement.accept(new RefJavaVisitor() {
@@ -324,7 +323,6 @@ public class DeadHTMLComposer extends HTMLComposerImpl {
if (!possibleChildren.isEmpty()) {
if (appendCallees){
appendHeading(buf, JavaBundle.message("inspection.export.results.callees"));
buf.append("<div class=\"problem-description\">");
}
final @NonNls String ul = "<ul>";
buf.append(ul);
@@ -341,9 +339,6 @@ public class DeadHTMLComposer extends HTMLComposerImpl {
}
final @NonNls String closeUl = "</ul>";
buf.append(closeUl);
if (appendCallees) {
buf.append("</div>");
}
}
}

View File

@@ -41,6 +41,7 @@ import com.intellij.util.concurrency.SynchronizedClearableLazy;
import com.intellij.util.text.CharArrayUtil;
import com.intellij.util.text.DateFormatUtil;
import com.intellij.util.ui.StartupUiUtil;
import com.intellij.xml.util.XmlStringUtil;
import it.unimi.dsi.fastutil.objects.Object2IntMap;
import org.jdom.Element;
import org.jetbrains.annotations.*;
@@ -579,7 +580,6 @@ public class UnusedDeclarationPresentation extends DefaultInspectionToolPresenta
return AnalysisBundle.message("inspection.dead.code.safe.delete.quickfix");
}
@Override
public void applyFix(@NotNull Project project, @NotNull CommonProblemDescriptor descriptor) {
if (myElement != null && myElement.isValid()) {
@@ -610,7 +610,7 @@ public class UnusedDeclarationPresentation extends DefaultInspectionToolPresenta
if (value != null) {
String objectPackage = (String) value.getAttribute("qualifiedname");
if (objectPackage != null) {
return objectPackage;
return XmlStringUtil.escapeString(objectPackage);
}
}
}
@@ -642,7 +642,7 @@ public class UnusedDeclarationPresentation extends DefaultInspectionToolPresenta
final StyleSheet css = ((HTMLEditorKit)htmlView.getEditorKit()).getStyleSheet();
css.addRule("p.problem-description-group {text-indent: " + JBUIScale.scale(9) + "px;font-weight:bold;}");
css.addRule("div.problem-description {margin-left: " + JBUIScale.scale(9) + "px;}");
css.addRule("ul {margin-left:" + JBUIScale.scale(10) + "px;text-indent: 0}");
css.addRule("ul {margin-left:" + JBUIScale.scale(19) + "px;text-indent: 0}");
css.addRule("code {font-family:" + StartupUiUtil.getLabelFont().getFamily() + "}");
final @Nls StringBuilder buf = new StringBuilder();
((DeadHTMLComposer)getComposer()).compose(buf, entity, false);

View File

@@ -61,7 +61,6 @@ public abstract class HTMLComposerImpl extends HTMLComposer {
buf.append("in ");
appendLocation(buf, refElement);
buf.append("</div>");
buf.append(BR).append(BR);
}
}
@@ -273,7 +272,7 @@ public abstract class HTMLComposerImpl extends HTMLComposer {
@Override
public void doneProblemDescription(@NotNull StringBuilder buf) {
buf.append("\n</div><br>");
buf.append("\n</div>");
}
@Override

View File

@@ -171,7 +171,6 @@ public final class DescriptorComposer extends HTMLComposerImpl {
}
}
buf.append(res.replace("#end", "").replace("#treeend",""));
buf.append(BR).append(BR);
composeAdditionalDescription(buf, refElement);
}