private void handleProgressesReports() { configurator .newConfiguration() .methodName(PROGRESS_REPORT_METHOD) .paramsAsDto(ProgressReport.class) .noResult() .withConsumer( progressNotification -> progressReportConsumers.forEach(it -> it.accept(progressNotification))); } }
@Inject private void configure(RequestHandlerConfigurator requestHandlerConfigurator) { requestHandlerConfigurator .newConfiguration() .methodName("git/checkoutOutput") .paramsAsDto(GitCheckoutEvent.class) .noResult() .withConsumer(this::consumeGitCheckoutEvent); }
@Inject public void configureHandler(RequestHandlerConfigurator configurator) { configurator .newConfiguration() .methodName("event/project-tree-state-changed") .paramsAsDto(ProjectTreeStateUpdateDto.class) .noResult() .withConsumer(projectTreeChangeHandler::handleFileChange); } }
@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 ImportProgressJsonRpcHandler( RequestHandlerConfigurator configurator, RequestHandlerManager requestHandlerManager) { if (!requestHandlerManager.isRegistered(EVENT_IMPORT_OUTPUT_PROGRESS)) { configurator .newConfiguration() .methodName(EVENT_IMPORT_OUTPUT_PROGRESS) .paramsAsDto(ImportProgressRecordDto.class) .noResult() .withConsumer( record -> { if (consumer != null) { consumer.accept(record); } }); } }
private <P> void dtoToNothing(String name, Class<P> pClass, Consumer<P> consumer) { requestHandler .newConfiguration() .methodName("textDocument/" + name) .paramsAsDto(pClass) .noResult() .withConsumer(consumer); }
@Inject public void configureMethods(RequestHandlerConfigurator requestHandler) { requestHandler .newConfiguration() .methodName(INSTALLER_LOG_METHOD) .paramsAsDto(InstallerLogEvent.class) .noResult() .withConsumer(this::handle); requestHandler .newConfiguration() .methodName(BOOTSTRAPPER_STATUS_CHANGED_METHOD) .paramsAsDto(BootstrapperStatusEvent.class) .noResult() .withConsumer(this::handle); requestHandler .newConfiguration() .methodName(INSTALLER_STATUS_CHANGED_METHOD) .paramsAsDto(InstallerStatusEvent.class) .noResult() .withConsumer(this::handle); }