GitHub PullRequestReviewCommentEvent at 2014-08-18 18:03:25
Repository: brackets
Actor: redmunds
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/adobe/brackets/pulls/comments/16370673","id":16370673,"diff_hunk":"@@ -435,25 +436,77 @@ define(function (require, exports, module) {\n     }\n \n     /**\n-     * Opens the given file, makes it the current document, AND adds it to the pane view list\n+     * Opens the given file, makes it the current file, AND adds it to the pane view list\n      * only if the file does not have a custom viewer.\n      * @param {!{fullPath:string, index:number=, forceRedraw:boolean, paneId:string=}} commandData  File to open; optional position in\n      *   pane view list list (defaults to last); optional flag to force pane view list redraw\n-     * @return {$.Promise} a jQuery promise that will be resolved with a document object\n+     * @return {$.Promise} a jQuery promise that will be resolved with a file object\n      */\n     function handleAddToPaneViewList(commandData) {\n-        return handleFileOpen(commandData).done(function (doc) {\n-            // TODO: This will not work for images since they do not\n-            //          have document objects... \n-            // addView is synchronous\n-            // When opening a file with a custom viewer, we get a null doc.\n-            // So check it before we add it to the pane view list.\n+        return handleFileOpen(commandData).done(function (file) {\n+            \n             var paneId = (commandData && commandData.paneId) || MainViewManager.ACTIVE_PANE;\n-            MainViewManager.addView(paneId, doc.file, commandData.index, commandData.forceRedraw);\n+            MainViewManager.addView(paneId, file, commandData.index, commandData.forceRedraw);\n         });\n     }\n+  /**\n+     * Opens the given file, makes it the current file, AND adds it to the pane view list\n+     * only if the file does not have a custom viewer.\n+     * @param {!{fullPath:string, index:number=, forceRedraw:boolean, paneId:string=}} commandData  File to open; optional position in\n+     *   pane view list list (defaults to last); optional flag to force pane view list redraw\n+     * @return {$.Promise} a jQuery promise that will be resolved with a Document object\n+     */\n+    function handleDocumentOpen(commandData) {\n+        var result = new $.Deferred();\n+        handleFileOpen(commandData)\n+            .done(function (file) {\n+                // if we succeeded with an open file\n+                //  then we need to resolve that to a document.\n+                //  getOpenDocumentForPath will return null if there isn't a \n+                //  supporting document for that file (e.g. an image)\n+                var doc = DocumentManager.getOpenDocumentForPath(file.fullPath);\n+                result.resolve(doc);\n+            })\n+            .fail(function () {\n+                result.reject();\n+            });\n+\n+        return result.promise();\n+        \n+    }\n+\n \n     /**\n+     * @deprecated\n+     * Opens the given file, makes it the current document, AND adds it to the pane view list\n+     * @param {!{fullPath:string, index:number=, forceRedraw:boolean, paneId:string=}} commandData  File to open; optional position in\n+     *   pane view list list (defaults to last); optional flag to force pane view list redraw\n+     * @return {$.Promise} a jQuery promise that will be resolved with a document object\n+     */\n+    function handleFileAddToWorkingSet(commandData) {\n+        // This is a legacy deprecated command that \n+        //  will use the new command and resolve with a document\n+        //  as the legacy command would only support.\n+        DeprecationWarning.deprecationWarning(\"Commands.FILE_ADD_TO_WORKING_SET has been deprecatied.  Use Commands.CMD_ADD_TO_PANE_AND_OPEN instead.\");","path":"src/document/DocumentCommandHandlers.js","position":96,"original_position":96,"commit_id":"02dc9ddab00ee665719ba1071dec6cfbd0ec280a","original_commit_id":"02dc9ddab00ee665719ba1071dec6cfbd0ec280a","user":{"login":"redmunds","id":1197144,"avatar_url":"https://avatars.githubusercontent.com/u/1197144?v=2","gravatar_id":"bc4dc1a1f8e56e53cb59dbe14bfe9649","url":"https://api.github.com/users/redmunds","html_url":"https://github.com/redmunds","followers_url":"https://api.github.com/users/redmunds/followers","following_url":"https://api.github.com/users/redmunds/following{/other_user}","gists_url":"https://api.github.com/users/redmunds/gists{/gist_id}","starred_url":"https://api.github.com/users/redmunds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redmunds/subscriptions","organizations_url":"https://api.github.com/users/redmunds/orgs","repos_url":"https://api.github.com/users/redmunds/repos","events_url":"https://api.github.com/users/redmunds/events{/privacy}","received_events_url":"https://api.github.com/users/redmunds/received_events","type":"User","site_admin":false},"body":"typo: deprecatied","created_at":"2014-08-18T18:03:25Z","updated_at":"2014-08-18T18:03:25Z","html_url":"https://github.com/adobe/brackets/pull/8753#discussion_r16370673","pull_request_url":"https://api.github.com/repos/adobe/brackets/pulls/8753","_links":{"self":{"href":"https://api.github.com/repos/adobe/brackets/pulls/comments/16370673"},"html":{"href":"https://github.com/adobe/brackets/pull/8753#discussion_r16370673"},"pull_request":{"href":"https://api.github.com/repos/adobe/brackets/pulls/8753"}}},"pull_request":{"url":"https://api.github.com/repos/adobe/brackets/pulls/8753","id":19737983,"html_url":"https://github.com/adobe/brackets/pull/8753","diff_url":"https://github.com/adobe/brackets/pull/8753.diff","patch_url":"https://github.com/adobe/brackets/pull/8753.patch","issue_url":"https://api.github.com/repos/adobe/brackets/issues/8753","number":8753,"state":"open","locked":false,"title":"[MERGEABLE] Splitview With Image and Custom View Support","user":{"login":"JeffryBooher","id":1514099,"avatar_url":"https://avatars.githubusercontent.com/u/1514099?v=2","gravatar_id":"1234d6dd9b1c7675425047fc58d4f04c","url":"https://api.github.com/users/JeffryBooher","html_url":"https://github.com/JeffryBooher","followers_url":"https://api.github.com/users/JeffryBooher/followers","following_url":"https://api.github.com/users/JeffryBooher/following{/other_user}","gists_url":"https://api.github.com/users/JeffryBooher/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffryBooher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffryBooher/subscriptions","organizations_url":"https://api.github.com/users/JeffryBooher/orgs","repos_url":"https://api.github.com/users/JeffryBooher/repos","events_url":"https://api.github.com/users/JeffryBooher/events{/privacy}","received_events_url":"https://api.github.com/users/JeffryBooher/received_events","type":"User","site_admin":false},"body":"https://trello.com/c/A22yIIal/1282-splitview-add-view-provider-mechanics\r\n\r\nThis PR is can be merged into jeff/splitview-1x2 when ready\r\n* Adds a MainViewFactory for view factories\r\n* Adds support for images\r\n* Adds support for extensible custom views\r\n* Adds support for 1-off views\r\n* Adds a view state cache singleton\r\n","created_at":"2014-08-13T17:06:54Z","updated_at":"2014-08-18T18:03:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a3652c340527db5466b592ce98ef35f2cded4d88","assignee":{"login":"redmunds","id":1197144,"avatar_url":"https://avatars.githubusercontent.com/u/1197144?v=2","gravatar_id":"bc4dc1a1f8e56e53cb59dbe14bfe9649","url":"https://api.github.com/users/redmunds","html_url":"https://github.com/redmunds","followers_url":"https://api.github.com/users/redmunds/followers","following_url":"https://api.github.com/users/redmunds/following{/other_user}","gists_url":"https://api.github.com/users/redmunds/gists{/gist_id}","starred_url":"https://api.github.com/users/redmunds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redmunds/subscriptions","organizations_url":"https://api.github.com/users/redmunds/orgs","repos_url":"https://api.github.com/users/redmunds/repos","events_url":"https://api.github.com/users/redmunds/events{/privacy}","received_events_url":"https://api.github.com/users/redmunds/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/adobe/brackets/pulls/8753/commits","review_comments_url":"https://api.github.com/repos/adobe/brackets/pulls/8753/comments","review_comment_url":"https://api.github.com/repos/adobe/brackets/pulls/comments/{number}","comments_url":"https://api.github.com/repos/adobe/brackets/issues/8753/comments","statuses_url":"https://api.github.com/repos/adobe/brackets/statuses/02dc9ddab00ee665719ba1071dec6cfbd0ec280a","head":{"label":"adobe:jeff/splitview-factory","ref":"jeff/splitview-factory","sha":"02dc9ddab00ee665719ba1071dec6cfbd0ec280a","user":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=2","gravatar_id":"cc40327f6f93a7b75207a152962d8dbe","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"repo":{"id":2935735,"name":"brackets","full_name":"adobe/brackets","owner":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=2","gravatar_id":"cc40327f6f93a7b75207a152962d8dbe","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adobe/brackets","description":"An open source code editor for the web, written in JavaScript, HTML and CSS.","fork":false,"url":"https://api.github.com/repos/adobe/brackets","forks_url":"https://api.github.com/repos/adobe/brackets/forks","keys_url":"https://api.github.com/repos/adobe/brackets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adobe/brackets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adobe/brackets/teams","hooks_url":"https://api.github.com/repos/adobe/brackets/hooks","issue_events_url":"https://api.github.com/repos/adobe/brackets/issues/events{/number}","events_url":"https://api.github.com/repos/adobe/brackets/events","assignees_url":"https://api.github.com/repos/adobe/brackets/assignees{/user}","branches_url":"https://api.github.com/repos/adobe/brackets/branches{/branch}","tags_url":"https://api.github.com/repos/adobe/brackets/tags","blobs_url":"https://api.github.com/repos/adobe/brackets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adobe/brackets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adobe/brackets/git/refs{/sha}","trees_url":"https://api.github.com/repos/adobe/brackets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adobe/brackets/statuses/{sha}","languages_url":"https://api.github.com/repos/adobe/brackets/languages","stargazers_url":"https://api.github.com/repos/adobe/brackets/stargazers","contributors_url":"https://api.github.com/repos/adobe/brackets/contributors","subscribers_url":"https://api.github.com/repos/adobe/brackets/subscribers","subscription_url":"https://api.github.com/repos/adobe/brackets/subscription","commits_url":"https://api.github.com/repos/adobe/brackets/commits{/sha}","git_commits_url":"https://api.github.com/repos/adobe/brackets/git/commits{/sha}","comments_url":"https://api.github.com/repos/adobe/brackets/comments{/number}","issue_comment_url":"https://api.github.com/repos/adobe/brackets/issues/comments/{number}","contents_url":"https://api.github.com/repos/adobe/brackets/contents/{+path}","compare_url":"https://api.github.com/repos/adobe/brackets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adobe/brackets/merges","archive_url":"https://api.github.com/repos/adobe/brackets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adobe/brackets/downloads","issues_url":"https://api.github.com/repos/adobe/brackets/issues{/number}","pulls_url":"https://api.github.com/repos/adobe/brackets/pulls{/number}","milestones_url":"https://api.github.com/repos/adobe/brackets/milestones{/number}","notifications_url":"https://api.github.com/repos/adobe/brackets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adobe/brackets/labels{/name}","releases_url":"https://api.github.com/repos/adobe/brackets/releases{/id}","created_at":"2011-12-07T21:14:40Z","updated_at":"2014-08-18T17:15:18Z","pushed_at":"2014-08-18T17:49:26Z","git_url":"git://github.com/adobe/brackets.git","ssh_url":"git@github.com:adobe/brackets.git","clone_url":"https://github.com/adobe/brackets.git","svn_url":"https://github.com/adobe/brackets","homepage":"http://brackets.io","size":322945,"stargazers_count":17357,"watchers_count":17357,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3589,"mirror_url":null,"open_issues_count":942,"forks":3589,"open_issues":942,"watchers":17357,"default_branch":"master"}},"base":{"label":"adobe:jeff/splitview-1x2","ref":"jeff/splitview-1x2","sha":"afff7cd725deaf612cea0e0f43c3e40bd7ef1d4e","user":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=2","gravatar_id":"cc40327f6f93a7b75207a152962d8dbe","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"repo":{"id":2935735,"name":"brackets","full_name":"adobe/brackets","owner":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=2","gravatar_id":"cc40327f6f93a7b75207a152962d8dbe","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adobe/brackets","description":"An open source code editor for the web, written in JavaScript, HTML and CSS.","fork":false,"url":"https://api.github.com/repos/adobe/brackets","forks_url":"https://api.github.com/repos/adobe/brackets/forks","keys_url":"https://api.github.com/repos/adobe/brackets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adobe/brackets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adobe/brackets/teams","hooks_url":"https://api.github.com/repos/adobe/brackets/hooks","issue_events_url":"https://api.github.com/repos/adobe/brackets/issues/events{/number}","events_url":"https://api.github.com/repos/adobe/brackets/events","assignees_url":"https://api.github.com/repos/adobe/brackets/assignees{/user}","branches_url":"https://api.github.com/repos/adobe/brackets/branches{/branch}","tags_url":"https://api.github.com/repos/adobe/brackets/tags","blobs_url":"https://api.github.com/repos/adobe/brackets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adobe/brackets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adobe/brackets/git/refs{/sha}","trees_url":"https://api.github.com/repos/adobe/brackets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adobe/brackets/statuses/{sha}","languages_url":"https://api.github.com/repos/adobe/brackets/languages","stargazers_url":"https://api.github.com/repos/adobe/brackets/stargazers","contributors_url":"https://api.github.com/repos/adobe/brackets/contributors","subscribers_url":"https://api.github.com/repos/adobe/brackets/subscribers","subscription_url":"https://api.github.com/repos/adobe/brackets/subscription","commits_url":"https://api.github.com/repos/adobe/brackets/commits{/sha}","git_commits_url":"https://api.github.com/repos/adobe/brackets/git/commits{/sha}","comments_url":"https://api.github.com/repos/adobe/brackets/comments{/number}","issue_comment_url":"https://api.github.com/repos/adobe/brackets/issues/comments/{number}","contents_url":"https://api.github.com/repos/adobe/brackets/contents/{+path}","compare_url":"https://api.github.com/repos/adobe/brackets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adobe/brackets/merges","archive_url":"https://api.github.com/repos/adobe/brackets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adobe/brackets/downloads","issues_url":"https://api.github.com/repos/adobe/brackets/issues{/number}","pulls_url":"https://api.github.com/repos/adobe/brackets/pulls{/number}","milestones_url":"https://api.github.com/repos/adobe/brackets/milestones{/number}","notifications_url":"https://api.github.com/repos/adobe/brackets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adobe/brackets/labels{/name}","releases_url":"https://api.github.com/repos/adobe/brackets/releases{/id}","created_at":"2011-12-07T21:14:40Z","updated_at":"2014-08-18T17:15:18Z","pushed_at":"2014-08-18T17:49:26Z","git_url":"git://github.com/adobe/brackets.git","ssh_url":"git@github.com:adobe/brackets.git","clone_url":"https://github.com/adobe/brackets.git","svn_url":"https://github.com/adobe/brackets","homepage":"http://brackets.io","size":322945,"stargazers_count":17357,"watchers_count":17357,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3589,"mirror_url":null,"open_issues_count":942,"forks":3589,"open_issues":942,"watchers":17357,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adobe/brackets/pulls/8753"},"html":{"href":"https://github.com/adobe/brackets/pull/8753"},"issue":{"href":"https://api.github.com/repos/adobe/brackets/issues/8753"},"comments":{"href":"https://api.github.com/repos/adobe/brackets/issues/8753/comments"},"review_comments":{"href":"https://api.github.com/repos/adobe/brackets/pulls/8753/comments"},"review_comment":{"href":"https://api.github.com/repos/adobe/brackets/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/adobe/brackets/pulls/8753/commits"},"statuses":{"href":"https://api.github.com/repos/adobe/brackets/statuses/02dc9ddab00ee665719ba1071dec6cfbd0ec280a"}}}}