@@ -27,9 +27,9 @@ interface IResourceTemplateData {
27
27
28
28
interface IMarkerTemplateData {
29
29
icon : HTMLElement ;
30
+ source : HighlightedLabel ;
30
31
description : HighlightedLabel ;
31
32
lnCol : HTMLElement ;
32
- source : HighlightedLabel ;
33
33
}
34
34
35
35
export class DataSource implements IDataSource {
@@ -116,9 +116,9 @@ export class Renderer implements IRenderer {
116
116
private renderMarkerTemplate ( container : HTMLElement ) : IMarkerTemplateData {
117
117
var data : IMarkerTemplateData = Object . create ( null ) ;
118
118
data . icon = dom . append ( container , dom . emmet ( '.marker-icon' ) ) ;
119
+ data . source = new HighlightedLabel ( dom . append ( container , dom . emmet ( '' ) ) ) ;
119
120
data . description = new HighlightedLabel ( dom . append ( container , dom . emmet ( '.marker-description' ) ) ) ;
120
121
data . lnCol = dom . append ( container , dom . emmet ( 'span.marker-line' ) ) ;
121
- data . source = new HighlightedLabel ( dom . append ( container , dom . emmet ( '.marker-source' ) ) ) ;
122
122
return data ;
123
123
}
124
124
@@ -142,17 +142,19 @@ export class Renderer implements IRenderer {
142
142
templateData . icon . className = 'icon ' + Renderer . iconClassNameFor ( marker ) ;
143
143
templateData . description . set ( marker . message , element . labelMatches ) ;
144
144
145
- templateData . lnCol . textContent = Messages . MARKERS_PANEL_AT_LINE_COL_NUMBER ( marker . startLineNumber , marker . startColumn ) ;
146
- let title = Messages . MARKERS_PANEL_TITLE_AT_LINE_COL_NUMBER ( marker . startLineNumber , marker . startColumn ) ;
147
- templateData . lnCol . title = title ;
148
- templateData . lnCol . setAttribute ( 'aria-label' , title ) ;
149
-
145
+ dom . toggleClass ( templateData . source . element , 'marker-source' , ! ! marker . source ) ;
146
+ templateData . source . set ( marker . source , element . sourceMatches ) ;
150
147
if ( marker . source ) {
151
- templateData . source . set ( marker . source , element . sourceMatches ) ;
152
148
let title = Messages . MARKERS_PANEL_TITLE_SOURCE ( marker . source ) ;
153
149
templateData . source . element . title = title ;
154
150
templateData . source . element . setAttribute ( 'aria-label' , title ) ;
155
151
}
152
+
153
+ templateData . lnCol . textContent = Messages . MARKERS_PANEL_AT_LINE_COL_NUMBER ( marker . startLineNumber , marker . startColumn ) ;
154
+ let title = Messages . MARKERS_PANEL_TITLE_AT_LINE_COL_NUMBER ( marker . startLineNumber , marker . startColumn ) ;
155
+ templateData . lnCol . title = title ;
156
+ templateData . lnCol . setAttribute ( 'aria-label' , title ) ;
157
+
156
158
}
157
159
158
160
private static iconClassNameFor ( element : IMarker ) : string {
0 commit comments