{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/RTVS/pulls/comments/63252079","id":63252079,"diff_hunk":"@@ -0,0 +1,41 @@\n+﻿// Copyright (c) Microsoft Corporation. All rights reserved.\n+// Licensed under the MIT License. See LICENSE in the project root for license information.\n+\n+using System.Windows;\n+using Microsoft.Common.Core;\n+using Microsoft.VisualStudio.R.Package.Shell;\n+using Microsoft.VisualStudio.Shell;\n+using Microsoft.VisualStudio.Shell.Interop;\n+\n+namespace Microsoft.VisualStudio.R.Package.DataInspect {\n+    internal sealed class VariableSearchTask : VsSearchTask {\n+        private readonly IVsSearchCallback _callback;\n+        private readonly TreeGrid _grid;\n+\n+        public VariableSearchTask(TreeGrid grid, uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)\n+            : base(dwCookie, pSearchQuery, pSearchCallback) {\n+            _grid = grid;\n+            _callback = pSearchCallback;\n+        }\n+\n+        protected override void OnStartSearch() {\n+            base.OnStartSearch();\n+\n+            var searchString = SearchQuery.SearchString;\n+            if (_grid?.Items != null && !string.IsNullOrWhiteSpace(searchString)) {\n+                foreach(var itemControl in _grid.Items) {\n+                    var tn = itemControl as ObservableTreeNode;\n+                    var model = tn?.Model?.Content as VariableViewModel;\n+                    if(model != null) {\n+                        if (model.Name.StartsWithOrdinal(searchString)) {","path":"src/Package/Impl/DataInspect/VariableSearchTask.cs","position":30,"original_position":30,"commit_id":"a96cd21ba46028a3ef8f193d9562f1bfd21f7327","original_commit_id":"a96cd21ba46028a3ef8f193d9562f1bfd21f7327","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":"It only finds one at the moment. No multiple selection\r\n\r\n---\r\nIn reply to: [63251922](https://github.com/Microsoft/RTVS/pull/1765#discussion_r63251922) [](ancestors = 63251922)","created_at":"2016-05-13T21:15:01Z","updated_at":"2016-05-13T21:15:01Z","html_url":"https://github.com/Microsoft/RTVS/pull/1765#discussion_r63252079","pull_request_url":"https://api.github.com/repos/Microsoft/RTVS/pulls/1765","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/comments/63252079"},"html":{"href":"https://github.com/Microsoft/RTVS/pull/1765#discussion_r63252079"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/1765"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/RTVS/pulls/1765","id":69909199,"html_url":"https://github.com/Microsoft/RTVS/pull/1765","diff_url":"https://github.com/Microsoft/RTVS/pull/1765.diff","patch_url":"https://github.com/Microsoft/RTVS/pull/1765.patch","issue_url":"https://api.github.com/repos/Microsoft/RTVS/issues/1765","number":1765,"state":"open","locked":false,"title":"#1738 #1689 #1759 #1751 #1717 #1690 #1739","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":"Amounts to the following changes to the formatter and smart indent:\r\n- respect single-line scopes like ```if(TRUE) {1}``` and keep them single line\r\n- indent in function arguments at a regular level rather than align by first argument\r\n- keep user indentation in arguments even if not aligned\r\n- improve smart indent in argument lists with function definitions in them\r\n- respect line breaks and user indent in multi-line arguments such as positioning of )\r\n- update tests and add new ones\r\n\r\nFix VariableExplorer test instability by switching to JSON serializer\r\nUpdate test baselines reflecting changes","created_at":"2016-05-12T21:22:31Z","updated_at":"2016-05-13T21:15:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f7fc411879123309cc0f7f9841d28bd156e3caa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/RTVS/pulls/1765/commits","review_comments_url":"https://api.github.com/repos/Microsoft/RTVS/pulls/1765/comments","review_comment_url":"https://api.github.com/repos/Microsoft/RTVS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/RTVS/issues/1765/comments","statuses_url":"https://api.github.com/repos/Microsoft/RTVS/statuses/a96cd21ba46028a3ef8f193d9562f1bfd21f7327","head":{"label":"MikhailArkhipov:master","ref":"master","sha":"a96cd21ba46028a3ef8f193d9562f1bfd21f7327","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},"repo":{"id":53517720,"name":"RTVS","full_name":"MikhailArkhipov/RTVS","owner":{"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},"private":false,"html_url":"https://github.com/MikhailArkhipov/RTVS","description":"R Tools for Visual Studio.","fork":true,"url":"https://api.github.com/repos/MikhailArkhipov/RTVS","forks_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/forks","keys_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/teams","hooks_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/hooks","issue_events_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/issues/events{/number}","events_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/events","assignees_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/assignees{/user}","branches_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/branches{/branch}","tags_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/tags","blobs_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/git/refs{/sha}","trees_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/statuses/{sha}","languages_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/languages","stargazers_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/stargazers","contributors_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/contributors","subscribers_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/subscribers","subscription_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/subscription","commits_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/commits{/sha}","git_commits_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/git/commits{/sha}","comments_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/comments{/number}","issue_comment_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/issues/comments{/number}","contents_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/contents/{+path}","compare_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/merges","archive_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/downloads","issues_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/issues{/number}","pulls_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/pulls{/number}","milestones_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/milestones{/number}","notifications_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/labels{/name}","releases_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/releases{/id}","deployments_url":"https://api.github.com/repos/MikhailArkhipov/RTVS/deployments","created_at":"2016-03-09T17:33:45Z","updated_at":"2016-03-09T17:33:51Z","pushed_at":"2016-05-13T21:09:02Z","git_url":"git://github.com/MikhailArkhipov/RTVS.git","ssh_url":"git@github.com:MikhailArkhipov/RTVS.git","clone_url":"https://github.com/MikhailArkhipov/RTVS.git","svn_url":"https://github.com/MikhailArkhipov/RTVS","homepage":null,"size":46357,"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":"e85d8bd35c8626bc531aaa30aed388a7da02a010","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-05-11T06:20:21Z","pushed_at":"2016-05-13T21:09:03Z","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":46585,"stargazers_count":150,"watchers_count":150,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":270,"forks":31,"open_issues":270,"watchers":150,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/1765"},"html":{"href":"https://github.com/Microsoft/RTVS/pull/1765"},"issue":{"href":"https://api.github.com/repos/Microsoft/RTVS/issues/1765"},"comments":{"href":"https://api.github.com/repos/Microsoft/RTVS/issues/1765/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/1765/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/RTVS/pulls/1765/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/RTVS/statuses/a96cd21ba46028a3ef8f193d9562f1bfd21f7327"}}}}