mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-155420 Update Event Log look and behavior
This commit is contained in:
@@ -142,14 +142,14 @@ public class EventLog {
|
||||
String content = truncateLongString(showMore, notification.getContent());
|
||||
|
||||
RangeMarker afterTitle = null;
|
||||
boolean hasHtml = parseHtmlContent(title, notification, logDoc, showMore, links, lineSeparators);
|
||||
boolean hasHtml = parseHtmlContent(addIndents(title, indent), notification, logDoc, showMore, links, lineSeparators);
|
||||
if (StringUtil.isNotEmpty(title)) {
|
||||
if (StringUtil.isNotEmpty(content)) {
|
||||
appendText(logDoc, ": ");
|
||||
afterTitle = logDoc.createRangeMarker(logDoc.getTextLength() - 2, logDoc.getTextLength());
|
||||
}
|
||||
}
|
||||
hasHtml |= parseHtmlContent(content, notification, logDoc, showMore, links, lineSeparators);
|
||||
hasHtml |= parseHtmlContent(addIndents(content, indent), notification, logDoc, showMore, links, lineSeparators);
|
||||
|
||||
List<AnAction> actions = notification.getActions();
|
||||
if (NotificationsManagerImpl.newEnabled() && !actions.isEmpty()) {
|
||||
@@ -199,6 +199,11 @@ public class EventLog {
|
||||
return new LogEntry(logDoc.getText(), status, list);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static String addIndents(@NotNull String text, @NotNull String indent) {
|
||||
return StringUtil.replace(text, "\n", "\n" + indent);
|
||||
}
|
||||
|
||||
private static boolean isLongLine(@NotNull List<AnAction> actions) {
|
||||
int size = actions.size();
|
||||
if (size > 3) {
|
||||
|
||||
@@ -248,7 +248,7 @@ class EventLogConsole {
|
||||
new TextAttributes(null, null, null, null, Font.BOLD));
|
||||
}
|
||||
|
||||
String date = DateFormatUtil.formatTimeWithSeconds(notification.getTimestamp()) + " ";
|
||||
String date = DateFormatUtil.formatTime(notification.getTimestamp()) + " ";
|
||||
append(document, date);
|
||||
|
||||
int startLine = document.getLineCount() - 1;
|
||||
@@ -263,8 +263,7 @@ class EventLogConsole {
|
||||
: ConsoleViewContentType.LOG_WARNING_OUTPUT_KEY;
|
||||
|
||||
int msgStart = document.getTextLength();
|
||||
String message = pair.message;
|
||||
append(document, message);
|
||||
append(document, pair.message);
|
||||
|
||||
TextAttributes attributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(key);
|
||||
int layer = HighlighterLayer.CARET_ROW + 1;
|
||||
|
||||
Reference in New Issue
Block a user