| syntax = "proto3"; |
| |
| package asdriver.proto; |
| option java_package = "com.android.tools.asdriver.proto"; |
| option java_outer_classname = "ASDriver"; |
| |
| service AndroidStudio { |
| rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {} |
| |
| rpc Quit(QuitRequest) returns (QuitResponse) {} |
| |
| rpc ExecuteAction(ExecuteActionRequest) returns (ExecuteActionResponse) {} |
| |
| rpc ExecuteActionWhenSmart(ExecuteActionRequest) returns (ExecuteActionResponse) {} |
| |
| rpc ExecuteCommands(ExecuteCommandsRequest) returns (ExecuteCommandsResponse) {} |
| |
| rpc ShowToolWindow(ShowToolWindowRequest) returns (ShowToolWindowResponse) {} |
| |
| rpc InvokeComponent(InvokeComponentRequest) returns (InvokeComponentResponse) {} |
| |
| rpc WaitForIndex(WaitForIndexRequest) returns (WaitForIndexResponse) {} |
| |
| rpc EditFile(EditFileRequest) returns (EditFileResponse) {} |
| |
| rpc MoveCaret(MoveCaretRequest) returns (MoveCaretResponse) {} |
| |
| rpc WaitForComponent(WaitForComponentRequest) returns (WaitForComponentResponse) {} |
| |
| rpc GetSystemProperty(GetSystemPropertyRequest) returns (GetSystemPropertyResponse) {} |
| |
| rpc AnalyzeFile(AnalyzeFileRequest) returns (AnalyzeFileResponse) {} |
| |
| rpc TakeBleakSnapshot(TakeBleakSnapshotRequest) returns (TakeBleakSnapshotResponse) {} |
| |
| rpc StartCapturingScreenshots(StartCapturingScreenshotsRequest) returns (StartCapturingScreenshotsResponse) {} |
| |
| rpc OpenProject(OpenProjectRequest) returns (OpenProjectResponse) {} |
| } |
| |
| message GetVersionRequest {} |
| |
| message GetVersionResponse { |
| string version = 1; |
| } |
| |
| message QuitRequest { |
| bool force = 1; |
| } |
| |
| message QuitResponse {} |
| |
| message ExecuteActionRequest { |
| enum DataContextSource { |
| DEFAULT = 0; |
| SELECTED_TEXT_EDITOR = 1; |
| ACTIVE_TOOL_WINDOW = 2; |
| } |
| |
| string action_id = 1; |
| |
| optional string project_name = 2; |
| |
| optional DataContextSource data_context_source = 3; |
| |
| optional bool run_when_smart = 4; |
| } |
| |
| message ExecuteActionResponse { |
| enum Result { |
| OK = 0; |
| ACTION_NOT_FOUND = 1; |
| ERROR = 2; |
| } |
| ExecuteActionResponse.Result result = 1; |
| string error_message = 2; |
| } |
| |
| message ExecuteCommandsRequest { |
| repeated string commands = 1; |
| |
| optional string project_name = 2; |
| } |
| |
| message ExecuteCommandsResponse { |
| enum Result { |
| OK = 0; |
| ERROR = 1; |
| } |
| ExecuteCommandsResponse.Result result = 1; |
| string error_message = 2; |
| } |
| |
| message ShowToolWindowRequest { |
| string tool_window_id = 1; |
| } |
| |
| message ShowToolWindowResponse { |
| enum Result { |
| OK = 0; |
| PROJECT_NOT_FOUND = 1; |
| TOOL_WINDOW_NOT_FOUND = 2; |
| } |
| ShowToolWindowResponse.Result result = 1; |
| } |
| |
| message InvokeComponentRequest { |
| repeated ComponentMatcher matchers = 1; |
| } |
| |
| message ComponentMatcher { |
| oneof matcher { |
| SwingClassRegexMatch swing_class_regex_match = 1; |
| ComponentTextMatch component_text_match = 2; |
| SvgIconMatch svg_icon_match = 3; |
| } |
| } |
| |
| message SwingClassRegexMatch { |
| string regex = 1; |
| } |
| |
| message ComponentTextMatch { |
| enum MatchMode { |
| EXACT = 0; |
| CONTAINS = 1; |
| REGEX = 2; |
| } |
| string text = 1; |
| MatchMode matchMode = 2; |
| } |
| |
| message SvgIconMatch { |
| repeated string icon = 1; |
| } |
| |
| message InvokeComponentResponse { |
| enum Result { |
| OK = 0; |
| ERROR = 1; |
| } |
| InvokeComponentResponse.Result result = 1; |
| string error_message = 2; |
| } |
| |
| message WaitForIndexRequest {} |
| |
| message WaitForIndexResponse {} |
| |
| message EditFileRequest { |
| string file = 1; |
| string searchRegex = 2; |
| string replacement = 3; |
| optional string project_name = 4; |
| } |
| |
| message EditFileResponse { |
| enum Result { |
| OK = 0; |
| ERROR = 1; |
| } |
| EditFileResponse.Result result = 1; |
| string error_message = 2; |
| } |
| |
| message MoveCaretRequest { |
| string window = 1; |
| } |
| |
| message MoveCaretResponse { |
| enum Result { |
| OK = 0; |
| ERROR = 1; |
| } |
| MoveCaretResponse.Result result = 1; |
| string error_message = 2; |
| } |
| |
| message WaitForComponentRequest { |
| repeated ComponentMatcher matchers = 1; |
| bool wait_for_enabled = 2; |
| } |
| |
| message WaitForComponentResponse { |
| enum Result { |
| OK = 0; |
| ERROR = 1; |
| } |
| WaitForComponentResponse.Result result = 1; |
| string error_message = 2; |
| } |
| |
| message GetSystemPropertyRequest { |
| string system_property = 1; |
| } |
| |
| message GetSystemPropertyResponse { |
| optional string value = 1; // Optional because the property may not be defined |
| } |
| |
| message AnalyzeFileRequest { |
| string file = 1; |
| } |
| |
| message AnalyzeFileResponse { |
| enum Status { |
| OK = 0; |
| ERROR = 1; |
| } |
| AnalyzeFileResponse.Status status = 1; |
| repeated AnalysisResult analysis_results = 2; |
| string error_message = 3; |
| } |
| |
| message AnalysisResult { |
| // Serialized version of com.intellij.lang.annotation.HighlightSeverity. |
| message HighlightSeverity { |
| string name = 1; |
| int32 value = 2; |
| } |
| |
| HighlightSeverity severity = 1; |
| |
| // This is generally the offending line of code, e.g. "import foo;". |
| string text = 2; |
| |
| // A description of the issue, e.g. "Unused import statement". |
| optional string description = 3; |
| |
| // This is the name of the tool that produced the problem, e.g. |
| // "RedundantSuppression". GlobalSimpleInspectionTool instances like |
| // SyntaxErrorInspection will appear as null, as will some other |
| // GlobalInspectionTool instances like |
| // AndroidLintGradleDependencyInspection. |
| optional string tool_id = 4; |
| |
| // The line number that the issue starts on. |
| uint32 line_number = 5; |
| } |
| |
| message TakeBleakSnapshotRequest { |
| int32 current_iteration = 1; |
| int32 last_iteration = 2; |
| } |
| |
| message TakeBleakSnapshotResponse { |
| enum Result { |
| OK = 0; |
| LEAK_DETECTED = 1; |
| ERROR = 2; |
| } |
| TakeBleakSnapshotResponse.Result result = 1; |
| optional string leak_info = 2; |
| string error_message = 3; |
| } |
| |
| message StartCapturingScreenshotsRequest { |
| string destination_path = 1; |
| |
| string screenshot_name_format = 2; |
| } |
| |
| message StartCapturingScreenshotsResponse { |
| enum Result { |
| OK = 0; |
| ERROR = 1; |
| } |
| StartCapturingScreenshotsResponse.Result result = 1; |
| string error_message = 2; |
| } |
| |
| message OpenProjectRequest { |
| string project_path = 1; |
| bool new_window = 2; |
| } |
| |
| message OpenProjectResponse { |
| enum Result { |
| OK = 0; |
| ERROR = 1; |
| } |
| OpenProjectResponse.Result result = 1; |
| string error_message = 2; |
| } |