Commit 6ee6fa36 authored by Aleksandr Samofalov's avatar Aleksandr Samofalov
Browse files

[build-messages] use switch instead of ifs and Note icon

parent 47f5d6b9
Showing with 13 additions and 12 deletions
+13 -12
......@@ -270,18 +270,19 @@ public class NewErrorTreeRenderer extends MultilineTreeCellRenderer {
icon = groupingElement.getFile() != null ? groupingElement.getFile().getFileType().getIcon() : AllIcons.FileTypes.Any_type;
}
else if (element instanceof SimpleMessageElement || element instanceof NavigatableMessageElement) {
ErrorTreeElementKind kind = element.getKind();
if (ErrorTreeElementKind.ERROR.equals(kind)) {
icon = AllIcons.General.Error;
}
else if (ErrorTreeElementKind.WARNING.equals(kind)) {
icon = AllIcons.General.Warning;
}
else if (ErrorTreeElementKind.NOTE.equals(kind)) {
icon = AllIcons.General.Note;
}
else if (ErrorTreeElementKind.INFO.equals(kind)) {
icon = AllIcons.General.Information;
switch (element.getKind()) {
case ERROR:
icon = AllIcons.General.Error;
break;
case WARNING:
icon = AllIcons.General.Warning;
break;
case NOTE:
icon = AllIcons.General.Note;
break;
case INFO:
icon = AllIcons.General.Information;
break;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment