提交 b4d91dea 编写于 作者: J Johannes Rieken

first steps in rendering related diagnostic information, #10271

上级 d43d9674
......@@ -22,6 +22,7 @@ import { editorErrorForeground, editorErrorBorder, editorWarningForeground, edit
import { ScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement';
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
import { ScrollType } from 'vs/editor/common/editorCommon';
import { basename } from 'vs/base/common/paths';
class MessageWidget {
......@@ -57,7 +58,7 @@ class MessageWidget {
dispose(this._disposables);
}
update({ source, message }: IMarker): void {
update({ source, message, relatedInformation }: IMarker): void {
if (source) {
this.lines = 0;
......@@ -79,6 +80,13 @@ class MessageWidget {
this.longestLineLength = message.length;
}
if (Array.isArray(relatedInformation)) {
for (const related of relatedInformation) {
this.lines += 1;
message += `\n${related.message} - ${basename(related.resource.path)}:${related.startLineNumber}`;
}
}
this._domNode.innerText = message;
this._editor.applyFontInfo(this._domNode);
const width = Math.floor(this._editor.getConfiguration().fontInfo.typicalFullwidthCharacterWidth * this.longestLineLength);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册