Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add signatureHelp and hover to Python autocomplete #3607

Merged
merged 19 commits into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import io.deephaven.auth.ServiceAuthWiring;
import io.deephaven.proto.backplane.script.grpc.AutoCompleteRequest;
import io.deephaven.proto.backplane.script.grpc.BindTableToVariableRequest;
import io.deephaven.proto.backplane.script.grpc.CancelAutoCompleteRequest;
import io.deephaven.proto.backplane.script.grpc.CancelCommandRequest;
import io.deephaven.proto.backplane.script.grpc.ConsoleServiceGrpc;
import io.deephaven.proto.backplane.script.grpc.ExecuteCommandRequest;
Expand Down Expand Up @@ -52,6 +53,8 @@ default ServerServiceDefinition intercept(ConsoleServiceGrpc.ConsoleServiceImplB
serviceBuilder.addMethod(ServiceAuthWiring.intercept(
service, "AutoCompleteStream", this::onCallStartedAutoCompleteStream,
this::onMessageReceivedAutoCompleteStream));
serviceBuilder.addMethod(ServiceAuthWiring.intercept(
service, "CancelAutoComplete", null, this::onMessageReceivedCancelAutoComplete));
serviceBuilder.addMethod(ServiceAuthWiring.intercept(
service, "OpenAutoCompleteStream", null, this::onMessageReceivedOpenAutoCompleteStream));
serviceBuilder.addMethod(ServiceAuthWiring.intercept(
Expand Down Expand Up @@ -141,6 +144,16 @@ void onMessageReceivedBindTableToVariable(AuthContext authContext,
*/
void onMessageReceivedAutoCompleteStream(AuthContext authContext, AutoCompleteRequest request);

/**
* Authorize a request to CancelAutoComplete.
*
* @param authContext the authentication context of the request
* @param request the request to authorize
* @throws io.grpc.StatusRuntimeException if the user is not authorized to invoke CancelAutoComplete
*/
void onMessageReceivedCancelAutoComplete(AuthContext authContext,
CancelAutoCompleteRequest request);

/**
* Authorize a request to OpenAutoCompleteStream.
*
Expand Down Expand Up @@ -187,6 +200,9 @@ public void onCallStartedAutoCompleteStream(AuthContext authContext) {}
public void onMessageReceivedAutoCompleteStream(AuthContext authContext,
AutoCompleteRequest request) {}

public void onMessageReceivedCancelAutoComplete(AuthContext authContext,
CancelAutoCompleteRequest request) {}

public void onMessageReceivedOpenAutoCompleteStream(AuthContext authContext,
AutoCompleteRequest request) {}

Expand Down Expand Up @@ -238,6 +254,11 @@ public void onMessageReceivedAutoCompleteStream(AuthContext authContext,
ServiceAuthWiring.operationNotAllowed();
}

public void onMessageReceivedCancelAutoComplete(AuthContext authContext,
CancelAutoCompleteRequest request) {
ServiceAuthWiring.operationNotAllowed();
}

public void onMessageReceivedOpenAutoCompleteStream(AuthContext authContext,
AutoCompleteRequest request) {
ServiceAuthWiring.operationNotAllowed();
Expand Down Expand Up @@ -313,6 +334,13 @@ public void onMessageReceivedAutoCompleteStream(AuthContext authContext,
}
}

public void onMessageReceivedCancelAutoComplete(AuthContext authContext,
CancelAutoCompleteRequest request) {
if (delegate != null) {
delegate.onMessageReceivedCancelAutoComplete(authContext, request);
}
}

public void onMessageReceivedOpenAutoCompleteStream(AuthContext authContext,
AutoCompleteRequest request) {
if (delegate != null) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading