• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java WorkspaceClientCapabilities类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.eclipse.lsp4j.WorkspaceClientCapabilities的典型用法代码示例。如果您正苦于以下问题:Java WorkspaceClientCapabilities类的具体用法?Java WorkspaceClientCapabilities怎么用?Java WorkspaceClientCapabilities使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

WorkspaceClientCapabilities类属于org.eclipse.lsp4j包,在下文中一共展示了WorkspaceClientCapabilities类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: initialize

点赞 3

import org.eclipse.lsp4j.WorkspaceClientCapabilities; //导入依赖的package包/类
private InitializeResult initialize(boolean dynamicRegistration) throws InterruptedException, ExecutionException {
	InitializeParams params = new InitializeParams();
	ClientCapabilities capabilities = new ClientCapabilities();
	WorkspaceClientCapabilities workspaceCapabilities = new WorkspaceClientCapabilities();
	workspaceCapabilities.setDidChangeConfiguration(new DidChangeConfigurationCapabilities(dynamicRegistration));
	ExecuteCommandCapabilities executeCommand = new ExecuteCommandCapabilities(dynamicRegistration);
	workspaceCapabilities.setExecuteCommand(executeCommand);
	capabilities.setWorkspace(workspaceCapabilities);
	TextDocumentClientCapabilities textDocument = new TextDocumentClientCapabilities();
	SynchronizationCapabilities synchronizationCapabilities = new SynchronizationCapabilities();
	synchronizationCapabilities.setWillSave(Boolean.TRUE);
	synchronizationCapabilities.setWillSaveWaitUntil(Boolean.TRUE);
	capabilities.setTextDocument(textDocument);
	params.setCapabilities(capabilities);
	CompletableFuture<InitializeResult> result = server.initialize(params);
	return result.get();
}
 

开发者ID:eclipse,
项目名称:eclipse.jdt.ls,
代码行数:18,
代码来源:InitHandlerTest.java

示例2: initialize

点赞 2

import org.eclipse.lsp4j.WorkspaceClientCapabilities; //导入依赖的package包/类
public void initialize(final Iterable<? extends IResourceServiceProvider> allLanguages, final ClientCapabilities capabilities, final LanguageClient client) {
  this.client = client;
  this.registeredCommands = HashMultimap.<String, IExecutableCommandService>create();
  Boolean _elvis = null;
  WorkspaceClientCapabilities _workspace = capabilities.getWorkspace();
  ExecuteCommandCapabilities _executeCommand = null;
  if (_workspace!=null) {
    _executeCommand=_workspace.getExecuteCommand();
  }
  Boolean _dynamicRegistration = null;
  if (_executeCommand!=null) {
    _dynamicRegistration=_executeCommand.getDynamicRegistration();
  }
  if (_dynamicRegistration != null) {
    _elvis = _dynamicRegistration;
  } else {
    _elvis = Boolean.valueOf(false);
  }
  final boolean hasDynamicRegistration = (boolean) _elvis;
  for (final IResourceServiceProvider lang : allLanguages) {
    {
      final IExecutableCommandService service = lang.<IExecutableCommandService>get(IExecutableCommandService.class);
      if ((service != null)) {
        final List<String> commands = service.initialize();
        for (final String c : commands) {
          this.registeredCommands.put(c, service);
        }
        if (hasDynamicRegistration) {
          final Function1<String, IDisposable> _function = (String command) -> {
            return this.register(command, service);
          };
          service.initializeDynamicRegistration(_function);
        }
      }
    }
  }
}
 

开发者ID:eclipse,
项目名称:xtext-core,
代码行数:38,
代码来源:ExecutableCommandRegistry.java

示例3: ClientCapabilities

点赞 2

import org.eclipse.lsp4j.WorkspaceClientCapabilities; //导入依赖的package包/类
public ClientCapabilities(final WorkspaceClientCapabilities workspace, final TextDocumentClientCapabilities textDocument, final Object experimental) {
  this.workspace = workspace;
  this.textDocument = textDocument;
  this.experimental = experimental;
}
 

开发者ID:smarr,
项目名称:SOMns-vscode,
代码行数:6,
代码来源:ClientCapabilities.java

示例4: getWorkspace

点赞 2

import org.eclipse.lsp4j.WorkspaceClientCapabilities; //导入依赖的package包/类
/**
 * Workspace specific client capabilities.
 */
@Pure
public WorkspaceClientCapabilities getWorkspace() {
  return this.workspace;
}
 

开发者ID:smarr,
项目名称:SOMns-vscode,
代码行数:8,
代码来源:ClientCapabilities.java

示例5: setWorkspace

点赞 2

import org.eclipse.lsp4j.WorkspaceClientCapabilities; //导入依赖的package包/类
/**
 * Workspace specific client capabilities.
 */
public void setWorkspace(final WorkspaceClientCapabilities workspace) {
  this.workspace = workspace;
}
 

开发者ID:smarr,
项目名称:SOMns-vscode,
代码行数:7,
代码来源:ClientCapabilities.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)