Skip to content

Commit

Permalink
Implement IntellijExtECatcherClient
Browse files Browse the repository at this point in the history
(cherry picked from commit 6e09cc2)
  • Loading branch information
Googler authored and mai93 committed Feb 26, 2024
1 parent ebea85e commit 70648b1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class IntelliJExtManager {
* Controls whether the intellij-ext binary is used at all. Ignored if EXPERIMENT_SERVICE_PROPERTY
* is set.
*/
private static final BoolExperiment ENABLED = new BoolExperiment("use.intellij.ext", false);
private static final BoolExperiment ENABLED = new BoolExperiment("use.intellij.ext", true);

private static final BoolExperiment ISSUETRACKER =
new BoolExperiment("use.intellij.ext.issuetracker", false);
Expand All @@ -66,6 +66,9 @@ public class IntelliJExtManager {
private static final BoolExperiment FILEAPI =
new BoolExperiment("use.intellij.ext.fileapi", false);

private static final BoolExperiment ECATCHER =
new BoolExperiment("use.intellij.ext.ecatcher", false);

private static final BoolExperiment BUILD_SERVICE =
new BoolExperiment("use.intellij.ext.buildservice", false);

Expand Down Expand Up @@ -189,6 +192,10 @@ public boolean isFileApiEnabled() {
return isEnabled() && FILEAPI.getValue();
}

public boolean isECatcherEnabled() {
return isEnabled() && ECATCHER.getValue();
}

public boolean isBuildServiceEnabled() {
return isEnabled() && BUILD_SERVICE.getValue();
}
Expand Down
5 changes: 5 additions & 0 deletions ext/src/com/google/idea/blaze/ext/IntelliJExtClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.google.idea.blaze.ext.CodeSearchGrpc.CodeSearchFutureStub;
import com.google.idea.blaze.ext.CritiqueServiceGrpc.CritiqueServiceBlockingStub;
import com.google.idea.blaze.ext.DepServerGrpc.DepServerFutureStub;
import com.google.idea.blaze.ext.ECatcherServiceGrpc.ECatcherServiceFutureStub;
import com.google.idea.blaze.ext.ExperimentsServiceGrpc.ExperimentsServiceBlockingStub;
import com.google.idea.blaze.ext.FileApiGrpc.FileApiFutureStub;
import com.google.idea.blaze.ext.FindingsServiceGrpc.FindingsServiceBlockingStub;
Expand Down Expand Up @@ -134,6 +135,10 @@ public CodeSearchFutureStub getCodeSearchService() {
return CodeSearchGrpc.newFutureStub(channel);
}

public ECatcherServiceFutureStub getECatcherService() {
return ECatcherServiceGrpc.newFutureStub(channel);
}

public PiperServiceFutureStub getPiperService() {
return PiperServiceGrpc.newFutureStub(channel);
}
Expand Down
6 changes: 6 additions & 0 deletions ext/src/com/google/idea/blaze/ext/IntelliJExtService.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.google.idea.blaze.ext.CodeSearchGrpc.CodeSearchFutureStub;
import com.google.idea.blaze.ext.CritiqueServiceGrpc.CritiqueServiceBlockingStub;
import com.google.idea.blaze.ext.DepServerGrpc.DepServerFutureStub;
import com.google.idea.blaze.ext.ECatcherServiceGrpc.ECatcherServiceFutureStub;
import com.google.idea.blaze.ext.ExperimentsServiceGrpc.ExperimentsServiceBlockingStub;
import com.google.idea.blaze.ext.FileApiGrpc.FileApiFutureStub;
import com.google.idea.blaze.ext.FindingsServiceGrpc.FindingsServiceBlockingStub;
Expand Down Expand Up @@ -213,6 +214,11 @@ public CodeSearchFutureStub getCodeSearchService() throws IOException {
return client.getCodeSearchService();
}

public ECatcherServiceFutureStub getECatcherService() throws IOException {
IntelliJExtBlockingStub unused = connect();
return client.getECatcherService();
}

public FileApiFutureStub getFileApiService() throws IOException {
IntelliJExtBlockingStub unused = connect();
return client.getFileApiService();
Expand Down

0 comments on commit 70648b1

Please sign in to comment.