private void handleProgressesReports() { configurator .newConfiguration() .methodName(PROGRESS_REPORT_METHOD) .paramsAsDto(ProgressReport.class) .noResult() .withConsumer( progressNotification -> progressReportConsumers.forEach(it -> it.accept(progressNotification))); } }
@Inject public void configureHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("connected") .paramsAsDto(ConnectedEventDto.class) .noResult() .withBiConsumer(this); }
@Inject private void configureTestDetectionHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName(Constants.TESTING_RPC_TEST_DETECTION_NAME) .paramsAsDto(TestDetectionContext.class) .resultAsDto(TestDetectionResult.class) .withBiFunction(this::handleTestDetection); }
@Inject public void configureHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("process_started") .paramsAsDto(ProcessStartedEventDto.class) .noResult() .withBiConsumer(this); }
@Inject public void configureHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("process_died") .paramsAsDto(ProcessDiedEventDto.class) .noResult() .withBiConsumer(this); }
@Inject public void configureHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("event:file-state-changed") .paramsAsDto(FileStateUpdateDto.class) .noResult() .withBiConsumer(this); }
@Inject public void configureHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName(WORKING_COPY_ERROR_METHOD) .paramsAsDto(ServerError.class) .noResult() .withConsumer(this::onError); }
@Inject private void configureReceiver(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName(NOTIFY) .paramsAsDto(ExecuteCommandParams.class) .noResult() .withConsumer(this::handleNotification); }
@Inject public void configureHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("event/project-tree-state-changed") .paramsAsDto(ProjectTreeStateUpdateDto.class) .noResult() .withConsumer(projectTreeChangeHandler::handleFileChange); } }
@Inject private void configureRunTestHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName(Constants.RUN_TESTS_METHOD) .paramsAsDto(TestExecutionContext.class) .resultAsDto(TestLaunchResult.class) .withBiFunction(this::runTests); }
@Inject public void configureHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("process_stderr") .paramsAsDto(ProcessStdErrEventDto.class) .noResult() .withBiConsumer(this); }
@Inject public void configureHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("process_stdout") .paramsAsDto(ProcessStdOutEventDto.class) .noResult() .withBiConsumer(this); }
@Inject private void configure(RequestHandlerConfigurator requestHandlerConfigurator) { requestHandlerConfigurator .newConfiguration() .methodName("git/checkoutOutput") .paramsAsDto(GitCheckoutEvent.class) .noResult() .withConsumer(this::consumeGitCheckoutEvent); }
@Inject protected void handleEvents() { configurator .newConfiguration() .methodName(EVENT_JDT_PROJECT_UPDATED) .paramsAsDto(String.class) .noResult() .withBiConsumer( (endpointId, projectPath) -> { onProjectUpdated(projectPath); }); }
@PostConstruct public void configureMethods() { requestHandler .newConfiguration() .methodName("workspace/symbol") .paramsAsDto(ExtendedWorkspaceSymbolParams.class) .resultAsListOfDto(SymbolInformationDto.class) .withFunction(this::symbol); requestHandler .newConfiguration() .methodName("workspace/editFile") .paramsAsDto(FileEditParams.class) .resultAsListOfDto(TextEditDto.class) .withFunction(this::editFile); }
private <P> void dtoToNothing(String name, Class<P> pClass, Consumer<P> consumer) { requestHandler .newConfiguration() .methodName("textDocument/" + name) .paramsAsDto(pClass) .noResult() .withConsumer(consumer); }
private <P, R> void dtoToDtoList( String name, Class<P> pClass, Class<R> rClass, Function<P, List<R>> function) { requestHandler .newConfiguration() .methodName("textDocument/" + name) .paramsAsDto(pClass) .resultAsListOfDto(rClass) .withFunction(function); }
private <P, R> void dtoToDto( String name, Class<P> pClass, Class<R> rClass, Function<P, R> function) { requestHandler .newConfiguration() .methodName("textDocument/" + name) .paramsAsDto(pClass) .resultAsDto(rClass) .withFunction(function); }
@Inject RuntimeLogHandler(RequestHandlerConfigurator configurator, EventBus eventBus) { configurator .newConfiguration() .methodName(RUNTIME_LOG_METHOD) .paramsAsDto(RuntimeLogEvent.class) .noResult() .withBiConsumer( (endpointId, log) -> eventBus.fireEvent( new EnvironmentOutputEvent(log.getText(), log.getMachineName()))); } }
@Inject InstallerLogHandler(RequestHandlerConfigurator configurator, EventBus eventBus) { configurator .newConfiguration() .methodName(INSTALLER_LOG_METHOD) .paramsAsDto(InstallerLogEvent.class) .noResult() .withBiConsumer( (endpointId, log) -> eventBus.fireEvent( new EnvironmentOutputEvent(log.getText(), log.getMachineName()))); } }