Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private getAllScenarios(languageClient: LanguageClient, atCursor?: boolean): Thenable {
let uri = TextDocumentIdentifier.create(window.activeTextEditor.document.uri.toString());
let currPos = window.activeTextEditor.selection.active;
let params = { textDocument: uri, position: currPos };
if (!atCursor) {
// change the position to get all scenarios instead of only related to cursor position
params.position = new Position(1, 1);
}
return languageClient.sendRequest("gauge/scenarios", params, new CancellationTokenSource().token);
}
function getAllScenarios(languageClient: LanguageClient, atCursor?: boolean): Thenable {
let uri = TextDocumentIdentifier.create(window.activeTextEditor.document.uri.toString());
let currPos = window.activeTextEditor.selection.active;
let params = { textDocument: uri, position: currPos };
if (!atCursor) {
// change the position to get all scenarios instead of only related to cursor position
params.position = new Position(1, 1);
}
return languageClient.sendRequest("gauge/scenarios", params, new CancellationTokenSource().token);
}
public requestSyntaxTree(uri: string): Thenable {
return this._client.sendRequest(documentSyntaxTreeRequestType.type, {
textDocument: TextDocumentIdentifier.create(uri),
});
}
requestSyntaxTree(uri: string): Thenable {
return this._client.sendRequest(documentSyntaxTreeRequestType.type, {
textDocument: TextDocumentIdentifier.create(uri),
});
}
constructor(
razorDocumentUri: vscode.Uri,
range: vscode.Range,
) {
this.textDocument = TextDocumentIdentifier.create(razorDocumentUri.toString());
this.range = convertRangeToSerializable(range);
}
}
constructor(
razorDocumentUri: vscode.Uri) {
this.textDocument = TextDocumentIdentifier.create(razorDocumentUri.toString());
}
}
constructor(
razorDocumentUri: vscode.Uri,
public readonly previousResultId: string,
) {
this.textDocument = TextDocumentIdentifier.create(razorDocumentUri.toString());
}
}
public requestScriptInfo(uri: string): Thenable {
return this._client.sendRequest(documentScriptInfoRequestType.type, {
textDocument: TextDocumentIdentifier.create(uri),
});
}
return (): Thenable => {
let position = window.activeTextEditor.selection.active;
let documentId = TextDocumentIdentifier.create(window.activeTextEditor.document.uri.toString());
let activeEditor = window.activeTextEditor.document.uri;
let languageClient = clients.get(activeEditor.fsPath).client;
let params = { textDocument: documentId, position };
return languageClient.sendRequest("gauge/stepValueAt", params, new CancellationTokenSource().token).then(
(stepValue: string) => {
return this.showStepReferences(clients)(documentId.uri, position, stepValue);
});
};
}