{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/RTVS/pulls/comments/73192451","id":73192451,"diff_hunk":"@@ -28,68 +30,67 @@ internal static class CsvAppFileIO {\n         private const string _variableNameReplacement = \"variable\";\n         private static int _busy;\n \n-        public static async Task OpenDataCsvApp(IREvaluationResultInfo result) {\n-            await VsAppShell.Current.SwitchToMainThreadAsync();\n+        public static async Task OpenDataCsvApp(IREvaluationResultInfo result, IApplicationShell appShell, IFileSystem fileSystem, IProcessServices processServices) {\n+            await appShell.SwitchToMainThreadAsync();\n \n             if (Interlocked.Exchange(ref _busy, 1) > 0) {\n                 return;\n             }\n \n-            var workflowProvider = VsAppShell.Current.ExportProvider.GetExportedValue<IRInteractiveWorkflowProvider>();\n-            var workflow = workflowProvider.GetOrCreate();\n+            var workflow = appShell.ExportProvider.GetExportedValue<IRInteractiveWorkflowProvider>().GetOrCreate();\n             var session = workflow.RSession;\n \n             var folder = GetTempCsvFilesFolder();\n             if (!Directory.Exists(folder)) {\n                 Directory.CreateDirectory(folder);\n             }\n \n+            var pss = appShell.ExportProvider.GetExportedValue<IProjectSystemServices>();\n             var variableName = result.Name ?? _variableNameReplacement;\n-            var csvFileName = MakeCsvFileName(variableName);\n+            var csvFileName = MakeCsvFileName(appShell, pss, variableName);\n \n-            var pss = VsAppShell.Current.ExportProvider.GetExportedValue<IProjectSystemServices>();\n             var file = pss.GetUniqueFileName(folder, csvFileName, \"csv\", appendUnderscore: true);\n \n             string currentStatusText;\n-            var statusBar = VsAppShell.Current.GetGlobalService<IVsStatusbar>(typeof(SVsStatusbar));\n+            var statusBar = appShell.GetGlobalService<IVsStatusbar>(typeof(SVsStatusbar));","path":"src/Package/Impl/DataInspect/Office/CsvAppFileIO.cs","position":42,"original_position":42,"commit_id":"ebda9bb268965b4a2c80a1697199e1f1f5987595","original_commit_id":"ebda9bb268965b4a2c80a1697199e1f1f5987595","user":{"login":"MikhailArkhipov","id":12820357,"avatar_url":"https://avatars.githubusercontent.com/u/12820357?v=3","gravatar_id":"","url":"https://api.github.com/users/MikhailArkhipov","html_url":"https://github.com/MikhailArkhipov","followers_url":"https://api.github.com/users/MikhailArkhipov/followers","following_url":"https://api.github.com/users/MikhailArkhipov/following{/other_user}","gists_url":"https://api.github.com/users/MikhailArkhipov/gists{/gist_id}","starred_url":"https://api.github.com/users/MikhailArkhipov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikhailArkhipov/subscriptions","organizations_url":"https://api.github.com/users/MikhailArkhipov/orgs","repos_url":"https://api.github.com/users/MikhailArkhipov/repos","events_url":"https://api.github.com/users/MikhailArkhipov/events{/privacy}","received_events_url":"https://api.github.com/users/MikhailArkhipov/received_events","type":"User","site_admin":false},"body":"VS status bar","created_at":"2016-08-02T16:46:26Z","updated_at":"2016-08-02T16:46:26Z","html_url":"https://github.com/Microsoft/RTVS/pull/2136#discussion_r73192451","pull_request_url":"https://api.github.com/repos/Microsoft/RTVS/pulls/2136","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/comments/73192451"},"html":{"href":"https://github.com/Microsoft/RTVS/pull/2136#discussion_r73192451"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/2136"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/RTVS/pulls/2136","id":79653811,"html_url":"https://github.com/Microsoft/RTVS/pull/2136","diff_url":"https://github.com/Microsoft/RTVS/pull/2136.diff","patch_url":"https://github.com/Microsoft/RTVS/pull/2136.patch","issue_url":"https://api.github.com/repos/Microsoft/RTVS/issues/2136","number":2136,"state":"open","locked":false,"title":"#2121 CsvAppFileIO changed to use file system and process services","user":{"login":"karthiknadig","id":3840081,"avatar_url":"https://avatars.githubusercontent.com/u/3840081?v=3","gravatar_id":"","url":"https://api.github.com/users/karthiknadig","html_url":"https://github.com/karthiknadig","followers_url":"https://api.github.com/users/karthiknadig/followers","following_url":"https://api.github.com/users/karthiknadig/following{/other_user}","gists_url":"https://api.github.com/users/karthiknadig/gists{/gist_id}","starred_url":"https://api.github.com/users/karthiknadig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karthiknadig/subscriptions","organizations_url":"https://api.github.com/users/karthiknadig/orgs","repos_url":"https://api.github.com/users/karthiknadig/repos","events_url":"https://api.github.com/users/karthiknadig/events{/privacy}","received_events_url":"https://api.github.com/users/karthiknadig/received_events","type":"User","site_admin":false},"body":"CsvAppFileIO changed to use IApplicationShell, IFileSystem, and IProcessServices","created_at":"2016-08-01T23:26:42Z","updated_at":"2016-08-02T16:46:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0a9eabb6037ff6032be0baaf4a90bd315831e9a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/RTVS/pulls/2136/commits","review_comments_url":"https://api.github.com/repos/Microsoft/RTVS/pulls/2136/comments","review_comment_url":"https://api.github.com/repos/Microsoft/RTVS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/RTVS/issues/2136/comments","statuses_url":"https://api.github.com/repos/Microsoft/RTVS/statuses/ebda9bb268965b4a2c80a1697199e1f1f5987595","head":{"label":"karthiknadig:csvio","ref":"csvio","sha":"ebda9bb268965b4a2c80a1697199e1f1f5987595","user":{"login":"karthiknadig","id":3840081,"avatar_url":"https://avatars.githubusercontent.com/u/3840081?v=3","gravatar_id":"","url":"https://api.github.com/users/karthiknadig","html_url":"https://github.com/karthiknadig","followers_url":"https://api.github.com/users/karthiknadig/followers","following_url":"https://api.github.com/users/karthiknadig/following{/other_user}","gists_url":"https://api.github.com/users/karthiknadig/gists{/gist_id}","starred_url":"https://api.github.com/users/karthiknadig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karthiknadig/subscriptions","organizations_url":"https://api.github.com/users/karthiknadig/orgs","repos_url":"https://api.github.com/users/karthiknadig/repos","events_url":"https://api.github.com/users/karthiknadig/events{/privacy}","received_events_url":"https://api.github.com/users/karthiknadig/received_events","type":"User","site_admin":false},"repo":{"id":58878017,"name":"RTVS","full_name":"karthiknadig/RTVS","owner":{"login":"karthiknadig","id":3840081,"avatar_url":"https://avatars.githubusercontent.com/u/3840081?v=3","gravatar_id":"","url":"https://api.github.com/users/karthiknadig","html_url":"https://github.com/karthiknadig","followers_url":"https://api.github.com/users/karthiknadig/followers","following_url":"https://api.github.com/users/karthiknadig/following{/other_user}","gists_url":"https://api.github.com/users/karthiknadig/gists{/gist_id}","starred_url":"https://api.github.com/users/karthiknadig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karthiknadig/subscriptions","organizations_url":"https://api.github.com/users/karthiknadig/orgs","repos_url":"https://api.github.com/users/karthiknadig/repos","events_url":"https://api.github.com/users/karthiknadig/events{/privacy}","received_events_url":"https://api.github.com/users/karthiknadig/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/karthiknadig/RTVS","description":"R Tools for Visual Studio.","fork":true,"url":"https://api.github.com/repos/karthiknadig/RTVS","forks_url":"https://api.github.com/repos/karthiknadig/RTVS/forks","keys_url":"https://api.github.com/repos/karthiknadig/RTVS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karthiknadig/RTVS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karthiknadig/RTVS/teams","hooks_url":"https://api.github.com/repos/karthiknadig/RTVS/hooks","issue_events_url":"https://api.github.com/repos/karthiknadig/RTVS/issues/events{/number}","events_url":"https://api.github.com/repos/karthiknadig/RTVS/events","assignees_url":"https://api.github.com/repos/karthiknadig/RTVS/assignees{/user}","branches_url":"https://api.github.com/repos/karthiknadig/RTVS/branches{/branch}","tags_url":"https://api.github.com/repos/karthiknadig/RTVS/tags","blobs_url":"https://api.github.com/repos/karthiknadig/RTVS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karthiknadig/RTVS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karthiknadig/RTVS/git/refs{/sha}","trees_url":"https://api.github.com/repos/karthiknadig/RTVS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karthiknadig/RTVS/statuses/{sha}","languages_url":"https://api.github.com/repos/karthiknadig/RTVS/languages","stargazers_url":"https://api.github.com/repos/karthiknadig/RTVS/stargazers","contributors_url":"https://api.github.com/repos/karthiknadig/RTVS/contributors","subscribers_url":"https://api.github.com/repos/karthiknadig/RTVS/subscribers","subscription_url":"https://api.github.com/repos/karthiknadig/RTVS/subscription","commits_url":"https://api.github.com/repos/karthiknadig/RTVS/commits{/sha}","git_commits_url":"https://api.github.com/repos/karthiknadig/RTVS/git/commits{/sha}","comments_url":"https://api.github.com/repos/karthiknadig/RTVS/comments{/number}","issue_comment_url":"https://api.github.com/repos/karthiknadig/RTVS/issues/comments{/number}","contents_url":"https://api.github.com/repos/karthiknadig/RTVS/contents/{+path}","compare_url":"https://api.github.com/repos/karthiknadig/RTVS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karthiknadig/RTVS/merges","archive_url":"https://api.github.com/repos/karthiknadig/RTVS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karthiknadig/RTVS/downloads","issues_url":"https://api.github.com/repos/karthiknadig/RTVS/issues{/number}","pulls_url":"https://api.github.com/repos/karthiknadig/RTVS/pulls{/number}","milestones_url":"https://api.github.com/repos/karthiknadig/RTVS/milestones{/number}","notifications_url":"https://api.github.com/repos/karthiknadig/RTVS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karthiknadig/RTVS/labels{/name}","releases_url":"https://api.github.com/repos/karthiknadig/RTVS/releases{/id}","deployments_url":"https://api.github.com/repos/karthiknadig/RTVS/deployments","created_at":"2016-05-15T18:42:08Z","updated_at":"2016-05-15T18:42:16Z","pushed_at":"2016-08-01T23:25:23Z","git_url":"git://github.com/karthiknadig/RTVS.git","ssh_url":"git@github.com:karthiknadig/RTVS.git","clone_url":"https://github.com/karthiknadig/RTVS.git","svn_url":"https://github.com/karthiknadig/RTVS","homepage":null,"size":49243,"stargazers_count":0,"watchers_count":0,"language":"C#","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":"Microsoft:master","ref":"master","sha":"95e08070c97718ac770b94d1a7d996630f0d5338","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":38640473,"name":"RTVS","full_name":"Microsoft/RTVS","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/RTVS","description":"R Tools for Visual Studio.","fork":false,"url":"https://api.github.com/repos/Microsoft/RTVS","forks_url":"https://api.github.com/repos/Microsoft/RTVS/forks","keys_url":"https://api.github.com/repos/Microsoft/RTVS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/RTVS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/RTVS/teams","hooks_url":"https://api.github.com/repos/Microsoft/RTVS/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/RTVS/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/RTVS/events","assignees_url":"https://api.github.com/repos/Microsoft/RTVS/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/RTVS/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/RTVS/tags","blobs_url":"https://api.github.com/repos/Microsoft/RTVS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/RTVS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/RTVS/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/RTVS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/RTVS/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/RTVS/languages","stargazers_url":"https://api.github.com/repos/Microsoft/RTVS/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/RTVS/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/RTVS/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/RTVS/subscription","commits_url":"https://api.github.com/repos/Microsoft/RTVS/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/RTVS/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/RTVS/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/RTVS/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/RTVS/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/RTVS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/RTVS/merges","archive_url":"https://api.github.com/repos/Microsoft/RTVS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/RTVS/downloads","issues_url":"https://api.github.com/repos/Microsoft/RTVS/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/RTVS/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/RTVS/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/RTVS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/RTVS/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/RTVS/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/RTVS/deployments","created_at":"2015-07-06T19:14:09Z","updated_at":"2016-08-02T00:28:47Z","pushed_at":"2016-08-02T12:00:23Z","git_url":"git://github.com/Microsoft/RTVS.git","ssh_url":"git@github.com:Microsoft/RTVS.git","clone_url":"https://github.com/Microsoft/RTVS.git","svn_url":"https://github.com/Microsoft/RTVS","homepage":null,"size":49694,"stargazers_count":173,"watchers_count":173,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":292,"forks":51,"open_issues":292,"watchers":173,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/2136"},"html":{"href":"https://github.com/Microsoft/RTVS/pull/2136"},"issue":{"href":"https://api.github.com/repos/Microsoft/RTVS/issues/2136"},"comments":{"href":"https://api.github.com/repos/Microsoft/RTVS/issues/2136/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/2136/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/2136/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/RTVS/statuses/ebda9bb268965b4a2c80a1697199e1f1f5987595"}}}}
{"actor":{"display_login":"MikhailArkhipov"}}