{"action":"created","comment":{"url":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/comments/189609168","pull_request_review_id":121821331,"id":189609168,"diff_hunk":"@@ -1604,6 +1605,44 @@ public void execution_deleteContext(@NotNull final String contextId) {\n     }\n   }\n \n+  @Nullable\n+  public RuntimeCompletionResult execution_getSuggestions(@NotNull final String code,\n+                                                          final int offset,\n+                                                          @NotNull final VirtualFile contextFile,\n+                                                          final int contextOffset,\n+                                                          @NotNull final List<RuntimeCompletionVariable> variables,\n+                                                          @NotNull final List<RuntimeCompletionExpression> expressions) {\n+    final String contextFilePath = FileUtil.toSystemDependentName(contextFile.getPath());\n+\n+    final AnalysisServer server = myServer;\n+    if (server == null) {\n+      return new RuntimeCompletionResult(Lists.newArrayList(), Lists.newArrayList());\n+    }\n+\n+    final CountDownLatch latch = new CountDownLatch(1);\n+    final AtomicReference<RuntimeCompletionResult> refResult = new AtomicReference<>();\n+    server.execution_getSuggestions(\n+      code, offset,\n+      contextFilePath, contextOffset,\n+      variables, expressions,\n+      new GetRuntimeCompletionConsumer() {\n+        @Override\n+        public void computedResult(RuntimeCompletionResult result) {\n+          refResult.set(result);\n+          latch.countDown();\n+        }\n+\n+        @Override\n+        public void onError(RequestError error) {\n+          logError(\"execution_getSuggestions()\", contextFilePath, error);","path":"Dart/src/com/jetbrains/lang/dart/analyzer/DartAnalysisServerService.java","position":41,"original_position":41,"commit_id":"aaf6965f312194ee67fcea492af05d9111fae916","original_commit_id":"aaf6965f312194ee67fcea492af05d9111fae916","user":{"login":"alexander-doroshko","id":4499789,"avatar_url":"https://avatars1.githubusercontent.com/u/4499789?v=4","gravatar_id":"","url":"https://api.github.com/users/alexander-doroshko","html_url":"https://github.com/alexander-doroshko","followers_url":"https://api.github.com/users/alexander-doroshko/followers","following_url":"https://api.github.com/users/alexander-doroshko/following{/other_user}","gists_url":"https://api.github.com/users/alexander-doroshko/gists{/gist_id}","starred_url":"https://api.github.com/users/alexander-doroshko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexander-doroshko/subscriptions","organizations_url":"https://api.github.com/users/alexander-doroshko/orgs","repos_url":"https://api.github.com/users/alexander-doroshko/repos","events_url":"https://api.github.com/users/alexander-doroshko/events{/privacy}","received_events_url":"https://api.github.com/users/alexander-doroshko/received_events","type":"User","site_admin":false},"body":"I've wrapped it with `if (!RequestErrorCode.UNKNOWN_REQUEST.equals(error.getCode())) {}` to be old SDK-compatible","created_at":"2018-05-21T14:39:38Z","updated_at":"2018-05-21T14:39:38Z","html_url":"https://github.com/JetBrains/intellij-plugins/pull/582#discussion_r189609168","pull_request_url":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/582","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/comments/189609168"},"html":{"href":"https://github.com/JetBrains/intellij-plugins/pull/582#discussion_r189609168"},"pull_request":{"href":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/582"}}},"pull_request":{"url":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/582","id":188860564,"html_url":"https://github.com/JetBrains/intellij-plugins/pull/582","diff_url":"https://github.com/JetBrains/intellij-plugins/pull/582.diff","patch_url":"https://github.com/JetBrains/intellij-plugins/pull/582.patch","issue_url":"https://api.github.com/repos/JetBrains/intellij-plugins/issues/582","number":582,"state":"open","locked":false,"title":"Use 'execution.getSuggestions' to request completion in the 'Evaluate' dialog.","user":{"login":"scheglov","id":384794,"avatar_url":"https://avatars0.githubusercontent.com/u/384794?v=4","gravatar_id":"","url":"https://api.github.com/users/scheglov","html_url":"https://github.com/scheglov","followers_url":"https://api.github.com/users/scheglov/followers","following_url":"https://api.github.com/users/scheglov/following{/other_user}","gists_url":"https://api.github.com/users/scheglov/gists{/gist_id}","starred_url":"https://api.github.com/users/scheglov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scheglov/subscriptions","organizations_url":"https://api.github.com/users/scheglov/orgs","repos_url":"https://api.github.com/users/scheglov/repos","events_url":"https://api.github.com/users/scheglov/events{/privacy}","received_events_url":"https://api.github.com/users/scheglov/received_events","type":"User","site_admin":false},"body":"https://github.com/dart-lang/sdk/commit/76a30dd594e06c20fd9be0e2dc8198e7241744a2 provides a basic implementation of this API in Analysis Server. Not all features are implemented at the moment, I will work them in parallel. But even just support for local variables seems useful.\r\n\r\nI don't know yet how to access runtime types of variables, someone with better knowledge of debugger API might give hints. @jacob314\r\n\r\n@alexander-doroshko ","created_at":"2018-05-17T21:02:38Z","updated_at":"2018-05-21T14:39:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37de19ed043ed479c0154b3823d21bf8bfb826a0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/582/commits","review_comments_url":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/582/comments","review_comment_url":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JetBrains/intellij-plugins/issues/582/comments","statuses_url":"https://api.github.com/repos/JetBrains/intellij-plugins/statuses/aaf6965f312194ee67fcea492af05d9111fae916","head":{"label":"scheglov:runtime-completion","ref":"runtime-completion","sha":"aaf6965f312194ee67fcea492af05d9111fae916","user":{"login":"scheglov","id":384794,"avatar_url":"https://avatars0.githubusercontent.com/u/384794?v=4","gravatar_id":"","url":"https://api.github.com/users/scheglov","html_url":"https://github.com/scheglov","followers_url":"https://api.github.com/users/scheglov/followers","following_url":"https://api.github.com/users/scheglov/following{/other_user}","gists_url":"https://api.github.com/users/scheglov/gists{/gist_id}","starred_url":"https://api.github.com/users/scheglov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scheglov/subscriptions","organizations_url":"https://api.github.com/users/scheglov/orgs","repos_url":"https://api.github.com/users/scheglov/repos","events_url":"https://api.github.com/users/scheglov/events{/privacy}","received_events_url":"https://api.github.com/users/scheglov/received_events","type":"User","site_admin":false},"repo":{"id":34078014,"name":"intellij-plugins","full_name":"scheglov/intellij-plugins","owner":{"login":"scheglov","id":384794,"avatar_url":"https://avatars0.githubusercontent.com/u/384794?v=4","gravatar_id":"","url":"https://api.github.com/users/scheglov","html_url":"https://github.com/scheglov","followers_url":"https://api.github.com/users/scheglov/followers","following_url":"https://api.github.com/users/scheglov/following{/other_user}","gists_url":"https://api.github.com/users/scheglov/gists{/gist_id}","starred_url":"https://api.github.com/users/scheglov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scheglov/subscriptions","organizations_url":"https://api.github.com/users/scheglov/orgs","repos_url":"https://api.github.com/users/scheglov/repos","events_url":"https://api.github.com/users/scheglov/events{/privacy}","received_events_url":"https://api.github.com/users/scheglov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/scheglov/intellij-plugins","description":"Open-source plugins included in the distribution of IntelliJ IDEA Ultimate and other IDEs based on the IntelliJ Platform","fork":true,"url":"https://api.github.com/repos/scheglov/intellij-plugins","forks_url":"https://api.github.com/repos/scheglov/intellij-plugins/forks","keys_url":"https://api.github.com/repos/scheglov/intellij-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scheglov/intellij-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scheglov/intellij-plugins/teams","hooks_url":"https://api.github.com/repos/scheglov/intellij-plugins/hooks","issue_events_url":"https://api.github.com/repos/scheglov/intellij-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/scheglov/intellij-plugins/events","assignees_url":"https://api.github.com/repos/scheglov/intellij-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/scheglov/intellij-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/scheglov/intellij-plugins/tags","blobs_url":"https://api.github.com/repos/scheglov/intellij-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scheglov/intellij-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scheglov/intellij-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/scheglov/intellij-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scheglov/intellij-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/scheglov/intellij-plugins/languages","stargazers_url":"https://api.github.com/repos/scheglov/intellij-plugins/stargazers","contributors_url":"https://api.github.com/repos/scheglov/intellij-plugins/contributors","subscribers_url":"https://api.github.com/repos/scheglov/intellij-plugins/subscribers","subscription_url":"https://api.github.com/repos/scheglov/intellij-plugins/subscription","commits_url":"https://api.github.com/repos/scheglov/intellij-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/scheglov/intellij-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/scheglov/intellij-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/scheglov/intellij-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/scheglov/intellij-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/scheglov/intellij-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scheglov/intellij-plugins/merges","archive_url":"https://api.github.com/repos/scheglov/intellij-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scheglov/intellij-plugins/downloads","issues_url":"https://api.github.com/repos/scheglov/intellij-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/scheglov/intellij-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/scheglov/intellij-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/scheglov/intellij-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scheglov/intellij-plugins/labels{/name}","releases_url":"https://api.github.com/repos/scheglov/intellij-plugins/releases{/id}","deployments_url":"https://api.github.com/repos/scheglov/intellij-plugins/deployments","created_at":"2015-04-16T20:10:36Z","updated_at":"2015-04-17T18:45:47Z","pushed_at":"2018-05-18T17:46:46Z","git_url":"git://github.com/scheglov/intellij-plugins.git","ssh_url":"git@github.com:scheglov/intellij-plugins.git","clone_url":"https://github.com/scheglov/intellij-plugins.git","svn_url":"https://github.com/scheglov/intellij-plugins","homepage":"http://www.jetbrains.com/idea/","size":318049,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JetBrains:master","ref":"master","sha":"7e8c27adf7201bc60c7f10fe91bd59a7858b2492","user":{"login":"JetBrains","id":878437,"avatar_url":"https://avatars2.githubusercontent.com/u/878437?v=4","gravatar_id":"","url":"https://api.github.com/users/JetBrains","html_url":"https://github.com/JetBrains","followers_url":"https://api.github.com/users/JetBrains/followers","following_url":"https://api.github.com/users/JetBrains/following{/other_user}","gists_url":"https://api.github.com/users/JetBrains/gists{/gist_id}","starred_url":"https://api.github.com/users/JetBrains/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JetBrains/subscriptions","organizations_url":"https://api.github.com/users/JetBrains/orgs","repos_url":"https://api.github.com/users/JetBrains/repos","events_url":"https://api.github.com/users/JetBrains/events{/privacy}","received_events_url":"https://api.github.com/users/JetBrains/received_events","type":"Organization","site_admin":false},"repo":{"id":5453324,"name":"intellij-plugins","full_name":"JetBrains/intellij-plugins","owner":{"login":"JetBrains","id":878437,"avatar_url":"https://avatars2.githubusercontent.com/u/878437?v=4","gravatar_id":"","url":"https://api.github.com/users/JetBrains","html_url":"https://github.com/JetBrains","followers_url":"https://api.github.com/users/JetBrains/followers","following_url":"https://api.github.com/users/JetBrains/following{/other_user}","gists_url":"https://api.github.com/users/JetBrains/gists{/gist_id}","starred_url":"https://api.github.com/users/JetBrains/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JetBrains/subscriptions","organizations_url":"https://api.github.com/users/JetBrains/orgs","repos_url":"https://api.github.com/users/JetBrains/repos","events_url":"https://api.github.com/users/JetBrains/events{/privacy}","received_events_url":"https://api.github.com/users/JetBrains/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JetBrains/intellij-plugins","description":"Open-source plugins included in the distribution of IntelliJ IDEA Ultimate and other IDEs based on the IntelliJ Platform","fork":false,"url":"https://api.github.com/repos/JetBrains/intellij-plugins","forks_url":"https://api.github.com/repos/JetBrains/intellij-plugins/forks","keys_url":"https://api.github.com/repos/JetBrains/intellij-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JetBrains/intellij-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JetBrains/intellij-plugins/teams","hooks_url":"https://api.github.com/repos/JetBrains/intellij-plugins/hooks","issue_events_url":"https://api.github.com/repos/JetBrains/intellij-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/JetBrains/intellij-plugins/events","assignees_url":"https://api.github.com/repos/JetBrains/intellij-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/JetBrains/intellij-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/JetBrains/intellij-plugins/tags","blobs_url":"https://api.github.com/repos/JetBrains/intellij-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JetBrains/intellij-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JetBrains/intellij-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/JetBrains/intellij-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JetBrains/intellij-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/JetBrains/intellij-plugins/languages","stargazers_url":"https://api.github.com/repos/JetBrains/intellij-plugins/stargazers","contributors_url":"https://api.github.com/repos/JetBrains/intellij-plugins/contributors","subscribers_url":"https://api.github.com/repos/JetBrains/intellij-plugins/subscribers","subscription_url":"https://api.github.com/repos/JetBrains/intellij-plugins/subscription","commits_url":"https://api.github.com/repos/JetBrains/intellij-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/JetBrains/intellij-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/JetBrains/intellij-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/JetBrains/intellij-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/JetBrains/intellij-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/JetBrains/intellij-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JetBrains/intellij-plugins/merges","archive_url":"https://api.github.com/repos/JetBrains/intellij-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JetBrains/intellij-plugins/downloads","issues_url":"https://api.github.com/repos/JetBrains/intellij-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/JetBrains/intellij-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/JetBrains/intellij-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JetBrains/intellij-plugins/labels{/name}","releases_url":"https://api.github.com/repos/JetBrains/intellij-plugins/releases{/id}","deployments_url":"https://api.github.com/repos/JetBrains/intellij-plugins/deployments","created_at":"2012-08-17T14:31:20Z","updated_at":"2018-05-21T02:09:27Z","pushed_at":"2018-05-21T14:06:44Z","git_url":"git://github.com/JetBrains/intellij-plugins.git","ssh_url":"git@github.com:JetBrains/intellij-plugins.git","clone_url":"https://github.com/JetBrains/intellij-plugins.git","svn_url":"https://github.com/JetBrains/intellij-plugins","homepage":"http://www.jetbrains.com/idea/","size":323259,"stargazers_count":1058,"watchers_count":1058,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":611,"mirror_url":null,"archived":false,"open_issues_count":9,"license":null,"forks":611,"open_issues":9,"watchers":1058,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/582"},"html":{"href":"https://github.com/JetBrains/intellij-plugins/pull/582"},"issue":{"href":"https://api.github.com/repos/JetBrains/intellij-plugins/issues/582"},"comments":{"href":"https://api.github.com/repos/JetBrains/intellij-plugins/issues/582/comments"},"review_comments":{"href":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/582/comments"},"review_comment":{"href":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/582/commits"},"statuses":{"href":"https://api.github.com/repos/JetBrains/intellij-plugins/statuses/aaf6965f312194ee67fcea492af05d9111fae916"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alexander-doroshko"}}