{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/pulls/comments/59633122","id":59633122,"diff_hunk":"@@ -91,14 +94,30 @@ protected void executeProcess(\n \n     consoleLogLn(\"Executing: \" + commandLine.getCommandLineString());\n \n-    final Process process = commandLine.createProcess();\n-    final ProcessHandler processHandler = new OSProcessHandler(process,\n-        commandLine.getCommandLineString());\n+    Process process = commandLine.createProcess();\n+    processHandler = new OSProcessHandler(process, commandLine.getCommandLineString());\n     loggingHandler.attachToProcess(processHandler);\n     processHandler.addProcessListener(listener);\n+\n+    // mark process as completed by setting handler to null when terminated\n+    processHandler.addProcessListener(new ProcessAdapter() {\n+      @Override\n+      public void processTerminated(ProcessEvent event) {\n+        processHandler = null;\n+      }\n+    });\n+\n     processHandler.startNotify();\n   }\n \n+  protected void cancel() {\n+    // kill any executing process for the action\n+    if (processHandler != null && processHandler.getProcess() != null) {\n+      cancelled = true;\n+      processHandler.getProcess().destroy();\n+    }","path":"google-cloud-tools-plugin/src/com/google/cloud/tools/intellij/appengine/cloud/AppEngineAction.java","position":47,"original_position":47,"commit_id":"484adb700c52fb2c7b57dfcdc7a030368ff422f2","original_commit_id":"484adb700c52fb2c7b57dfcdc7a030368ff422f2","user":{"login":"chanseokoh","id":10523105,"avatar_url":"https://avatars.githubusercontent.com/u/10523105?v=3","gravatar_id":"","url":"https://api.github.com/users/chanseokoh","html_url":"https://github.com/chanseokoh","followers_url":"https://api.github.com/users/chanseokoh/followers","following_url":"https://api.github.com/users/chanseokoh/following{/other_user}","gists_url":"https://api.github.com/users/chanseokoh/gists{/gist_id}","starred_url":"https://api.github.com/users/chanseokoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chanseokoh/subscriptions","organizations_url":"https://api.github.com/users/chanseokoh/orgs","repos_url":"https://api.github.com/users/chanseokoh/repos","events_url":"https://api.github.com/users/chanseokoh/events{/privacy}","received_events_url":"https://api.github.com/users/chanseokoh/received_events","type":"User","site_admin":false},"body":"What if `processhandler` becomes null by the `ProcessAdapter` above right after checking `processHandler != null` but before executing `processHandler.getProcess().destory()`? Do we have a synchronization issue?","created_at":"2016-04-13T21:55:44Z","updated_at":"2016-04-13T21:55:44Z","html_url":"https://github.com/GoogleCloudPlatform/gcloud-intellij/pull/630#discussion_r59633122","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/pulls/630","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/pulls/comments/59633122"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-intellij/pull/630#discussion_r59633122"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/pulls/630"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/pulls/630","id":66373690,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-intellij/pull/630","diff_url":"https://github.com/GoogleCloudPlatform/gcloud-intellij/pull/630.diff","patch_url":"https://github.com/GoogleCloudPlatform/gcloud-intellij/pull/630.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/issues/630","number":630,"state":"open","locked":false,"title":"Cancel Deployment Process","user":{"login":"meltsufin","id":17732492,"avatar_url":"https://avatars.githubusercontent.com/u/17732492?v=3","gravatar_id":"","url":"https://api.github.com/users/meltsufin","html_url":"https://github.com/meltsufin","followers_url":"https://api.github.com/users/meltsufin/followers","following_url":"https://api.github.com/users/meltsufin/following{/other_user}","gists_url":"https://api.github.com/users/meltsufin/gists{/gist_id}","starred_url":"https://api.github.com/users/meltsufin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meltsufin/subscriptions","organizations_url":"https://api.github.com/users/meltsufin/orgs","repos_url":"https://api.github.com/users/meltsufin/repos","events_url":"https://api.github.com/users/meltsufin/events{/privacy}","received_events_url":"https://api.github.com/users/meltsufin/received_events","type":"User","site_admin":false},"body":"Fixes #588, #581, and #618.\r\n\r\nCombines PRs #615 and #621.","created_at":"2016-04-13T19:01:33Z","updated_at":"2016-04-13T21:55:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c300e646f95e87ad499dac85a3dbc5802d2be24b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/pulls/630/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/pulls/630/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/issues/630/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/statuses/484adb700c52fb2c7b57dfcdc7a030368ff422f2","head":{"label":"GoogleCloudPlatform:stop_deployment_all","ref":"stop_deployment_all","sha":"484adb700c52fb2c7b57dfcdc7a030368ff422f2","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":38834157,"name":"gcloud-intellij","full_name":"GoogleCloudPlatform/gcloud-intellij","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-intellij","description":"Plugin to support the Google Cloud Platform in IntelliJ IDEA.","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/deployments","created_at":"2015-07-09T17:08:59Z","updated_at":"2016-04-06T19:42:50Z","pushed_at":"2016-04-13T21:43:41Z","git_url":"git://github.com/GoogleCloudPlatform/gcloud-intellij.git","ssh_url":"git@github.com:GoogleCloudPlatform/gcloud-intellij.git","clone_url":"https://github.com/GoogleCloudPlatform/gcloud-intellij.git","svn_url":"https://github.com/GoogleCloudPlatform/gcloud-intellij","homepage":"","size":19357,"stargazers_count":17,"watchers_count":17,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":55,"forks":6,"open_issues":55,"watchers":17,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"34c11fed74175b0b4547524f0051249258523b4c","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":38834157,"name":"gcloud-intellij","full_name":"GoogleCloudPlatform/gcloud-intellij","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-intellij","description":"Plugin to support the Google Cloud Platform in IntelliJ IDEA.","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/deployments","created_at":"2015-07-09T17:08:59Z","updated_at":"2016-04-06T19:42:50Z","pushed_at":"2016-04-13T21:43:41Z","git_url":"git://github.com/GoogleCloudPlatform/gcloud-intellij.git","ssh_url":"git@github.com:GoogleCloudPlatform/gcloud-intellij.git","clone_url":"https://github.com/GoogleCloudPlatform/gcloud-intellij.git","svn_url":"https://github.com/GoogleCloudPlatform/gcloud-intellij","homepage":"","size":19357,"stargazers_count":17,"watchers_count":17,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":55,"forks":6,"open_issues":55,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/pulls/630"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-intellij/pull/630"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/issues/630"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/issues/630/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/pulls/630/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/pulls/630/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-intellij/statuses/484adb700c52fb2c7b57dfcdc7a030368ff422f2"}}}}