{"action":"created","comment":{"url":"https://api.github.com/repos/gamerson/liferay-ide/pulls/comments/36463755","id":36463755,"diff_hunk":"@@ -0,0 +1,159 @@\n+/*******************************************************************************\n+ * Copyright (c) 2000-present Liferay, Inc. All rights reserved.\n+ *\n+ * This library is free software; you can redistribute it and/or modify it under\n+ * the terms of the GNU Lesser General Public License as published by the Free\n+ * Software Foundation; either version 2.1 of the License, or (at your option)\n+ * any later version.\n+ *\n+ * This library is distributed in the hope that it will be useful, but WITHOUT\n+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more\n+ * details.\n+ *\n+ *******************************************************************************/\n+\n+package com.liferay.ide.project.core;\n+\n+import com.liferay.ide.core.util.CoreUtil;\n+import com.liferay.ide.project.core.util.ProjectUtil;\n+import com.liferay.ide.sdk.core.SDKUtil;\n+\n+import org.eclipse.core.resources.IFile;\n+import org.eclipse.core.resources.IMarker;\n+import org.eclipse.core.resources.IProject;\n+import org.eclipse.core.resources.IResource;\n+import org.eclipse.core.resources.IResourceChangeEvent;\n+import org.eclipse.core.resources.IResourceChangeListener;\n+import org.eclipse.core.resources.IResourceDelta;\n+import org.eclipse.core.resources.IResourceDeltaVisitor;\n+import org.eclipse.core.resources.WorkspaceJob;\n+import org.eclipse.core.runtime.CoreException;\n+import org.eclipse.core.runtime.IProgressMonitor;\n+import org.eclipse.core.runtime.IStatus;\n+import org.eclipse.core.runtime.NullProgressMonitor;\n+import org.eclipse.core.runtime.Status;\n+import org.eclipse.core.runtime.jobs.Job;\n+\n+/**\n+ * @author Simon Jiang\n+ */\n+public class LiferayWorkspaceSDKListener implements IResourceChangeListener, IResourceDeltaVisitor\n+{\n+\n+    private static final String ID_WORKSPACE_SDK_INVALID = \"workspace-sdk-invalid\";\n+\n+    @Override\n+    public void resourceChanged( IResourceChangeEvent event )\n+    {\n+        if( event == null )\n+        {\n+            return;\n+        }\n+\n+        try\n+        {\n+            event.getDelta().accept( this );","path":"tools/plugins/com.liferay.ide.project.core/src/com/liferay/ide/project/core/LiferayWorkspaceSDKListener.java","position":56,"original_position":56,"commit_id":"e9dcb191d17fac52ad427349160c6b4927119fb1","original_commit_id":"e9dcb191d17fac52ad427349160c6b4927119fb1","user":{"login":"gamerson","id":595221,"avatar_url":"https://avatars.githubusercontent.com/u/595221?v=3","gravatar_id":"","url":"https://api.github.com/users/gamerson","html_url":"https://github.com/gamerson","followers_url":"https://api.github.com/users/gamerson/followers","following_url":"https://api.github.com/users/gamerson/following{/other_user}","gists_url":"https://api.github.com/users/gamerson/gists{/gist_id}","starred_url":"https://api.github.com/users/gamerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gamerson/subscriptions","organizations_url":"https://api.github.com/users/gamerson/orgs","repos_url":"https://api.github.com/users/gamerson/repos","events_url":"https://api.github.com/users/gamerson/events{/privacy}","received_events_url":"https://api.github.com/users/gamerson/received_events","type":"User","site_admin":false},"body":"We only want to accept if its the type of event we want, (add/delete?)","created_at":"2015-08-06T20:49:42Z","updated_at":"2015-08-06T20:49:42Z","html_url":"https://github.com/gamerson/liferay-ide/pull/1110#discussion_r36463755","pull_request_url":"https://api.github.com/repos/gamerson/liferay-ide/pulls/1110","_links":{"self":{"href":"https://api.github.com/repos/gamerson/liferay-ide/pulls/comments/36463755"},"html":{"href":"https://github.com/gamerson/liferay-ide/pull/1110#discussion_r36463755"},"pull_request":{"href":"https://api.github.com/repos/gamerson/liferay-ide/pulls/1110"}}},"pull_request":{"url":"https://api.github.com/repos/gamerson/liferay-ide/pulls/1110","id":41645090,"html_url":"https://github.com/gamerson/liferay-ide/pull/1110","diff_url":"https://github.com/gamerson/liferay-ide/pull/1110.diff","patch_url":"https://github.com/gamerson/liferay-ide/pull/1110.patch","issue_url":"https://api.github.com/repos/gamerson/liferay-ide/issues/1110","number":1110,"state":"open","locked":false,"title":"IDE-2054 workspace can have only one sdk","user":{"login":"simonjhy","id":5745444,"avatar_url":"https://avatars.githubusercontent.com/u/5745444?v=3","gravatar_id":"","url":"https://api.github.com/users/simonjhy","html_url":"https://github.com/simonjhy","followers_url":"https://api.github.com/users/simonjhy/followers","following_url":"https://api.github.com/users/simonjhy/following{/other_user}","gists_url":"https://api.github.com/users/simonjhy/gists{/gist_id}","starred_url":"https://api.github.com/users/simonjhy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonjhy/subscriptions","organizations_url":"https://api.github.com/users/simonjhy/orgs","repos_url":"https://api.github.com/users/simonjhy/repos","events_url":"https://api.github.com/users/simonjhy/events{/privacy}","received_events_url":"https://api.github.com/users/simonjhy/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-05T05:45:16Z","updated_at":"2015-08-06T20:49:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b62ba4243638e54ebfdbdab7488a860c3634e1fb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gamerson/liferay-ide/pulls/1110/commits","review_comments_url":"https://api.github.com/repos/gamerson/liferay-ide/pulls/1110/comments","review_comment_url":"https://api.github.com/repos/gamerson/liferay-ide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gamerson/liferay-ide/issues/1110/comments","statuses_url":"https://api.github.com/repos/gamerson/liferay-ide/statuses/e9dcb191d17fac52ad427349160c6b4927119fb1","head":{"label":"simonjhy:IDE-2054","ref":"IDE-2054","sha":"e9dcb191d17fac52ad427349160c6b4927119fb1","user":{"login":"simonjhy","id":5745444,"avatar_url":"https://avatars.githubusercontent.com/u/5745444?v=3","gravatar_id":"","url":"https://api.github.com/users/simonjhy","html_url":"https://github.com/simonjhy","followers_url":"https://api.github.com/users/simonjhy/followers","following_url":"https://api.github.com/users/simonjhy/following{/other_user}","gists_url":"https://api.github.com/users/simonjhy/gists{/gist_id}","starred_url":"https://api.github.com/users/simonjhy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonjhy/subscriptions","organizations_url":"https://api.github.com/users/simonjhy/orgs","repos_url":"https://api.github.com/users/simonjhy/repos","events_url":"https://api.github.com/users/simonjhy/events{/privacy}","received_events_url":"https://api.github.com/users/simonjhy/received_events","type":"User","site_admin":false},"repo":{"id":13982704,"name":"liferay-ide","full_name":"simonjhy/liferay-ide","owner":{"login":"simonjhy","id":5745444,"avatar_url":"https://avatars.githubusercontent.com/u/5745444?v=3","gravatar_id":"","url":"https://api.github.com/users/simonjhy","html_url":"https://github.com/simonjhy","followers_url":"https://api.github.com/users/simonjhy/followers","following_url":"https://api.github.com/users/simonjhy/following{/other_user}","gists_url":"https://api.github.com/users/simonjhy/gists{/gist_id}","starred_url":"https://api.github.com/users/simonjhy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonjhy/subscriptions","organizations_url":"https://api.github.com/users/simonjhy/orgs","repos_url":"https://api.github.com/users/simonjhy/repos","events_url":"https://api.github.com/users/simonjhy/events{/privacy}","received_events_url":"https://api.github.com/users/simonjhy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/simonjhy/liferay-ide","description":"","fork":true,"url":"https://api.github.com/repos/simonjhy/liferay-ide","forks_url":"https://api.github.com/repos/simonjhy/liferay-ide/forks","keys_url":"https://api.github.com/repos/simonjhy/liferay-ide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simonjhy/liferay-ide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simonjhy/liferay-ide/teams","hooks_url":"https://api.github.com/repos/simonjhy/liferay-ide/hooks","issue_events_url":"https://api.github.com/repos/simonjhy/liferay-ide/issues/events{/number}","events_url":"https://api.github.com/repos/simonjhy/liferay-ide/events","assignees_url":"https://api.github.com/repos/simonjhy/liferay-ide/assignees{/user}","branches_url":"https://api.github.com/repos/simonjhy/liferay-ide/branches{/branch}","tags_url":"https://api.github.com/repos/simonjhy/liferay-ide/tags","blobs_url":"https://api.github.com/repos/simonjhy/liferay-ide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simonjhy/liferay-ide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simonjhy/liferay-ide/git/refs{/sha}","trees_url":"https://api.github.com/repos/simonjhy/liferay-ide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simonjhy/liferay-ide/statuses/{sha}","languages_url":"https://api.github.com/repos/simonjhy/liferay-ide/languages","stargazers_url":"https://api.github.com/repos/simonjhy/liferay-ide/stargazers","contributors_url":"https://api.github.com/repos/simonjhy/liferay-ide/contributors","subscribers_url":"https://api.github.com/repos/simonjhy/liferay-ide/subscribers","subscription_url":"https://api.github.com/repos/simonjhy/liferay-ide/subscription","commits_url":"https://api.github.com/repos/simonjhy/liferay-ide/commits{/sha}","git_commits_url":"https://api.github.com/repos/simonjhy/liferay-ide/git/commits{/sha}","comments_url":"https://api.github.com/repos/simonjhy/liferay-ide/comments{/number}","issue_comment_url":"https://api.github.com/repos/simonjhy/liferay-ide/issues/comments{/number}","contents_url":"https://api.github.com/repos/simonjhy/liferay-ide/contents/{+path}","compare_url":"https://api.github.com/repos/simonjhy/liferay-ide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simonjhy/liferay-ide/merges","archive_url":"https://api.github.com/repos/simonjhy/liferay-ide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simonjhy/liferay-ide/downloads","issues_url":"https://api.github.com/repos/simonjhy/liferay-ide/issues{/number}","pulls_url":"https://api.github.com/repos/simonjhy/liferay-ide/pulls{/number}","milestones_url":"https://api.github.com/repos/simonjhy/liferay-ide/milestones{/number}","notifications_url":"https://api.github.com/repos/simonjhy/liferay-ide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simonjhy/liferay-ide/labels{/name}","releases_url":"https://api.github.com/repos/simonjhy/liferay-ide/releases{/id}","created_at":"2013-10-30T09:51:25Z","updated_at":"2014-07-18T06:00:43Z","pushed_at":"2015-08-05T05:43:25Z","git_url":"git://github.com/simonjhy/liferay-ide.git","ssh_url":"git@github.com:simonjhy/liferay-ide.git","clone_url":"https://github.com/simonjhy/liferay-ide.git","svn_url":"https://github.com/simonjhy/liferay-ide","homepage":"","size":189032,"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":"gamerson:master","ref":"master","sha":"43b1712bcb95687c6f5c966b18cbedf73f613681","user":{"login":"gamerson","id":595221,"avatar_url":"https://avatars.githubusercontent.com/u/595221?v=3","gravatar_id":"","url":"https://api.github.com/users/gamerson","html_url":"https://github.com/gamerson","followers_url":"https://api.github.com/users/gamerson/followers","following_url":"https://api.github.com/users/gamerson/following{/other_user}","gists_url":"https://api.github.com/users/gamerson/gists{/gist_id}","starred_url":"https://api.github.com/users/gamerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gamerson/subscriptions","organizations_url":"https://api.github.com/users/gamerson/orgs","repos_url":"https://api.github.com/users/gamerson/repos","events_url":"https://api.github.com/users/gamerson/events{/privacy}","received_events_url":"https://api.github.com/users/gamerson/received_events","type":"User","site_admin":false},"repo":{"id":1926534,"name":"liferay-ide","full_name":"gamerson/liferay-ide","owner":{"login":"gamerson","id":595221,"avatar_url":"https://avatars.githubusercontent.com/u/595221?v=3","gravatar_id":"","url":"https://api.github.com/users/gamerson","html_url":"https://github.com/gamerson","followers_url":"https://api.github.com/users/gamerson/followers","following_url":"https://api.github.com/users/gamerson/following{/other_user}","gists_url":"https://api.github.com/users/gamerson/gists{/gist_id}","starred_url":"https://api.github.com/users/gamerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gamerson/subscriptions","organizations_url":"https://api.github.com/users/gamerson/orgs","repos_url":"https://api.github.com/users/gamerson/repos","events_url":"https://api.github.com/users/gamerson/events{/privacy}","received_events_url":"https://api.github.com/users/gamerson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gamerson/liferay-ide","description":"","fork":true,"url":"https://api.github.com/repos/gamerson/liferay-ide","forks_url":"https://api.github.com/repos/gamerson/liferay-ide/forks","keys_url":"https://api.github.com/repos/gamerson/liferay-ide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gamerson/liferay-ide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gamerson/liferay-ide/teams","hooks_url":"https://api.github.com/repos/gamerson/liferay-ide/hooks","issue_events_url":"https://api.github.com/repos/gamerson/liferay-ide/issues/events{/number}","events_url":"https://api.github.com/repos/gamerson/liferay-ide/events","assignees_url":"https://api.github.com/repos/gamerson/liferay-ide/assignees{/user}","branches_url":"https://api.github.com/repos/gamerson/liferay-ide/branches{/branch}","tags_url":"https://api.github.com/repos/gamerson/liferay-ide/tags","blobs_url":"https://api.github.com/repos/gamerson/liferay-ide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gamerson/liferay-ide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gamerson/liferay-ide/git/refs{/sha}","trees_url":"https://api.github.com/repos/gamerson/liferay-ide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gamerson/liferay-ide/statuses/{sha}","languages_url":"https://api.github.com/repos/gamerson/liferay-ide/languages","stargazers_url":"https://api.github.com/repos/gamerson/liferay-ide/stargazers","contributors_url":"https://api.github.com/repos/gamerson/liferay-ide/contributors","subscribers_url":"https://api.github.com/repos/gamerson/liferay-ide/subscribers","subscription_url":"https://api.github.com/repos/gamerson/liferay-ide/subscription","commits_url":"https://api.github.com/repos/gamerson/liferay-ide/commits{/sha}","git_commits_url":"https://api.github.com/repos/gamerson/liferay-ide/git/commits{/sha}","comments_url":"https://api.github.com/repos/gamerson/liferay-ide/comments{/number}","issue_comment_url":"https://api.github.com/repos/gamerson/liferay-ide/issues/comments{/number}","contents_url":"https://api.github.com/repos/gamerson/liferay-ide/contents/{+path}","compare_url":"https://api.github.com/repos/gamerson/liferay-ide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gamerson/liferay-ide/merges","archive_url":"https://api.github.com/repos/gamerson/liferay-ide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gamerson/liferay-ide/downloads","issues_url":"https://api.github.com/repos/gamerson/liferay-ide/issues{/number}","pulls_url":"https://api.github.com/repos/gamerson/liferay-ide/pulls{/number}","milestones_url":"https://api.github.com/repos/gamerson/liferay-ide/milestones{/number}","notifications_url":"https://api.github.com/repos/gamerson/liferay-ide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gamerson/liferay-ide/labels{/name}","releases_url":"https://api.github.com/repos/gamerson/liferay-ide/releases{/id}","created_at":"2011-06-20T23:49:28Z","updated_at":"2015-05-07T04:04:01Z","pushed_at":"2015-08-06T20:42:53Z","git_url":"git://github.com/gamerson/liferay-ide.git","ssh_url":"git@github.com:gamerson/liferay-ide.git","clone_url":"https://github.com/gamerson/liferay-ide.git","svn_url":"https://github.com/gamerson/liferay-ide","homepage":"","size":220977,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":2,"forks":5,"open_issues":2,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gamerson/liferay-ide/pulls/1110"},"html":{"href":"https://github.com/gamerson/liferay-ide/pull/1110"},"issue":{"href":"https://api.github.com/repos/gamerson/liferay-ide/issues/1110"},"comments":{"href":"https://api.github.com/repos/gamerson/liferay-ide/issues/1110/comments"},"review_comments":{"href":"https://api.github.com/repos/gamerson/liferay-ide/pulls/1110/comments"},"review_comment":{"href":"https://api.github.com/repos/gamerson/liferay-ide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gamerson/liferay-ide/pulls/1110/commits"},"statuses":{"href":"https://api.github.com/repos/gamerson/liferay-ide/statuses/e9dcb191d17fac52ad427349160c6b4927119fb1"}}}}