{"action":"created","comment":{"url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/pulls/comments/33962102","id":33962102,"diff_hunk":"@@ -56,16 +57,37 @@ protected void handleConnectionChanged(IConnection connection, String property,\n \t\t\t\trefreshGrouping(groupMap.get(resource.getProject()), resource.getKind());\n \t\t\t}else if(oldValue != null && newValue == null) {\n \t\t\t\t//delete\n-\t\t\t\tIResource resource = (IResource)oldValue;\n+\t\t\t\tIResource resource = (IResource) oldValue;\n \t\t\t\trefreshGrouping(groupMap.get(resource.getProject()), resource.getKind());\n \t\t\t}else {\n \t\t\t\trefreshViewer(newValue);\n \t\t\t}\n+\t\t}else if(ConnectionProperties.PROPERTY_PROJECTS.equals(property)){\n+\t\t\thandleProjectChanges(oldValue, newValue);\n \t\t}else{\n \t\t\tsuper.handleConnectionChanged(connection, property, oldValue, newValue);\n \t\t}\n \t}\n \t\n+\t@SuppressWarnings(\"unchecked\")\n+\tprivate void handleProjectChanges(Object oldValue, Object newValue) {\n+\t\tList<IProject> newProjects = (List<IProject>) newValue;\n+\t\tList<IProject> oldProjects = (List<IProject>) oldValue;\n+\t\t//theory this should only be one.\n+\t\tObject [] diffs = CollectionUtils.disjunction(newProjects, oldProjects).toArray();\n+\t\tif(newProjects.size() > oldProjects.size()) {","path":"plugins/org.jboss.tools.openshift.ui/src/org/jboss/tools/openshift/internal/ui/explorer/OpenShiftExplorerContentProvider.java","position":31,"original_position":31,"commit_id":"21e9fbd2ad2fb2533e7145c692cad3b95d64ccbf","original_commit_id":"21e9fbd2ad2fb2533e7145c692cad3b95d64ccbf","user":{"login":"jcantrill","id":4548408,"avatar_url":"https://avatars.githubusercontent.com/u/4548408?v=3","gravatar_id":"","url":"https://api.github.com/users/jcantrill","html_url":"https://github.com/jcantrill","followers_url":"https://api.github.com/users/jcantrill/followers","following_url":"https://api.github.com/users/jcantrill/following{/other_user}","gists_url":"https://api.github.com/users/jcantrill/gists{/gist_id}","starred_url":"https://api.github.com/users/jcantrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcantrill/subscriptions","organizations_url":"https://api.github.com/users/jcantrill/orgs","repos_url":"https://api.github.com/users/jcantrill/repos","events_url":"https://api.github.com/users/jcantrill/events{/privacy}","received_events_url":"https://api.github.com/users/jcantrill/received_events","type":"User","site_admin":false},"body":"refactored to use Diffs","created_at":"2015-07-06T17:52:27Z","updated_at":"2015-07-06T17:52:27Z","html_url":"https://github.com/jbosstools/jbosstools-openshift/pull/686#discussion_r33962102","pull_request_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/pulls/686","_links":{"self":{"href":"https://api.github.com/repos/jbosstools/jbosstools-openshift/pulls/comments/33962102"},"html":{"href":"https://github.com/jbosstools/jbosstools-openshift/pull/686#discussion_r33962102"},"pull_request":{"href":"https://api.github.com/repos/jbosstools/jbosstools-openshift/pulls/686"}}},"pull_request":{"url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/pulls/686","id":39119368,"html_url":"https://github.com/jbosstools/jbosstools-openshift/pull/686","diff_url":"https://github.com/jbosstools/jbosstools-openshift/pull/686.diff","patch_url":"https://github.com/jbosstools/jbosstools-openshift/pull/686.patch","issue_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/issues/686","number":686,"state":"open","locked":false,"title":"[JBIDE-20016] Manage projects","user":{"login":"jcantrill","id":4548408,"avatar_url":"https://avatars.githubusercontent.com/u/4548408?v=3","gravatar_id":"","url":"https://api.github.com/users/jcantrill","html_url":"https://github.com/jcantrill","followers_url":"https://api.github.com/users/jcantrill/followers","following_url":"https://api.github.com/users/jcantrill/following{/other_user}","gists_url":"https://api.github.com/users/jcantrill/gists{/gist_id}","starred_url":"https://api.github.com/users/jcantrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcantrill/subscriptions","organizations_url":"https://api.github.com/users/jcantrill/orgs","repos_url":"https://api.github.com/users/jcantrill/repos","events_url":"https://api.github.com/users/jcantrill/events{/privacy}","received_events_url":"https://api.github.com/users/jcantrill/received_events","type":"User","site_admin":false},"body":"@adietish please review when you have an opportunity","created_at":"2015-07-02T19:50:01Z","updated_at":"2015-07-06T17:52:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce55c32c70c4bc05eeac0a220f093ca649c1e32d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/pulls/686/commits","review_comments_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/pulls/686/comments","review_comment_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/issues/686/comments","statuses_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/statuses/21e9fbd2ad2fb2533e7145c692cad3b95d64ccbf","head":{"label":"jcantrill:20016_create_project","ref":"20016_create_project","sha":"21e9fbd2ad2fb2533e7145c692cad3b95d64ccbf","user":{"login":"jcantrill","id":4548408,"avatar_url":"https://avatars.githubusercontent.com/u/4548408?v=3","gravatar_id":"","url":"https://api.github.com/users/jcantrill","html_url":"https://github.com/jcantrill","followers_url":"https://api.github.com/users/jcantrill/followers","following_url":"https://api.github.com/users/jcantrill/following{/other_user}","gists_url":"https://api.github.com/users/jcantrill/gists{/gist_id}","starred_url":"https://api.github.com/users/jcantrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcantrill/subscriptions","organizations_url":"https://api.github.com/users/jcantrill/orgs","repos_url":"https://api.github.com/users/jcantrill/repos","events_url":"https://api.github.com/users/jcantrill/events{/privacy}","received_events_url":"https://api.github.com/users/jcantrill/received_events","type":"User","site_admin":false},"repo":{"id":21654912,"name":"jbosstools-openshift","full_name":"jcantrill/jbosstools-openshift","owner":{"login":"jcantrill","id":4548408,"avatar_url":"https://avatars.githubusercontent.com/u/4548408?v=3","gravatar_id":"","url":"https://api.github.com/users/jcantrill","html_url":"https://github.com/jcantrill","followers_url":"https://api.github.com/users/jcantrill/followers","following_url":"https://api.github.com/users/jcantrill/following{/other_user}","gists_url":"https://api.github.com/users/jcantrill/gists{/gist_id}","starred_url":"https://api.github.com/users/jcantrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcantrill/subscriptions","organizations_url":"https://api.github.com/users/jcantrill/orgs","repos_url":"https://api.github.com/users/jcantrill/repos","events_url":"https://api.github.com/users/jcantrill/events{/privacy}","received_events_url":"https://api.github.com/users/jcantrill/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jcantrill/jbosstools-openshift","description":"JBoss Tools :: OpenShift { openshift }","fork":true,"url":"https://api.github.com/repos/jcantrill/jbosstools-openshift","forks_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/forks","keys_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/teams","hooks_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/hooks","issue_events_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/issues/events{/number}","events_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/events","assignees_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/assignees{/user}","branches_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/branches{/branch}","tags_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/tags","blobs_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/git/refs{/sha}","trees_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/statuses/{sha}","languages_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/languages","stargazers_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/stargazers","contributors_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/contributors","subscribers_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/subscribers","subscription_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/subscription","commits_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/commits{/sha}","git_commits_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/git/commits{/sha}","comments_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/comments{/number}","issue_comment_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/issues/comments{/number}","contents_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/contents/{+path}","compare_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/merges","archive_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/downloads","issues_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/issues{/number}","pulls_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/pulls{/number}","milestones_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/milestones{/number}","notifications_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/labels{/name}","releases_url":"https://api.github.com/repos/jcantrill/jbosstools-openshift/releases{/id}","created_at":"2014-07-09T14:19:31Z","updated_at":"2015-06-04T22:37:01Z","pushed_at":"2015-07-02T19:49:02Z","git_url":"git://github.com/jcantrill/jbosstools-openshift.git","ssh_url":"git@github.com:jcantrill/jbosstools-openshift.git","clone_url":"https://github.com/jcantrill/jbosstools-openshift.git","svn_url":"https://github.com/jcantrill/jbosstools-openshift","homepage":"","size":14301,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"jbosstools:master","ref":"master","sha":"96892d747d122ecf153f653a93e3379d438d6d99","user":{"login":"jbosstools","id":619871,"avatar_url":"https://avatars.githubusercontent.com/u/619871?v=3","gravatar_id":"","url":"https://api.github.com/users/jbosstools","html_url":"https://github.com/jbosstools","followers_url":"https://api.github.com/users/jbosstools/followers","following_url":"https://api.github.com/users/jbosstools/following{/other_user}","gists_url":"https://api.github.com/users/jbosstools/gists{/gist_id}","starred_url":"https://api.github.com/users/jbosstools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbosstools/subscriptions","organizations_url":"https://api.github.com/users/jbosstools/orgs","repos_url":"https://api.github.com/users/jbosstools/repos","events_url":"https://api.github.com/users/jbosstools/events{/privacy}","received_events_url":"https://api.github.com/users/jbosstools/received_events","type":"Organization","site_admin":false},"repo":{"id":6308288,"name":"jbosstools-openshift","full_name":"jbosstools/jbosstools-openshift","owner":{"login":"jbosstools","id":619871,"avatar_url":"https://avatars.githubusercontent.com/u/619871?v=3","gravatar_id":"","url":"https://api.github.com/users/jbosstools","html_url":"https://github.com/jbosstools","followers_url":"https://api.github.com/users/jbosstools/followers","following_url":"https://api.github.com/users/jbosstools/following{/other_user}","gists_url":"https://api.github.com/users/jbosstools/gists{/gist_id}","starred_url":"https://api.github.com/users/jbosstools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbosstools/subscriptions","organizations_url":"https://api.github.com/users/jbosstools/orgs","repos_url":"https://api.github.com/users/jbosstools/repos","events_url":"https://api.github.com/users/jbosstools/events{/privacy}","received_events_url":"https://api.github.com/users/jbosstools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jbosstools/jbosstools-openshift","description":"JBoss Tools :: OpenShift { openshift }","fork":false,"url":"https://api.github.com/repos/jbosstools/jbosstools-openshift","forks_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/forks","keys_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/teams","hooks_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/hooks","issue_events_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/issues/events{/number}","events_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/events","assignees_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/assignees{/user}","branches_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/branches{/branch}","tags_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/tags","blobs_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/git/refs{/sha}","trees_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/statuses/{sha}","languages_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/languages","stargazers_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/stargazers","contributors_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/contributors","subscribers_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/subscribers","subscription_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/subscription","commits_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/commits{/sha}","git_commits_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/git/commits{/sha}","comments_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/comments{/number}","issue_comment_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/issues/comments{/number}","contents_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/contents/{+path}","compare_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/merges","archive_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/downloads","issues_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/issues{/number}","pulls_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/pulls{/number}","milestones_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/milestones{/number}","notifications_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/labels{/name}","releases_url":"https://api.github.com/repos/jbosstools/jbosstools-openshift/releases{/id}","created_at":"2012-10-20T11:23:01Z","updated_at":"2015-05-05T14:50:29Z","pushed_at":"2015-07-03T20:37:42Z","git_url":"git://github.com/jbosstools/jbosstools-openshift.git","ssh_url":"git@github.com:jbosstools/jbosstools-openshift.git","clone_url":"https://github.com/jbosstools/jbosstools-openshift.git","svn_url":"https://github.com/jbosstools/jbosstools-openshift","homepage":"","size":17906,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":7,"forks":28,"open_issues":7,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jbosstools/jbosstools-openshift/pulls/686"},"html":{"href":"https://github.com/jbosstools/jbosstools-openshift/pull/686"},"issue":{"href":"https://api.github.com/repos/jbosstools/jbosstools-openshift/issues/686"},"comments":{"href":"https://api.github.com/repos/jbosstools/jbosstools-openshift/issues/686/comments"},"review_comments":{"href":"https://api.github.com/repos/jbosstools/jbosstools-openshift/pulls/686/comments"},"review_comment":{"href":"https://api.github.com/repos/jbosstools/jbosstools-openshift/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jbosstools/jbosstools-openshift/pulls/686/commits"},"statuses":{"href":"https://api.github.com/repos/jbosstools/jbosstools-openshift/statuses/21e9fbd2ad2fb2533e7145c692cad3b95d64ccbf"}}}}