How to use the @theia/languages/lib/browser.Position.create function in @theia/languages

To help you get started, we’ve selected a few @theia/languages examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ballerina-platform / ballerina-lang / tool-plugins / theia / ballerina-extension / src / browser / ballerina-language-client.ts View on Github external
const revealRangeInEditor = (editor: TextEditor) => {
            const { start, end } = params.range;
            const startPosition = Position.create(start.line - 1, start.character - 1);
            const endPosition = Position.create(end.line - 1, end.character - 1);
            const range = Range.create(startPosition, endPosition);
            editor.revealRange(range);
            editor.selection = range;
        };
        const activeEditorWidget = this.editorManager.currentEditor;
github ballerina-platform / ballerina-lang / tool-plugins / theia / ballerina-extension / src / browser / ballerina-language-client.ts View on Github external
const revealRangeInEditor = (editor: TextEditor) => {
            const { start, end } = params.range;
            const startPosition = Position.create(start.line - 1, start.character - 1);
            const endPosition = Position.create(end.line - 1, end.character - 1);
            const range = Range.create(startPosition, endPosition);
            editor.revealRange(range);
            editor.selection = range;
        };
        const activeEditorWidget = this.editorManager.currentEditor;