Skip to content

Commit

Permalink
Implement CitcOperations via intellij-ext citc operations service
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 612341088
  • Loading branch information
Googler authored and copybara-github committed Mar 4, 2024
1 parent 204ebdc commit e5acdcc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public class IntelliJExtManager {
private static final BoolExperiment CRITIQUE_SERVICE =
new BoolExperiment("use.intellij.ext.critiqueservice", false);

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

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

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

public boolean isCitcOperationsServiceEnabled() {
return isEnabled() && CITC_OPERATIONS_SERVICE.getValue();
}

public boolean isCodeSearchEnabled() {
return isEnabled() && CODESEARCH.getValue();
}
Expand Down
6 changes: 3 additions & 3 deletions ext/src/com/google/idea/blaze/ext/IntelliJExtClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.google.idea.blaze.ext.BuildServiceGrpc.BuildServiceBlockingStub;
import com.google.idea.blaze.ext.BuildServiceGrpc.BuildServiceFutureStub;
import com.google.idea.blaze.ext.ChatBotModelGrpc.ChatBotModelBlockingStub;
import com.google.idea.blaze.ext.CitcOperationsServiceGrpc.CitcOperationsServiceFutureStub;
import com.google.idea.blaze.ext.CitcOperationsServiceGrpc.CitcOperationsServiceBlockingStub;
import com.google.idea.blaze.ext.CodeSearchGrpc.CodeSearchFutureStub;
import com.google.idea.blaze.ext.CritiqueServiceGrpc.CritiqueServiceBlockingStub;
import com.google.idea.blaze.ext.DepServerGrpc.DepServerFutureStub;
Expand Down Expand Up @@ -133,8 +133,8 @@ public DepServerFutureStub getDependencyService() {
return DepServerGrpc.newFutureStub(channel);
}

public CitcOperationsServiceFutureStub getCitcOperationsService() {
return CitcOperationsServiceGrpc.newFutureStub(channel);
public CitcOperationsServiceBlockingStub getCitcOperationsService() {
return CitcOperationsServiceGrpc.newBlockingStub(channel);
}

public CodeSearchFutureStub getCodeSearchService() {
Expand Down
4 changes: 2 additions & 2 deletions ext/src/com/google/idea/blaze/ext/IntelliJExtService.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.google.idea.blaze.ext.BuildServiceGrpc.BuildServiceBlockingStub;
import com.google.idea.blaze.ext.BuildServiceGrpc.BuildServiceFutureStub;
import com.google.idea.blaze.ext.ChatBotModelGrpc.ChatBotModelBlockingStub;
import com.google.idea.blaze.ext.CitcOperationsServiceGrpc.CitcOperationsServiceFutureStub;
import com.google.idea.blaze.ext.CitcOperationsServiceGrpc.CitcOperationsServiceBlockingStub;
import com.google.idea.blaze.ext.CodeSearchGrpc.CodeSearchFutureStub;
import com.google.idea.blaze.ext.CritiqueServiceGrpc.CritiqueServiceBlockingStub;
import com.google.idea.blaze.ext.DepServerGrpc.DepServerFutureStub;
Expand Down Expand Up @@ -210,7 +210,7 @@ public CritiqueServiceBlockingStub getCritiqueService() throws IOException {
return client.getCritiqueService();
}

public CitcOperationsServiceFutureStub getCitcOperationsService() throws IOException {
public CitcOperationsServiceBlockingStub getCitcOperationsService() throws IOException {
IntelliJExtBlockingStub unused = connect();
return client.getCitcOperationsService();
}
Expand Down

0 comments on commit e5acdcc

Please sign in to comment.