mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inspection view: remove tags in descriptor text
This commit is contained in:
+1
-3
@@ -29,7 +29,6 @@ import javax.swing.*;
|
||||
* @author Dmitry Batkovich
|
||||
*/
|
||||
class InspectionTreeCellRenderer extends ColoredTreeCellRenderer {
|
||||
private final InspectionResultsView myView;
|
||||
private final InspectionTreeTailRenderer myTailRenderer;
|
||||
|
||||
InspectionTreeCellRenderer(InspectionResultsView view) {
|
||||
@@ -44,7 +43,6 @@ class InspectionTreeCellRenderer extends ColoredTreeCellRenderer {
|
||||
append(text);
|
||||
}
|
||||
};
|
||||
myView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -65,7 +63,7 @@ class InspectionTreeCellRenderer extends ColoredTreeCellRenderer {
|
||||
setIcon(node.getIcon(expanded));
|
||||
}
|
||||
|
||||
private SimpleTextAttributes patchMainTextAttrs(InspectionTreeNode node, SimpleTextAttributes attributes) {
|
||||
private static SimpleTextAttributes patchMainTextAttrs(InspectionTreeNode node, SimpleTextAttributes attributes) {
|
||||
if (node.isExcluded()) {
|
||||
return attributes.derive(attributes.getStyle() | SimpleTextAttributes.STYLE_STRIKEOUT, null, null, null);
|
||||
}
|
||||
|
||||
@@ -13,11 +13,11 @@ import com.intellij.codeInspection.ex.InspectionToolWrapper;
|
||||
import com.intellij.codeInspection.reference.RefElement;
|
||||
import com.intellij.codeInspection.reference.RefEntity;
|
||||
import com.intellij.lang.annotation.HighlightSeverity;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.profile.codeInspection.InspectionProfileManager;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.util.ObjectUtils;
|
||||
import com.intellij.util.containers.WeakStringInterner;
|
||||
import com.intellij.xml.util.XmlStringUtil;
|
||||
import gnu.trove.TObjectIntHashMap;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -153,7 +153,8 @@ public class ProblemDescriptionNode extends SuppressableInspectionTreeNode {
|
||||
|
||||
@Override
|
||||
public boolean isExcluded() {
|
||||
return getPresentation().isExcluded(getDescriptor());
|
||||
CommonProblemDescriptor descriptor = getDescriptor();
|
||||
return descriptor != null && getPresentation().isExcluded(descriptor);
|
||||
}
|
||||
|
||||
private static final WeakStringInterner NAME_INTERNER = new WeakStringInterner();
|
||||
@@ -164,9 +165,7 @@ public class ProblemDescriptionNode extends SuppressableInspectionTreeNode {
|
||||
CommonProblemDescriptor descriptor = getDescriptor();
|
||||
if (descriptor == null) return "";
|
||||
PsiElement element = descriptor instanceof ProblemDescriptor ? ((ProblemDescriptor)descriptor).getPsiElement() : null;
|
||||
|
||||
String name = XmlStringUtil.stripHtml(ProblemDescriptorUtil.renderDescriptionMessage(descriptor, element,
|
||||
ProblemDescriptorUtil.TRIM_AT_TREE_END));
|
||||
String name = StringUtil.removeHtmlTags(ProblemDescriptorUtil.renderDescriptionMessage(descriptor, element, ProblemDescriptorUtil.TRIM_AT_TREE_END), true);
|
||||
return NAME_INTERNER.intern(name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user