SonarQube for IDE - CORE - Technology SDK

@nicolas.quinquenel @Damien_Urruty Thanks to both for your help. I’ve finally been able to send and receive information between SLCORE and JetBrains plugin.

I’ll leave all changes that needs to be made in order to achieve this in case someone comes looking for the same thing in the future.

Backend → Core: SonarLintSpringAppConfig: If you need to add a service to be managed by Spring

RPC Protocol: SonarLintRPCClient: Add method definition

  @JsonRequest
  CompletableFuture<GetProjectInformationResponse> getProjectInformation();

Client → RPC Java Client:

  • SonarLintRPCClientDelegate: Add definition of method that will be implemented on JetBrains plugin
    GetProjectInformationResponse getProjectInformation();

  • SonarLintRPCClientImpl: Async Request to Delegate to obtain the information from Plugin

    @Override
    public CompletableFuture<GetProjectInformationResponse> getProjectInformation() {
        return requestAsync(cancelChecker -> delegate.getProjectInformation());
    }

With all this modifications to SLCORE, whenever you build and import it on SL JetBrains, you will need to implement your new method on SonarLintIntellijClient

Have a nice week.

2 Likes