{"action":"created","comment":{"url":"https://api.github.com/repos/debrief/limpet/pulls/comments/48328586","id":48328586,"diff_hunk":"@@ -100,7 +118,117 @@ public void changed()\n \tprivate Action createCourse;\n \tprivate Action createLocation;\n \tprivate IContext _context = new RCPContext();\n+\t\n+\tprivate IResourceChangeListener resourceChangeListener = new IResourceChangeListener()\n+\t{\n+\n+\t\t@Override\n+\t\tpublic void resourceChanged(IResourceChangeEvent event)\n+\t\t{\n+\t\t\tIResourceDelta delta = event.getDelta();\n+\t\t\tfinal int eventType = event.getType();\n+\t\t\tif (delta != null)\n+\t\t\t{\n+\t\t\t\ttry\n+\t\t\t\t{\n+\t\t\t\t\tdelta.accept(new IResourceDeltaVisitor()\n+\t\t\t\t\t{\n+\n+\t\t\t\t\t\t@Override\n+\t\t\t\t\t\tpublic boolean visit(IResourceDelta delta) throws CoreException\n+\t\t\t\t\t\t{\n+\t\t\t\t\t\t\tIResource resource = delta.getResource();\n+\t\t\t\t\t\t\tif (resource instanceof IWorkspaceRoot)\n+\t\t\t\t\t\t\t{\n+\t\t\t\t\t\t\t\treturn true;\n+\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\tif (resource instanceof IProject)\n+\t\t\t\t\t\t\t{\n+\t\t\t\t\t\t\t\tIEditorInput input = getEditorInput();\n+\t\t\t\t\t\t\t\tif (input instanceof IFileEditorInput)\n+\t\t\t\t\t\t\t\t{\n+\t\t\t\t\t\t\t\t\tIProject project = ((IFileEditorInput) input).getFile()\n+\t\t\t\t\t\t\t\t\t\t\t.getProject();\n+\t\t\t\t\t\t\t\t\tif (resource.equals(project)\n+\t\t\t\t\t\t\t\t\t\t\t&& (eventType == IResourceChangeEvent.PRE_DELETE || eventType == IResourceChangeEvent.PRE_CLOSE))\n+\t\t\t\t\t\t\t\t\t{\n+\t\t\t\t\t\t\t\t\t\tcloseEditor();\n+\t\t\t\t\t\t\t\t\t\treturn false;\n+\t\t\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\t\treturn true;\n+\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\tif (resource instanceof IFolder)\n+\t\t\t\t\t\t\t{\n+\t\t\t\t\t\t\t\treturn true;\n+\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\tif (resource instanceof IFile)\n+\t\t\t\t\t\t\t{\n+\t\t\t\t\t\t\t\tIEditorInput input = getEditorInput();\n+\t\t\t\t\t\t\t\tif (input instanceof IFileEditorInput)\n+\t\t\t\t\t\t\t\t{\n+\t\t\t\t\t\t\t\t\tIFile file = ((IFileEditorInput) input).getFile();\n+\t\t\t\t\t\t\t\t\tif (resource.equals(file)\n+\t\t\t\t\t\t\t\t\t\t\t&& delta.getKind() == IResourceDelta.REMOVED)\n+\t\t\t\t\t\t\t\t\t{\n+\t\t\t\t\t\t\t\t\t\tIPath movedToPath = delta.getMovedToPath();\n+\t\t\t\t\t\t\t\t\t\tif (movedToPath != null)\n+\t\t\t\t\t\t\t\t\t\t{\n+\t\t\t\t\t\t\t\t\t\t\tIResource path = ResourcesPlugin.getWorkspace().getRoot()\n+\t\t\t\t\t\t\t\t\t\t\t\t\t.findMember(movedToPath);\n+\t\t\t\t\t\t\t\t\t\t\tif (path instanceof IFile)\n+\t\t\t\t\t\t\t\t\t\t\t{\n+\t\t\t\t\t\t\t\t\t\t\t\tfinal FileEditorInput newInput = new FileEditorInput(\n+\t\t\t\t\t\t\t\t\t\t\t\t\t\t(IFile) path);\n+\t\t\t\t\t\t\t\t\t\t\t\tDisplay.getDefault().asyncExec(new Runnable()\n+\t\t\t\t\t\t\t\t\t\t\t\t{\n+\n+\t\t\t\t\t\t\t\t\t\t\t\t\t@Override\n+\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void run()\n+\t\t\t\t\t\t\t\t\t\t\t\t\t{\n+\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetInputWithNotify(newInput);\n+\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetPartName(newInput.getName());\n+\t\t\t\t\t\t\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\t\t\t\t\t\t});\n+\t\t\t\t\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\t\t\t\telse\n+\t\t\t\t\t\t\t\t\t\t{\n+\t\t\t\t\t\t\t\t\t\t\tcloseEditor();\n+\t\t\t\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\t\t\t} \n+\t\t\t\t\t\t\t\t\tif (resource.equals(file) && \n+\t\t\t\t\t\t\t\t\t\t\t(delta.getKind() == IResourceDelta.CHANGED && (delta.getFlags() & IResourceDelta.CONTENT) != 0))\n+\t\t\t\t\t\t\t\t\t{\n+\t\t\t\t\t\t\t\t\t\t// TODO reload","path":"info.limpet.rcp/src/info/limpet/rcp/editors/DataManagerEditor.java","position":177,"original_position":177,"commit_id":"4eeb6e97aebb7b140cb2a3e1f133c8b38b20b03b","original_commit_id":"4eeb6e97aebb7b140cb2a3e1f133c8b38b20b03b","user":{"login":"IanMayo","id":1108513,"avatar_url":"https://avatars.githubusercontent.com/u/1108513?v=3","gravatar_id":"","url":"https://api.github.com/users/IanMayo","html_url":"https://github.com/IanMayo","followers_url":"https://api.github.com/users/IanMayo/followers","following_url":"https://api.github.com/users/IanMayo/following{/other_user}","gists_url":"https://api.github.com/users/IanMayo/gists{/gist_id}","starred_url":"https://api.github.com/users/IanMayo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IanMayo/subscriptions","organizations_url":"https://api.github.com/users/IanMayo/orgs","repos_url":"https://api.github.com/users/IanMayo/repos","events_url":"https://api.github.com/users/IanMayo/events{/privacy}","received_events_url":"https://api.github.com/users/IanMayo/received_events","type":"User","site_admin":false},"body":"@pecko there's a TODO here. Could you explain what still needs to be done?  Or is the PR incomplete?","created_at":"2015-12-23T08:29:45Z","updated_at":"2015-12-23T08:29:45Z","html_url":"https://github.com/debrief/limpet/pull/200#discussion_r48328586","pull_request_url":"https://api.github.com/repos/debrief/limpet/pulls/200","_links":{"self":{"href":"https://api.github.com/repos/debrief/limpet/pulls/comments/48328586"},"html":{"href":"https://github.com/debrief/limpet/pull/200#discussion_r48328586"},"pull_request":{"href":"https://api.github.com/repos/debrief/limpet/pulls/200"}}},"pull_request":{"url":"https://api.github.com/repos/debrief/limpet/pulls/200","id":54402204,"html_url":"https://github.com/debrief/limpet/pull/200","diff_url":"https://github.com/debrief/limpet/pull/200.diff","patch_url":"https://github.com/debrief/limpet/pull/200.patch","issue_url":"https://api.github.com/repos/debrief/limpet/issues/200","number":200,"state":"open","locked":false,"title":"Issue #102 - UI tidying","user":{"login":"pecko","id":534584,"avatar_url":"https://avatars.githubusercontent.com/u/534584?v=3","gravatar_id":"","url":"https://api.github.com/users/pecko","html_url":"https://github.com/pecko","followers_url":"https://api.github.com/users/pecko/followers","following_url":"https://api.github.com/users/pecko/following{/other_user}","gists_url":"https://api.github.com/users/pecko/gists{/gist_id}","starred_url":"https://api.github.com/users/pecko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pecko/subscriptions","organizations_url":"https://api.github.com/users/pecko/orgs","repos_url":"https://api.github.com/users/pecko/repos","events_url":"https://api.github.com/users/pecko/events{/privacy}","received_events_url":"https://api.github.com/users/pecko/received_events","type":"User","site_admin":false},"body":"I have implemented:\r\n\r\n- Save As\r\n- Refresh Project on save\r\n- clearing a CoreAnalysisView when closing editor\r\n- change editor title if user change file name in navigator\r\n- close editor if user remove file to navigator\r\n","created_at":"2015-12-22T18:52:05Z","updated_at":"2015-12-23T08:29:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db011399aeeb183ab8c828770b477ef997cb4b78","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/debrief/limpet/pulls/200/commits","review_comments_url":"https://api.github.com/repos/debrief/limpet/pulls/200/comments","review_comment_url":"https://api.github.com/repos/debrief/limpet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/debrief/limpet/issues/200/comments","statuses_url":"https://api.github.com/repos/debrief/limpet/statuses/4eeb6e97aebb7b140cb2a3e1f133c8b38b20b03b","head":{"label":"pecko:issue102","ref":"issue102","sha":"4eeb6e97aebb7b140cb2a3e1f133c8b38b20b03b","user":{"login":"pecko","id":534584,"avatar_url":"https://avatars.githubusercontent.com/u/534584?v=3","gravatar_id":"","url":"https://api.github.com/users/pecko","html_url":"https://github.com/pecko","followers_url":"https://api.github.com/users/pecko/followers","following_url":"https://api.github.com/users/pecko/following{/other_user}","gists_url":"https://api.github.com/users/pecko/gists{/gist_id}","starred_url":"https://api.github.com/users/pecko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pecko/subscriptions","organizations_url":"https://api.github.com/users/pecko/orgs","repos_url":"https://api.github.com/users/pecko/repos","events_url":"https://api.github.com/users/pecko/events{/privacy}","received_events_url":"https://api.github.com/users/pecko/received_events","type":"User","site_admin":false},"repo":{"id":43072641,"name":"limpet","full_name":"pecko/limpet","owner":{"login":"pecko","id":534584,"avatar_url":"https://avatars.githubusercontent.com/u/534584?v=3","gravatar_id":"","url":"https://api.github.com/users/pecko","html_url":"https://github.com/pecko","followers_url":"https://api.github.com/users/pecko/followers","following_url":"https://api.github.com/users/pecko/following{/other_user}","gists_url":"https://api.github.com/users/pecko/gists{/gist_id}","starred_url":"https://api.github.com/users/pecko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pecko/subscriptions","organizations_url":"https://api.github.com/users/pecko/orgs","repos_url":"https://api.github.com/users/pecko/repos","events_url":"https://api.github.com/users/pecko/events{/privacy}","received_events_url":"https://api.github.com/users/pecko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pecko/limpet","description":"Placeholder for materials related to the Limpet project","fork":true,"url":"https://api.github.com/repos/pecko/limpet","forks_url":"https://api.github.com/repos/pecko/limpet/forks","keys_url":"https://api.github.com/repos/pecko/limpet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pecko/limpet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pecko/limpet/teams","hooks_url":"https://api.github.com/repos/pecko/limpet/hooks","issue_events_url":"https://api.github.com/repos/pecko/limpet/issues/events{/number}","events_url":"https://api.github.com/repos/pecko/limpet/events","assignees_url":"https://api.github.com/repos/pecko/limpet/assignees{/user}","branches_url":"https://api.github.com/repos/pecko/limpet/branches{/branch}","tags_url":"https://api.github.com/repos/pecko/limpet/tags","blobs_url":"https://api.github.com/repos/pecko/limpet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pecko/limpet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pecko/limpet/git/refs{/sha}","trees_url":"https://api.github.com/repos/pecko/limpet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pecko/limpet/statuses/{sha}","languages_url":"https://api.github.com/repos/pecko/limpet/languages","stargazers_url":"https://api.github.com/repos/pecko/limpet/stargazers","contributors_url":"https://api.github.com/repos/pecko/limpet/contributors","subscribers_url":"https://api.github.com/repos/pecko/limpet/subscribers","subscription_url":"https://api.github.com/repos/pecko/limpet/subscription","commits_url":"https://api.github.com/repos/pecko/limpet/commits{/sha}","git_commits_url":"https://api.github.com/repos/pecko/limpet/git/commits{/sha}","comments_url":"https://api.github.com/repos/pecko/limpet/comments{/number}","issue_comment_url":"https://api.github.com/repos/pecko/limpet/issues/comments{/number}","contents_url":"https://api.github.com/repos/pecko/limpet/contents/{+path}","compare_url":"https://api.github.com/repos/pecko/limpet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pecko/limpet/merges","archive_url":"https://api.github.com/repos/pecko/limpet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pecko/limpet/downloads","issues_url":"https://api.github.com/repos/pecko/limpet/issues{/number}","pulls_url":"https://api.github.com/repos/pecko/limpet/pulls{/number}","milestones_url":"https://api.github.com/repos/pecko/limpet/milestones{/number}","notifications_url":"https://api.github.com/repos/pecko/limpet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pecko/limpet/labels{/name}","releases_url":"https://api.github.com/repos/pecko/limpet/releases{/id}","created_at":"2015-09-24T14:41:43Z","updated_at":"2015-10-07T21:27:36Z","pushed_at":"2015-12-22T23:34:37Z","git_url":"git://github.com/pecko/limpet.git","ssh_url":"git@github.com:pecko/limpet.git","clone_url":"https://github.com/pecko/limpet.git","svn_url":"https://github.com/pecko/limpet","homepage":"http://limpet.info","size":16172,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"debrief:master","ref":"master","sha":"b2ede971d647114bd13ca40573c3b771df4ee691","user":{"login":"debrief","id":7665856,"avatar_url":"https://avatars.githubusercontent.com/u/7665856?v=3","gravatar_id":"","url":"https://api.github.com/users/debrief","html_url":"https://github.com/debrief","followers_url":"https://api.github.com/users/debrief/followers","following_url":"https://api.github.com/users/debrief/following{/other_user}","gists_url":"https://api.github.com/users/debrief/gists{/gist_id}","starred_url":"https://api.github.com/users/debrief/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debrief/subscriptions","organizations_url":"https://api.github.com/users/debrief/orgs","repos_url":"https://api.github.com/users/debrief/repos","events_url":"https://api.github.com/users/debrief/events{/privacy}","received_events_url":"https://api.github.com/users/debrief/received_events","type":"Organization","site_admin":false},"repo":{"id":41433960,"name":"limpet","full_name":"debrief/limpet","owner":{"login":"debrief","id":7665856,"avatar_url":"https://avatars.githubusercontent.com/u/7665856?v=3","gravatar_id":"","url":"https://api.github.com/users/debrief","html_url":"https://github.com/debrief","followers_url":"https://api.github.com/users/debrief/followers","following_url":"https://api.github.com/users/debrief/following{/other_user}","gists_url":"https://api.github.com/users/debrief/gists{/gist_id}","starred_url":"https://api.github.com/users/debrief/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debrief/subscriptions","organizations_url":"https://api.github.com/users/debrief/orgs","repos_url":"https://api.github.com/users/debrief/repos","events_url":"https://api.github.com/users/debrief/events{/privacy}","received_events_url":"https://api.github.com/users/debrief/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/debrief/limpet","description":"Placeholder for materials related to the Limpet project","fork":false,"url":"https://api.github.com/repos/debrief/limpet","forks_url":"https://api.github.com/repos/debrief/limpet/forks","keys_url":"https://api.github.com/repos/debrief/limpet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/debrief/limpet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/debrief/limpet/teams","hooks_url":"https://api.github.com/repos/debrief/limpet/hooks","issue_events_url":"https://api.github.com/repos/debrief/limpet/issues/events{/number}","events_url":"https://api.github.com/repos/debrief/limpet/events","assignees_url":"https://api.github.com/repos/debrief/limpet/assignees{/user}","branches_url":"https://api.github.com/repos/debrief/limpet/branches{/branch}","tags_url":"https://api.github.com/repos/debrief/limpet/tags","blobs_url":"https://api.github.com/repos/debrief/limpet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/debrief/limpet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/debrief/limpet/git/refs{/sha}","trees_url":"https://api.github.com/repos/debrief/limpet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/debrief/limpet/statuses/{sha}","languages_url":"https://api.github.com/repos/debrief/limpet/languages","stargazers_url":"https://api.github.com/repos/debrief/limpet/stargazers","contributors_url":"https://api.github.com/repos/debrief/limpet/contributors","subscribers_url":"https://api.github.com/repos/debrief/limpet/subscribers","subscription_url":"https://api.github.com/repos/debrief/limpet/subscription","commits_url":"https://api.github.com/repos/debrief/limpet/commits{/sha}","git_commits_url":"https://api.github.com/repos/debrief/limpet/git/commits{/sha}","comments_url":"https://api.github.com/repos/debrief/limpet/comments{/number}","issue_comment_url":"https://api.github.com/repos/debrief/limpet/issues/comments{/number}","contents_url":"https://api.github.com/repos/debrief/limpet/contents/{+path}","compare_url":"https://api.github.com/repos/debrief/limpet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/debrief/limpet/merges","archive_url":"https://api.github.com/repos/debrief/limpet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/debrief/limpet/downloads","issues_url":"https://api.github.com/repos/debrief/limpet/issues{/number}","pulls_url":"https://api.github.com/repos/debrief/limpet/pulls{/number}","milestones_url":"https://api.github.com/repos/debrief/limpet/milestones{/number}","notifications_url":"https://api.github.com/repos/debrief/limpet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/debrief/limpet/labels{/name}","releases_url":"https://api.github.com/repos/debrief/limpet/releases{/id}","created_at":"2015-08-26T15:35:05Z","updated_at":"2015-12-20T12:08:45Z","pushed_at":"2015-12-22T23:34:38Z","git_url":"git://github.com/debrief/limpet.git","ssh_url":"git@github.com:debrief/limpet.git","clone_url":"https://github.com/debrief/limpet.git","svn_url":"https://github.com/debrief/limpet","homepage":"http://limpet.info","size":23494,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":38,"forks":2,"open_issues":38,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/debrief/limpet/pulls/200"},"html":{"href":"https://github.com/debrief/limpet/pull/200"},"issue":{"href":"https://api.github.com/repos/debrief/limpet/issues/200"},"comments":{"href":"https://api.github.com/repos/debrief/limpet/issues/200/comments"},"review_comments":{"href":"https://api.github.com/repos/debrief/limpet/pulls/200/comments"},"review_comment":{"href":"https://api.github.com/repos/debrief/limpet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/debrief/limpet/pulls/200/commits"},"statuses":{"href":"https://api.github.com/repos/debrief/limpet/statuses/4eeb6e97aebb7b140cb2a3e1f133c8b38b20b03b"}}}}