Small changes
This commit is contained in:
@@ -20,19 +20,19 @@
|
||||
"commands": [
|
||||
{
|
||||
"command": "frog.executeSnippet",
|
||||
"title": "Execute SQL Snippet"
|
||||
"title": "Frog: Execute SQL Snippet"
|
||||
},
|
||||
{
|
||||
"command": "frog.compileFile",
|
||||
"title": "Compiles the current file"
|
||||
"title": "Frog: Compiles the current file"
|
||||
},
|
||||
{
|
||||
"command": "frog.selectConnection",
|
||||
"title": "Selects the connection to use"
|
||||
"title": "Frog: Selects the connection to use"
|
||||
},
|
||||
{
|
||||
"command": "frog.setRowLimit",
|
||||
"title": "Sets the row limit"
|
||||
"title": "Frog: Sets the row limit"
|
||||
}
|
||||
],
|
||||
"keybindings": [
|
||||
|
@@ -69,6 +69,8 @@ export class SessionManager {
|
||||
try {
|
||||
let json = JSON.parse(outputBuffer);
|
||||
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
const document = editor.document;
|
||||
const diagnostics = [];
|
||||
let cd = json['columnDefinitions']
|
||||
|
||||
@@ -79,9 +81,6 @@ export class SessionManager {
|
||||
if (json['userErrors']) {
|
||||
this.outputChannel.append("Errors found:\n");
|
||||
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
const document = editor.document;
|
||||
|
||||
for (let error of json['userErrors'][0]['lines']) {
|
||||
let range = document.lineAt(editor.selection.start.line + error['line'] - 1).range;
|
||||
let diagnostic = new vscode.Diagnostic(range, error['text'], vscode.DiagnosticSeverity.Error);
|
||||
@@ -91,7 +90,6 @@ export class SessionManager {
|
||||
this.outputChannel.append(error['line'] + ": " + error['text'] + "\n");
|
||||
}
|
||||
|
||||
this.diagnosticCollection.set(document.uri, diagnostics);
|
||||
} else if (json['exception']) {
|
||||
this.outputChannel.append("Exception caught: " + json['exceptionMessage'] + "\n");
|
||||
} else if ("affectedRows" in json) {
|
||||
@@ -111,6 +109,7 @@ export class SessionManager {
|
||||
this.outputChannel.append("Query successful.\n");
|
||||
}
|
||||
|
||||
this.diagnosticCollection.set(document.uri, diagnostics);
|
||||
this.outputChannel.append("-- " + new Date() + " -------------------------------\n");
|
||||
outputBuffer = "";
|
||||
this.statusBarItem.text = this.currentConnection.name + " (Connected)";
|
||||
|
Reference in New Issue
Block a user