Java 类org.eclipse.lsp4j.jsonrpc.services.JsonRequest 实例源码

项目:lsp4j    文件:GenericEndpointTest.java   
protected void testSingleParams(Object params, String expectedString, Predicate<String> predicate) throws Exception {
    LogMessageAccumulator logMessages = null;
    try {
        if (predicate != null) {
            logMessages = new LogMessageAccumulator();
            logMessages.registerTo(GenericEndpoint.class);
        }
        GenericEndpoint endpoint = new GenericEndpoint(new Object() {

            @JsonRequest
            public CompletableFuture<String> getStringValue(String stringValue) {
                return CompletableFuture.completedFuture(stringValue);
            }

        });

        Assert.assertEquals(expectedString, endpoint.request("getStringValue", params).get());

        if (predicate != null) {
            logMessages.await(r -> Level.WARNING == r.getLevel() && predicate.test(r.getMessage()));
        }
    } finally {
        if (logMessages != null) {
            logMessages.unregister();
        }
    }
}
项目:dsp4e    文件:IDebugProtocolServer.java   
@JsonRequest
CompletableFuture<Capabilities> initialize(InitializeRequestArguments param);
项目:dsp4e    文件:IDebugProtocolServer.java   
@JsonRequest
CompletableFuture<DisconnectResponse> disconnect(DisconnectArguments disconnectArguments);
项目:dsp4e    文件:IDebugProtocolServer.java   
@JsonRequest
CompletableFuture<SetBreakpointsResponse.Body> setBreakpoints(SetBreakpointsArguments setBreakpointsArgs);
项目:dsp4e    文件:IDebugProtocolServer.java   
@JsonRequest
CompletableFuture<SetFunctionBreakpointsResponse.Body> setFunctionBreakpoints(
        SetFunctionBreakpointsArguments setFunctionBreakpointsArgs);
项目:dsp4e    文件:IDebugProtocolServer.java   
@JsonRequest
CompletableFuture<Void> launch(Either<Map<String, Object>, LaunchRequestArguments> launchArguments);
项目:dsp4e    文件:IDebugProtocolServer.java   
@JsonRequest
CompletableFuture<Void> configurationDone();
项目:dsp4e    文件:IDebugProtocolServer.java   
@JsonRequest
CompletableFuture<ThreadsResponse.Body> threads();
项目:dsp4e    文件:IDebugProtocolServer.java   
@JsonRequest
CompletableFuture<VariablesResponse.Body> variables(VariablesArguments variablesArguments);
项目:dsp4e    文件:IDebugProtocolServer.java   
@JsonRequest
CompletableFuture<Void> next(NextArguments nextArguments);
项目:dsp4e    文件:IDebugProtocolServer.java   
@JsonRequest
CompletableFuture<Void> stepIn(StepInArguments stepInArguments);
项目:dsp4e    文件:IDebugProtocolServer.java   
@JsonRequest
CompletableFuture<Void> stepOut(StepOutArguments stepOutArguments);
项目:dsp4e    文件:IDebugProtocolServer.java   
@JsonRequest(value = "continue")
CompletableFuture<ContinueResponse.Body> continue_(ContinueArguments arguments);
项目:dsp4e    文件:IDebugProtocolServer.java   
@JsonRequest
CompletableFuture<StackTraceResponse.Body> stackTrace(StackTraceArguments stackTraceArguments);
项目:dsp4e    文件:IDebugProtocolServer.java   
@JsonRequest
CompletableFuture<ScopesResponse.Body> scopes(ScopesArguments scopesArguments);
项目:dsp4e    文件:DebugIntegrationTest.java   
@JsonRequest
CompletableFuture<MyParam> askServer(MyParam param);
项目:dsp4e    文件:DebugIntegrationTest.java   
@JsonRequest
CompletableFuture<MyParam> askClient(MyParam param);
项目:SOMns-vscode    文件:LanguageClient.java   
/**
 * The workspace/applyEdit request is sent from the server to the client to modify resource on the client side.
 */
@JsonRequest("workspace/applyEdit")
default CompletableFuture<ApplyWorkspaceEditResponse> applyEdit(ApplyWorkspaceEditParams params) {
    throw new UnsupportedOperationException();
}
项目:SOMns-vscode    文件:LanguageClient.java   
/**
 * The client/unregisterCapability request is sent from the server to the client
 * to unregister a previously register capability.
 */
@JsonRequest("client/unregisterCapability")
default CompletableFuture<Void> unregisterCapability(UnregistrationParams params) {
    throw new UnsupportedOperationException();
}
项目:SOMns-vscode    文件:TextDocumentService.java   
/**
 * The document link resolve request is sent from the client to the server to resolve the target of a given document link.
 */
@JsonRequest(value="documentLink/resolve", useSegment = false)
default CompletableFuture<DocumentLink> documentLinkResolve(DocumentLink params) {
    throw new UnsupportedOperationException();
}
项目:eclipse.jdt.ls    文件:JavaProtocolExtensions.java   
@JsonRequest
CompletableFuture<String> classFileContents(TextDocumentIdentifier documentUri);
项目:eclipse.jdt.ls    文件:JavaProtocolExtensions.java   
@JsonRequest
CompletableFuture<BuildWorkspaceStatus> buildWorkspace(boolean forceReBuild);
项目:xtext-core    文件:TestLangLSPExtension.java   
@JsonRequest
public abstract CompletableFuture<TestLangLSPExtension.TextOfLineResult> getTextOfLine(final TestLangLSPExtension.TextOfLineParam param);
项目:lsp4j    文件:LanguageClient.java   
/**
 * The workspace/applyEdit request is sent from the server to the client to modify resource on the client side.
 */
@JsonRequest("workspace/applyEdit")
default CompletableFuture<ApplyWorkspaceEditResponse> applyEdit(ApplyWorkspaceEditParams params) {
    throw new UnsupportedOperationException();
}
项目:lsp4j    文件:LanguageClient.java   
/**
 * The client/unregisterCapability request is sent from the server to the client
 * to unregister a previously register capability.
 */
@JsonRequest("client/unregisterCapability")
default CompletableFuture<Void> unregisterCapability(UnregistrationParams params) {
    throw new UnsupportedOperationException();
}
项目:lsp4j    文件:TextDocumentService.java   
/**
 * The document link resolve request is sent from the client to the server to resolve the target of a given document link.
 */
@JsonRequest(value="documentLink/resolve", useSegment = false)
default CompletableFuture<DocumentLink> documentLinkResolve(DocumentLink params) {
    throw new UnsupportedOperationException();
}
项目:lsp4j    文件:DebugIntegrationTest.java   
@JsonRequest
CompletableFuture<MyParam> askServer(MyParam param);
项目:lsp4j    文件:DebugIntegrationTest.java   
@JsonRequest
CompletableFuture<MyParam> askClient(MyParam param);
项目:lsp4j    文件:IntegrationTest.java   
@JsonRequest
CompletableFuture<MyParam> askServer(MyParam param);
项目:lsp4j    文件:IntegrationTest.java   
@JsonRequest
CompletableFuture<MyParam> askClient(MyParam param);
项目:lsp4j    文件:EndpointsTest.java   
@JsonRequest
public CompletableFuture<String> doStuff(String arg);
项目:lsp4j    文件:EndpointsTest.java   
@JsonRequest
public CompletableFuture<String> doStuff(String arg, Integer arg2);
项目:sadlos2    文件:WorkspaceServer.java   
@JsonRequest
CompletableFuture<Void> renameFile(RenameFileParams params);
项目:SOMns-vscode    文件:TextDocumentService.java   
/**
 * The hover request is sent from the client to the server to request hover
 * information at a given text document position.
 * 
 * Registration Options: TextDocumentRegistrationOptions
 */
@JsonRequest
CompletableFuture<Hover> hover(TextDocumentPositionParams position);
项目:lsp4j    文件:LanguageServer.java   
/**
 * The initialize request is sent as the first request from the client to
 * the server.
 * 
 * If the server receives request or notification before the initialize request it should act as follows:
 *  - for a request the respond should be errored with code: -32001. The message can be picked by the server.
 *  - notifications should be dropped, except for the exit notification. This will allow the exit a server without an initialize request.
 *  
 * Until the server has responded to the initialize request with an InitializeResult 
 * the client must not sent any additional requests or notifications to the server.
 * 
 * During the initialize request the server is allowed to sent the notifications window/showMessage, 
 * window/logMessage and telemetry/event as well as the window/showMessageRequest request to the client.
 */
@JsonRequest
CompletableFuture<InitializeResult> initialize(InitializeParams params);
项目:SOMns-vscode    文件:LanguageClient.java   
/**
 * The client/registerCapability request is sent from the server to the client
 * to register for a new capability on the client side.
 * Not all clients need to support dynamic capability registration.
 * A client opts in via the ClientCapabilities.dynamicRegistration property
 */
@JsonRequest("client/registerCapability")
default CompletableFuture<Void> registerCapability(RegistrationParams params) {
    throw new UnsupportedOperationException();
}
项目:SOMns-vscode    文件:LanguageClient.java   
/**
 * The show message request is sent from a server to a client to ask the
 * client to display a particular message in the user interface. In addition
 * to the show message notification the request allows to pass actions and
 * to wait for an answer from the client.
 */
@JsonRequest("window/showMessageRequest")
CompletableFuture<MessageActionItem> showMessageRequest(ShowMessageRequestParams requestParams);
项目:SOMns-vscode    文件:LanguageClient.java   
/**
 * The workspace/workspaceFolders request is sent from the server to the client
 * to fetch the current open list of workspace folders.
 *
 * This API is a <b>proposal</b> from LSP and may change.
 *
 * @return null in the response if only a single file is open in the tool,
 *         an empty array if a workspace is open but no folders are configured,
 *         the workspace folders otherwise.
 */
@Beta
@JsonRequest("workspace/workspaceFolders")
default CompletableFuture<List<WorkspaceFolder>> workspaceFolders() {
    return CompletableFuture.completedFuture(Collections.emptyList());
}
项目:SOMns-vscode    文件:LanguageServer.java   
/**
 * The initialize request is sent as the first request from the client to
 * the server.
 * 
 * If the server receives request or notification before the initialize request it should act as follows:
 *  - for a request the respond should be errored with code: -32001. The message can be picked by the server.
 *  - notifications should be dropped, except for the exit notification. This will allow the exit a server without an initialize request.
 *  
 * Until the server has responded to the initialize request with an InitializeResult 
 * the client must not sent any additional requests or notifications to the server.
 * 
 * During the initialize request the server is allowed to sent the notifications window/showMessage, 
 * window/logMessage and telemetry/event as well as the window/showMessageRequest request to the client.
 */
@JsonRequest
CompletableFuture<InitializeResult> initialize(InitializeParams params);
项目:SOMns-vscode    文件:LanguageServer.java   
/**
 * The shutdown request is sent from the client to the server. It asks the
 * server to shutdown, but to not exit (otherwise the response might not be
 * delivered correctly to the client). There is a separate exit notification
 * that asks the server to exit.
 */
@JsonRequest
CompletableFuture<Object> shutdown();