本文整理汇总了Java中org.eclipse.lsp4j.DidCloseTextDocumentParams类的典型用法代码示例。如果您正苦于以下问题:Java DidCloseTextDocumentParams类的具体用法?Java DidCloseTextDocumentParams怎么用?Java DidCloseTextDocumentParams使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DidCloseTextDocumentParams类属于org.eclipse.lsp4j包,在下文中一共展示了DidCloseTextDocumentParams类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: handleClosed
import org.eclipse.lsp4j.DidCloseTextDocumentParams; //导入依赖的package包/类
public void handleClosed(DidCloseTextDocumentParams params) {
String uri = params.getTextDocument().getUri();
ICompilationUnit unit = JDTUtils.resolveCompilationUnit(uri);
if (unit == null) {
return;
}
try {
if (JDTUtils.isDefaultProject(unit) || !JDTUtils.isOnClassPath(unit)) {
new DiagnosticsHandler(connection, unit).clearDiagnostics();
}
sharedASTProvider.invalidate(unit);
unit.discardWorkingCopy();
} catch (CoreException e) {
JavaLanguageServerPlugin.logException("Error while handling document close", e);
}
}
开发者ID:eclipse,项目名称:eclipse.jdt.ls,代码行数:17,代码来源:DocumentLifeCycleHandler.java
示例2: didClose
import org.eclipse.lsp4j.DidCloseTextDocumentParams; //导入依赖的package包/类
private void didClose(DidCloseTextDocumentParams didCloseTextDocumentParams) {
try {
String uri = prefixURI(didCloseTextDocumentParams.getTextDocument().getUri());
didCloseTextDocumentParams.getTextDocument().setUri(uri);
languageServerRegistry
.getApplicableLanguageServers(uri)
.stream()
.flatMap(Collection::stream)
.map(InitializedLanguageServer::getServer)
.forEach(
server -> {
server.getTextDocumentService().didClose(didCloseTextDocumentParams);
});
} catch (LanguageServerException e) {
LOG.error("Error trying to process textDocument/didOpen", e);
}
}
开发者ID:eclipse,项目名称:che,代码行数:18,代码来源:TextDocumentService.java
示例3: didClose
import org.eclipse.lsp4j.DidCloseTextDocumentParams; //导入依赖的package包/类
public void didClose(DidCloseTextDocumentParams params) {
try {
ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
@Override
public void run(IProgressMonitor monitor) throws CoreException {
handleClosed(params);
}
}, new NullProgressMonitor());
} catch (CoreException e) {
JavaLanguageServerPlugin.logException("Handle document close ", e);
}
}
开发者ID:eclipse,项目名称:eclipse.jdt.ls,代码行数:13,代码来源:DocumentLifeCycleHandler.java
示例4: closeDocument
import org.eclipse.lsp4j.DidCloseTextDocumentParams; //导入依赖的package包/类
private void closeDocument(ICompilationUnit cu) {
DidCloseTextDocumentParams closeParms = new DidCloseTextDocumentParams();
TextDocumentIdentifier textDocument = new TextDocumentIdentifier();
textDocument.setUri(JDTUtils.toURI(cu));
closeParms.setTextDocument(textDocument);
lifeCycleHandler.didClose(closeParms);
}
开发者ID:eclipse,项目名称:eclipse.jdt.ls,代码行数:8,代码来源:DocumentLifeCycleHandlerTest.java
示例5: close
import org.eclipse.lsp4j.DidCloseTextDocumentParams; //导入依赖的package包/类
protected void close(final String fileUri) {
DidCloseTextDocumentParams _didCloseTextDocumentParams = new DidCloseTextDocumentParams();
final Procedure1<DidCloseTextDocumentParams> _function = (DidCloseTextDocumentParams it) -> {
TextDocumentIdentifier _textDocumentIdentifier = new TextDocumentIdentifier(fileUri);
it.setTextDocument(_textDocumentIdentifier);
};
DidCloseTextDocumentParams _doubleArrow = ObjectExtensions.<DidCloseTextDocumentParams>operator_doubleArrow(_didCloseTextDocumentParams, _function);
this.languageServer.didClose(_doubleArrow);
}
开发者ID:eclipse,项目名称:xtext-core,代码行数:10,代码来源:AbstractLanguageServerTest.java
示例6: didClose
import org.eclipse.lsp4j.DidCloseTextDocumentParams; //导入依赖的package包/类
@Override
public void didClose(final DidCloseTextDocumentParams params) {
final Function0<BuildManager.Buildable> _function = () -> {
return this.workspaceManager.didClose(this._uriExtensions.toUri(params.getTextDocument().getUri()));
};
final Function2<CancelIndicator, BuildManager.Buildable, List<IResourceDescription.Delta>> _function_1 = (CancelIndicator cancelIndicator, BuildManager.Buildable buildable) -> {
return buildable.build(cancelIndicator);
};
this.requestManager.<BuildManager.Buildable, List<IResourceDescription.Delta>>runWrite(_function, _function_1);
}
开发者ID:eclipse,项目名称:xtext-core,代码行数:11,代码来源:LanguageServerImpl.java
示例7: onClose
import org.eclipse.lsp4j.DidCloseTextDocumentParams; //导入依赖的package包/类
private void onClose(
TextDocumentIdentifier documentId,
DtoFactory dtoFactory,
TextDocumentServiceClient serviceClient) {
DidCloseTextDocumentParams closeEvent = dtoFactory.createDto(DidCloseTextDocumentParams.class);
closeEvent.setTextDocument(documentId);
serviceClient.didClose(closeEvent);
}
开发者ID:eclipse,项目名称:che,代码行数:9,代码来源:LanguageServerExtension.java
示例8: didClose
import org.eclipse.lsp4j.DidCloseTextDocumentParams; //导入依赖的package包/类
@Override
public void didClose(DidCloseTextDocumentParams params) {
LOGGER.info("didClose: " + params.getTextDocument());
openedDocuments.remove(params.getTextDocument().getUri());
}
开发者ID:lhein,项目名称:camel-language-server,代码行数:6,代码来源:CamelTextDocumentService.java
示例9: didClose
import org.eclipse.lsp4j.DidCloseTextDocumentParams; //导入依赖的package包/类
@Override
public void didClose(final DidCloseTextDocumentParams params) {
// TODO Auto-generated method stub
}
开发者ID:smarr,项目名称:SOMns-vscode,代码行数:5,代码来源:SomLanguageServer.java
示例10: didClose
import org.eclipse.lsp4j.DidCloseTextDocumentParams; //导入依赖的package包/类
@Override
public void didClose(DidCloseTextDocumentParams params) {
logInfo(">> document/didClose");
documentLifeCycleHandler.didClose(params);
}
开发者ID:eclipse,项目名称:eclipse.jdt.ls,代码行数:6,代码来源:JDTLanguageServer.java
示例11: didClose
import org.eclipse.lsp4j.DidCloseTextDocumentParams; //导入依赖的package包/类
@Override
public void didClose(DidCloseTextDocumentParams params) {
throw new UnsupportedOperationException();
}
开发者ID:eclipse,项目名称:lsp4j,代码行数:5,代码来源:MockLanguageServer.java
示例12: didClose
import org.eclipse.lsp4j.DidCloseTextDocumentParams; //导入依赖的package包/类
@Override
public void didClose(DidCloseTextDocumentParams params) {}
开发者ID:eclipse,项目名称:che,代码行数:3,代码来源:MavenTextDocumentService.java
示例13: configureMethods
import org.eclipse.lsp4j.DidCloseTextDocumentParams; //导入依赖的package包/类
@PostConstruct
public void configureMethods() {
dtoToDtoList(
"definition", TextDocumentPositionParams.class, LocationDto.class, this::definition);
dtoToDtoList("codeAction", CodeActionParams.class, CommandDto.class, this::codeAction);
dtoToDtoList(
"documentSymbol",
DocumentSymbolParams.class,
SymbolInformationDto.class,
this::documentSymbol);
dtoToDtoList("formatting", DocumentFormattingParams.class, TextEditDto.class, this::formatting);
dtoToDtoList(
"rangeFormatting",
DocumentRangeFormattingParams.class,
TextEditDto.class,
this::rangeFormatting);
dtoToDtoList("references", ReferenceParams.class, LocationDto.class, this::references);
dtoToDtoList(
"onTypeFormatting",
DocumentOnTypeFormattingParams.class,
TextEditDto.class,
this::onTypeFormatting);
dtoToDto(
"completionItem/resolve",
ExtendedCompletionItem.class,
ExtendedCompletionItemDto.class,
this::completionItemResolve);
dtoToDto(
"documentHighlight",
TextDocumentPositionParams.class,
DocumentHighlight.class,
this::documentHighlight);
dtoToDto(
"completion",
TextDocumentPositionParams.class,
ExtendedCompletionListDto.class,
this::completion);
dtoToDto("hover", TextDocumentPositionParams.class, HoverDto.class, this::hover);
dtoToDto(
"signatureHelp",
TextDocumentPositionParams.class,
SignatureHelpDto.class,
this::signatureHelp);
dtoToDto("rename", RenameParams.class, RenameResultDto.class, this::rename);
dtoToNothing("didChange", DidChangeTextDocumentParams.class, this::didChange);
dtoToNothing("didClose", DidCloseTextDocumentParams.class, this::didClose);
dtoToNothing("didOpen", DidOpenTextDocumentParams.class, this::didOpen);
dtoToNothing("didSave", DidSaveTextDocumentParams.class, this::didSave);
}
开发者ID:eclipse,项目名称:che,代码行数:53,代码来源:TextDocumentService.java
示例14: didClose
import org.eclipse.lsp4j.DidCloseTextDocumentParams; //导入依赖的package包/类
/**
* The document close notification is sent from the client to the server
* when the document got closed in the client. The document's truth now
* exists where the document's uri points to (e.g. if the document's uri is
* a file uri the truth now exists on disk).
*
* Registration Options: TextDocumentRegistrationOptions
*/
@JsonNotification
void didClose(DidCloseTextDocumentParams params);
开发者ID:smarr,项目名称:SOMns-vscode,代码行数:11,代码来源:TextDocumentService.java
示例15: didClose
import org.eclipse.lsp4j.DidCloseTextDocumentParams; //导入依赖的package包/类
/**
* GWT client implementation of {@link TextDocumentService#didClose(DidCloseTextDocumentParams)}
*
* @param params
* @return
*/
public void didClose(DidCloseTextDocumentParams params) {
transmitDtoAndReceiveNothing(params, "textDocument/didClose");
}
开发者ID:eclipse,项目名称:che,代码行数:10,代码来源:TextDocumentServiceClient.java
注:本文中的org.eclipse.lsp4j.DidCloseTextDocumentParams类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论