vscode#TextDocumentShowOptions TypeScript Examples

The following examples show how to use vscode#TextDocumentShowOptions. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: activator.ts    From plugin-vscode with Apache License 2.0 6 votes vote down vote up
function openBallerinaFile(construct: ConstructIdentifier) {
    if (construct.filePath && (construct.kind === PROJECT_KIND.FUNCTION || construct.kind === PROJECT_KIND.RESOURCE)) {
        const showOptions: TextDocumentShowOptions = {
            preserveFocus: false,
            preview: false,
            viewColumn: ViewColumn.Active,
            selection: new Range(construct.startLine!, construct.startColumn!, construct.startLine!, construct.startColumn!)
        };
        const status = commands.executeCommand('vscode.open', Uri.file(construct.filePath), showOptions);
        if (!status) {
            throw new Error(`Unable to open ${construct.filePath}`);
        }
    }
}
Example #2
Source File: driveView.ts    From google-drive-vscode with MIT License 5 votes vote down vote up
private defaultOpenOptions(): TextDocumentShowOptions {
        const options: TextDocumentShowOptions = {
            viewColumn: ViewColumn.Active,
            preview: false
        }
        return options;
    }