{"action":"created","comment":{"url":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/comments/28634978","id":28634978,"diff_hunk":"@@ -168,4 +222,48 @@ public boolean value(Object o) {\n       }\n     });\n   }\n+\n+  private static void runDartStyleOverVirtualFiles(@NotNull final Project project, @NotNull final List<VirtualFile> dartFiles) {\n+    if(dartFiles.isEmpty()) {\n+      Messages.showInfoMessage(project, DartBundle.message(\"dart.style.files.no.dart.files\"), DartBundle.message(\"dart.style.action.name\"));\n+      return;\n+    }\n+    final Runnable runnable = new Runnable() {\n+      public void run() {\n+        List<String> fileChangedList = new ArrayList<String>();\n+        DartAnalysisServerService.getInstance().updateFilesContent();\n+        for (final VirtualFile virtualFile : dartFiles) {\n+          final String path = FileUtil.toSystemDependentName(virtualFile.getPath());\n+          final Document document = FileDocumentManager.getInstance().getDocument(virtualFile);\n+          if (document == null) continue;\n+\n+          int textLength = document.getTextLength();\n+          if (textLength == 0) continue;\n+\n+          DartAnalysisServerService.getInstance().updateFilesContent();\n+          DartAnalysisServerService.FormatResult formatResult =\n+            DartAnalysisServerService.getInstance().edit_format(path, 0, 1);\n+\n+          if (formatResult != null && formatResult.getEdits() != null && formatResult.getEdits().size() == 1) {\n+            final SourceEdit sourceEdit = formatResult.getEdits().get(0);\n+            document.replaceString(0, document.getTextLength(), sourceEdit.getReplacement());","path":"Dart/src/com/jetbrains/lang/dart/ide/actions/DartStyleAction.java","position":166,"original_position":166,"commit_id":"bab6ea1c7d2f892078b8acbd7f7fa78a8796fd9d","original_commit_id":"bab6ea1c7d2f892078b8acbd7f7fa78a8796fd9d","user":{"login":"jwren","id":1533520,"avatar_url":"https://avatars.githubusercontent.com/u/1533520?v=3","gravatar_id":"","url":"https://api.github.com/users/jwren","html_url":"https://github.com/jwren","followers_url":"https://api.github.com/users/jwren/followers","following_url":"https://api.github.com/users/jwren/following{/other_user}","gists_url":"https://api.github.com/users/jwren/gists{/gist_id}","starred_url":"https://api.github.com/users/jwren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwren/subscriptions","organizations_url":"https://api.github.com/users/jwren/orgs","repos_url":"https://api.github.com/users/jwren/repos","events_url":"https://api.github.com/users/jwren/events{/privacy}","received_events_url":"https://api.github.com/users/jwren/received_events","type":"User","site_admin":false},"body":"Thanks Konstantin, , fixed locally, still working on this change...","created_at":"2015-04-17T22:28:49Z","updated_at":"2015-04-17T22:28:49Z","html_url":"https://github.com/JetBrains/intellij-plugins/pull/163#discussion_r28634978","pull_request_url":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/163","_links":{"self":{"href":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/comments/28634978"},"html":{"href":"https://github.com/JetBrains/intellij-plugins/pull/163#discussion_r28634978"},"pull_request":{"href":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/163"}}},"pull_request":{"url":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/163","id":33495167,"html_url":"https://github.com/JetBrains/intellij-plugins/pull/163","diff_url":"https://github.com/JetBrains/intellij-plugins/pull/163.diff","patch_url":"https://github.com/JetBrains/intellij-plugins/pull/163.patch","issue_url":"https://api.github.com/repos/JetBrains/intellij-plugins/issues/163","number":163,"state":"open","locked":false,"title":"Fix for WEB-16230- dart_style for selected files in the Project view","user":{"login":"jwren","id":1533520,"avatar_url":"https://avatars.githubusercontent.com/u/1533520?v=3","gravatar_id":"","url":"https://api.github.com/users/jwren","html_url":"https://github.com/jwren","followers_url":"https://api.github.com/users/jwren/followers","following_url":"https://api.github.com/users/jwren/following{/other_user}","gists_url":"https://api.github.com/users/jwren/gists{/gist_id}","starred_url":"https://api.github.com/users/jwren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwren/subscriptions","organizations_url":"https://api.github.com/users/jwren/orgs","repos_url":"https://api.github.com/users/jwren/repos","events_url":"https://api.github.com/users/jwren/events{/privacy}","received_events_url":"https://api.github.com/users/jwren/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-16T21:35:35Z","updated_at":"2015-04-17T22:28:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74ca46a4a3c354633f89e0412c730b3357990491","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/163/commits","review_comments_url":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/163/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/163/comments","statuses_url":"https://api.github.com/repos/JetBrains/intellij-plugins/statuses/bab6ea1c7d2f892078b8acbd7f7fa78a8796fd9d","head":{"label":"jwren:analysis-server-047-WEB-16230","ref":"analysis-server-047-WEB-16230","sha":"bab6ea1c7d2f892078b8acbd7f7fa78a8796fd9d","user":{"login":"jwren","id":1533520,"avatar_url":"https://avatars.githubusercontent.com/u/1533520?v=3","gravatar_id":"","url":"https://api.github.com/users/jwren","html_url":"https://github.com/jwren","followers_url":"https://api.github.com/users/jwren/followers","following_url":"https://api.github.com/users/jwren/following{/other_user}","gists_url":"https://api.github.com/users/jwren/gists{/gist_id}","starred_url":"https://api.github.com/users/jwren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwren/subscriptions","organizations_url":"https://api.github.com/users/jwren/orgs","repos_url":"https://api.github.com/users/jwren/repos","events_url":"https://api.github.com/users/jwren/events{/privacy}","received_events_url":"https://api.github.com/users/jwren/received_events","type":"User","site_admin":false},"repo":{"id":24578004,"name":"intellij-plugins","full_name":"jwren/intellij-plugins","owner":{"login":"jwren","id":1533520,"avatar_url":"https://avatars.githubusercontent.com/u/1533520?v=3","gravatar_id":"","url":"https://api.github.com/users/jwren","html_url":"https://github.com/jwren","followers_url":"https://api.github.com/users/jwren/followers","following_url":"https://api.github.com/users/jwren/following{/other_user}","gists_url":"https://api.github.com/users/jwren/gists{/gist_id}","starred_url":"https://api.github.com/users/jwren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwren/subscriptions","organizations_url":"https://api.github.com/users/jwren/orgs","repos_url":"https://api.github.com/users/jwren/repos","events_url":"https://api.github.com/users/jwren/events{/privacy}","received_events_url":"https://api.github.com/users/jwren/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jwren/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/jwren/intellij-plugins","forks_url":"https://api.github.com/repos/jwren/intellij-plugins/forks","keys_url":"https://api.github.com/repos/jwren/intellij-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jwren/intellij-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jwren/intellij-plugins/teams","hooks_url":"https://api.github.com/repos/jwren/intellij-plugins/hooks","issue_events_url":"https://api.github.com/repos/jwren/intellij-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/jwren/intellij-plugins/events","assignees_url":"https://api.github.com/repos/jwren/intellij-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/jwren/intellij-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/jwren/intellij-plugins/tags","blobs_url":"https://api.github.com/repos/jwren/intellij-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jwren/intellij-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jwren/intellij-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/jwren/intellij-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jwren/intellij-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/jwren/intellij-plugins/languages","stargazers_url":"https://api.github.com/repos/jwren/intellij-plugins/stargazers","contributors_url":"https://api.github.com/repos/jwren/intellij-plugins/contributors","subscribers_url":"https://api.github.com/repos/jwren/intellij-plugins/subscribers","subscription_url":"https://api.github.com/repos/jwren/intellij-plugins/subscription","commits_url":"https://api.github.com/repos/jwren/intellij-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/jwren/intellij-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/jwren/intellij-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/jwren/intellij-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/jwren/intellij-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/jwren/intellij-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jwren/intellij-plugins/merges","archive_url":"https://api.github.com/repos/jwren/intellij-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jwren/intellij-plugins/downloads","issues_url":"https://api.github.com/repos/jwren/intellij-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/jwren/intellij-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/jwren/intellij-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/jwren/intellij-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jwren/intellij-plugins/labels{/name}","releases_url":"https://api.github.com/repos/jwren/intellij-plugins/releases{/id}","created_at":"2014-09-29T03:03:12Z","updated_at":"2015-04-16T21:41:17Z","pushed_at":"2015-04-16T21:41:16Z","git_url":"git://github.com/jwren/intellij-plugins.git","ssh_url":"git@github.com:jwren/intellij-plugins.git","clone_url":"https://github.com/jwren/intellij-plugins.git","svn_url":"https://github.com/jwren/intellij-plugins","homepage":"http://www.jetbrains.com/idea/","size":123588,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JetBrains:master","ref":"master","sha":"88e1b471429524bbf43cbdf6f29fcc313c9beb27","user":{"login":"JetBrains","id":878437,"avatar_url":"https://avatars.githubusercontent.com/u/878437?v=3","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://avatars.githubusercontent.com/u/878437?v=3","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}","created_at":"2012-08-17T14:31:20Z","updated_at":"2015-04-17T17:00:35Z","pushed_at":"2015-04-17T18:27:14Z","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":150994,"stargazers_count":292,"watchers_count":292,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":154,"mirror_url":null,"open_issues_count":10,"forks":154,"open_issues":10,"watchers":292,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/163"},"html":{"href":"https://github.com/JetBrains/intellij-plugins/pull/163"},"issue":{"href":"https://api.github.com/repos/JetBrains/intellij-plugins/issues/163"},"comments":{"href":"https://api.github.com/repos/JetBrains/intellij-plugins/issues/163/comments"},"review_comments":{"href":"https://api.github.com/repos/JetBrains/intellij-plugins/pulls/163/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/163/commits"},"statuses":{"href":"https://api.github.com/repos/JetBrains/intellij-plugins/statuses/bab6ea1c7d2f892078b8acbd7f7fa78a8796fd9d"}}}}