From ca1875db94e7610a684c4117ca634a3d590ffbca Mon Sep 17 00:00:00 2001 From: Faustino Aguilar Date: Wed, 2 Aug 2017 17:47:12 -0500 Subject: [PATCH 1/2] Fix errors on ECR and Slang templates. --- src/crystalProblemsFinder.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/crystalProblemsFinder.ts b/src/crystalProblemsFinder.ts index 4a8ddf6..32671ed 100644 --- a/src/crystalProblemsFinder.ts +++ b/src/crystalProblemsFinder.ts @@ -34,7 +34,11 @@ export class CrystalProblemsFinder { let diagnostic = new vscode.Diagnostic(range, problem.message, vscode.DiagnosticSeverity.Error) let file: vscode.Uri if (problem.file.length > 0) { - file = vscode.Uri.file(problem.file) + if (problem.file.endsWith('.ecr') || problem.file.endsWith('.slang')) { + file = vscode.Uri.file(vscode.workspace.rootPath + '/' + problem.file) + } else { + file = vscode.Uri.file(problem.file) + } } else { file = uri } From 25212a1710d4e1a223b945e0773e66a034365947 Mon Sep 17 00:00:00 2001 From: Faustino Aguilar Date: Wed, 2 Aug 2017 17:56:40 -0500 Subject: [PATCH 2/2] Fix diagnostics for other template engines. --- src/crystalProblemsFinder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crystalProblemsFinder.ts b/src/crystalProblemsFinder.ts index 32671ed..8e3fd67 100644 --- a/src/crystalProblemsFinder.ts +++ b/src/crystalProblemsFinder.ts @@ -34,7 +34,7 @@ export class CrystalProblemsFinder { let diagnostic = new vscode.Diagnostic(range, problem.message, vscode.DiagnosticSeverity.Error) let file: vscode.Uri if (problem.file.length > 0) { - if (problem.file.endsWith('.ecr') || problem.file.endsWith('.slang')) { + if (!problem.file.endsWith('.cr')) { file = vscode.Uri.file(vscode.workspace.rootPath + '/' + problem.file) } else { file = vscode.Uri.file(problem.file)