@@ -65,8 +65,8 @@ export default class Utils {
65
65
static sleep = ( ms : number ) : Promise < void > => new Promise ( res => setTimeout ( res , ms ) ) ;
66
66
67
67
static getWorkspacePath ( ) : string | undefined {
68
- let folders = workspace . workspaceFolders ;
69
- let path = folders ? folders ! [ 0 ] . uri . fsPath : undefined ;
68
+ const folders = workspace . workspaceFolders ;
69
+ const path = folders ? folders ! [ 0 ] . uri . fsPath : undefined ;
70
70
if ( path === undefined ) {
71
71
return undefined
72
72
}
@@ -87,9 +87,9 @@ export default class Utils {
87
87
}
88
88
89
89
static extractMetaDataFromDocument ( document : vscode . TextDocument ) : IDocumentMetaData {
90
- const filePath = document . uri . fsPath ;
90
+ const filePath = document . uri . path ;
91
91
const workspaceFolder = workspace . getWorkspaceFolder ( document . uri ) ;
92
- const relativePath = workspaceFolder ? path . relative ( workspaceFolder . uri . fsPath , filePath ) : '' ;
92
+ const relativePath = workspaceFolder ? path . relative ( workspaceFolder . uri . path , filePath ) : '' ;
93
93
const splitKey : string | undefined = relativePath . split ( '/' ) . pop ( ) ;
94
94
const fileContent = document . getText ( ) ;
95
95
const isTextDocument = Utils . isTextDocument ( document ) ;
@@ -145,6 +145,7 @@ export default class Utils {
145
145
146
146
if ( workspaceFolders ) {
147
147
const rootFolder = workspaceFolders [ 0 ] ;
148
+
148
149
return rootFolder . name ;
149
150
}
150
151
@@ -161,8 +162,8 @@ export default class Utils {
161
162
return undefined ;
162
163
}
163
164
164
- let documentMetaData = this . extractMetaDataFromDocument ( editor . document ) ;
165
- let fileName : string | undefined = documentMetaData . fileName ;
165
+ const documentMetaData = this . extractMetaDataFromDocument ( editor . document ) ;
166
+ const fileName : string | undefined = documentMetaData . fileName ;
166
167
if ( ! fileName ) return undefined
167
168
168
169
return {
@@ -195,7 +196,7 @@ export default class Utils {
195
196
return results
196
197
}
197
198
198
- static decorateCurrentEditorWithHighlights ( problems : Problem [ ] , problemEditor : vscode . TextEditor ) : boolean {
199
+ static decorateCurrentEditorWithHighlights ( problems : Problem [ ] , problemEditor : vscode . TextEditor , _debug ?: vscode . OutputChannel ) : boolean {
199
200
const currentEditor = vscode . window . activeTextEditor ;
200
201
if ( ! currentEditor ) return false ;
201
202
@@ -204,6 +205,7 @@ export default class Utils {
204
205
if ( ! isUserOnProblemEditor ) return false ;
205
206
206
207
const { decorations } = GenerateDecorations ( problems , currentEditor ) ;
208
+ _debug ?. appendLine ( 'Decorations: ' + JSON . stringify ( decorations ) ) ;
207
209
problemEditor . setDecorations ( decorationType , [ ] ) ;
208
210
problemEditor . setDecorations ( decorationType , decorations ) ;
209
211
0 commit comments