Skip to main content

module util::IDEServices

rascal-0.34.0

Usage

import util::IDEServices;

Dependencies

extend analysis::diff::edits::TextEdits;
extend Content;
extend Message;

function browse

Open a browser for a given location.

void browse(loc uri, str title = "<uri>", int viewColumn=1)

function edit

Open an editor for file at a given location.

void edit(loc uri)

function applyDocumentsEdits

Let the IDE apply a list of document edits.

void applyDocumentsEdits(list[DocumentEdit] edits)

Asks the IDE to apply document edits as defined in the standard library module analysis::diff::edits::TextEdits, according to the semantics defined in analysis::diff::edits::ExecuteTextEdits. However, the IDE can take care of these changes in order to provide important UI experience features such as "preview" and "undo".

Typically a call to this IDE service method is included in the implementation of refactoring and quick-fix features of the language service protocol.

function showInteractiveContent

Asks the IDE to show a "browser window" with the given interactive Content.

void showInteractiveContent(Content content, str title=content.title, int viewColumn=content.viewColumn)

function showMessage

void showMessage(Message message)

function logMessage

void logMessage(Message message)

function registerDiagnostics

void registerDiagnostics(list[Message] messages)

function unregisterDiagnostics

void unregisterDiagnostics(list[loc] resources)