From e25609a49f319f1db5756f24ec51848ea69722d6 Mon Sep 17 00:00:00 2001 From: vince-fugnitto Date: Sun, 15 Mar 2020 22:26:24 -0400 Subject: [PATCH] markers: update format of markers This commit updates the formatting of markers present in the `problems-view` to be consistent with VS Code. Namely, the commit enforces that the marker message is the most important data, that the `owner` or `source` is displayed with the `code` if present, and the `line number` and `column number` are displayed last. Signed-off-by: vince-fugnitto --- .../markers/src/browser/problem/problem-widget.tsx | 12 +++++------- packages/markers/src/browser/style/index.css | 7 +------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/packages/markers/src/browser/problem/problem-widget.tsx b/packages/markers/src/browser/problem/problem-widget.tsx index 19a2071c8ca04..bf10b96c515f9 100644 --- a/packages/markers/src/browser/problem/problem-widget.tsx +++ b/packages/markers/src/browser/problem/problem-widget.tsx @@ -131,15 +131,13 @@ export class ProblemWidget extends TreeWidget {
-
- {'[' + (problemMarker.data.source || problemMarker.owner) + ']'} -
{problemMarker.data.message} - { - (problemMarker.data.code) ? {'[' + problemMarker.data.code + ']'} : '' - } + + {(problemMarker.data.source || problemMarker.owner)} + {problemMarker.data.code ? `(${problemMarker.data.code})` : ''} + - {'(' + (problemMarker.data.range.start.line + 1) + ', ' + (problemMarker.data.range.start.character + 1) + ')'} + {'[' + (problemMarker.data.range.start.line + 1) + ', ' + (problemMarker.data.range.start.character + 1) + ']'}
; diff --git a/packages/markers/src/browser/style/index.css b/packages/markers/src/browser/style/index.css index 0e07a50de5814..d258d87633163 100644 --- a/packages/markers/src/browser/style/index.css +++ b/packages/markers/src/browser/style/index.css @@ -69,14 +69,9 @@ } .theia-marker-container .markerNode .position, -.theia-marker-container .markerNode .owner, -.theia-marker-container .markerNode .code { +.theia-marker-container .markerNode .owner { color: var(--theia-descriptionForeground); white-space: nowrap; -} - -.theia-marker-container .markerNode .position, -.theia-marker-container .markerNode .code { margin-left: 5px; }