use of org.eclipse.che.api.languageserver.shared.lsapi.DocumentFormattingParamsDTO in project che by eclipse.
the class LanguageServerFormatter method formatFullDocument.
private void formatFullDocument(Document document) {
DocumentFormattingParamsDTO params = dtoFactory.createDto(DocumentFormattingParamsDTO.class);
TextDocumentIdentifierDTO identifier = dtoFactory.createDto(TextDocumentIdentifierDTO.class);
identifier.setUri(document.getFile().getLocation().toString());
params.setTextDocument(identifier);
params.setOptions(getFormattingOptions());
Promise<List<TextEditDTO>> promise = client.formatting(params);
handleFormatting(promise, document);
}
Aggregations