{"action":"created","comment":{"url":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/comments/158641704","pull_request_review_id":85483650,"id":158641704,"diff_hunk":"@@ -22,113 +22,131 @@ const val KEYWORD_PRIORITY = 10.0\n private const val MACRO_PRIORITY = -0.1\n \n fun createLookupElement(element: RsElement, scopeName: String): LookupElement {\n-    val base = LookupElementBuilder.create(element, scopeName)\n-        .withIcon(if (element is RsFile) RsIcons.MODULE else element.getIcon(0))\n+    val base = element.getLookupElementBuilder(scopeName)\n+        .withInsertHandler({ context: InsertionContext, _ ->\n+            run {","path":"src/main/kotlin/org/rust/lang/core/completion/LookupElements.kt","position":8,"original_position":8,"commit_id":"77d16f586a8e613fbb8424ed36f63cb741acb44a","original_commit_id":"77d16f586a8e613fbb8424ed36f63cb741acb44a","user":{"login":"Undin","id":2539310,"avatar_url":"https://avatars0.githubusercontent.com/u/2539310?v=4","gravatar_id":"","url":"https://api.github.com/users/Undin","html_url":"https://github.com/Undin","followers_url":"https://api.github.com/users/Undin/followers","following_url":"https://api.github.com/users/Undin/following{/other_user}","gists_url":"https://api.github.com/users/Undin/gists{/gist_id}","starred_url":"https://api.github.com/users/Undin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Undin/subscriptions","organizations_url":"https://api.github.com/users/Undin/orgs","repos_url":"https://api.github.com/users/Undin/repos","events_url":"https://api.github.com/users/Undin/events{/privacy}","received_events_url":"https://api.github.com/users/Undin/received_events","type":"User","site_admin":false},"body":"And maybe extract this lambda as separate function?","created_at":"2017-12-25T12:30:59Z","updated_at":"2017-12-25T12:48:31Z","html_url":"https://github.com/intellij-rust/intellij-rust/pull/2142#discussion_r158641704","pull_request_url":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/2142","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/comments/158641704"},"html":{"href":"https://github.com/intellij-rust/intellij-rust/pull/2142#discussion_r158641704"},"pull_request":{"href":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/2142"}},"in_reply_to_id":158641658},"pull_request":{"url":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/2142","id":159897796,"html_url":"https://github.com/intellij-rust/intellij-rust/pull/2142","diff_url":"https://github.com/intellij-rust/intellij-rust/pull/2142.diff","patch_url":"https://github.com/intellij-rust/intellij-rust/pull/2142.patch","issue_url":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/2142","number":2142,"state":"open","locked":false,"title":"[COMP] Refactored LookupElements.kt","user":{"login":"mhaessig","id":7572879,"avatar_url":"https://avatars2.githubusercontent.com/u/7572879?v=4","gravatar_id":"","url":"https://api.github.com/users/mhaessig","html_url":"https://github.com/mhaessig","followers_url":"https://api.github.com/users/mhaessig/followers","following_url":"https://api.github.com/users/mhaessig/following{/other_user}","gists_url":"https://api.github.com/users/mhaessig/gists{/gist_id}","starred_url":"https://api.github.com/users/mhaessig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhaessig/subscriptions","organizations_url":"https://api.github.com/users/mhaessig/orgs","repos_url":"https://api.github.com/users/mhaessig/repos","events_url":"https://api.github.com/users/mhaessig/events{/privacy}","received_events_url":"https://api.github.com/users/mhaessig/received_events","type":"User","site_admin":false},"body":"Performed proposed refactoring from PR #1901 and thus finally resolving issue #1888.\r\n","created_at":"2017-12-22T16:29:26Z","updated_at":"2017-12-25T12:48:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f2d697da18875846eea82e5a90983351c688474","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/2142/commits","review_comments_url":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/2142/comments","review_comment_url":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/comments{/number}","comments_url":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/2142/comments","statuses_url":"https://api.github.com/repos/intellij-rust/intellij-rust/statuses/77d16f586a8e613fbb8424ed36f63cb741acb44a","head":{"label":"mhaessig:refactor-lookup-elements","ref":"refactor-lookup-elements","sha":"77d16f586a8e613fbb8424ed36f63cb741acb44a","user":{"login":"mhaessig","id":7572879,"avatar_url":"https://avatars2.githubusercontent.com/u/7572879?v=4","gravatar_id":"","url":"https://api.github.com/users/mhaessig","html_url":"https://github.com/mhaessig","followers_url":"https://api.github.com/users/mhaessig/followers","following_url":"https://api.github.com/users/mhaessig/following{/other_user}","gists_url":"https://api.github.com/users/mhaessig/gists{/gist_id}","starred_url":"https://api.github.com/users/mhaessig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhaessig/subscriptions","organizations_url":"https://api.github.com/users/mhaessig/orgs","repos_url":"https://api.github.com/users/mhaessig/repos","events_url":"https://api.github.com/users/mhaessig/events{/privacy}","received_events_url":"https://api.github.com/users/mhaessig/received_events","type":"User","site_admin":false},"repo":{"id":107182512,"name":"intellij-rust","full_name":"mhaessig/intellij-rust","owner":{"login":"mhaessig","id":7572879,"avatar_url":"https://avatars2.githubusercontent.com/u/7572879?v=4","gravatar_id":"","url":"https://api.github.com/users/mhaessig","html_url":"https://github.com/mhaessig","followers_url":"https://api.github.com/users/mhaessig/followers","following_url":"https://api.github.com/users/mhaessig/following{/other_user}","gists_url":"https://api.github.com/users/mhaessig/gists{/gist_id}","starred_url":"https://api.github.com/users/mhaessig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhaessig/subscriptions","organizations_url":"https://api.github.com/users/mhaessig/orgs","repos_url":"https://api.github.com/users/mhaessig/repos","events_url":"https://api.github.com/users/mhaessig/events{/privacy}","received_events_url":"https://api.github.com/users/mhaessig/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mhaessig/intellij-rust","description":"Rust plugin for the IntelliJ Platform: https://intellij-rust.github.io/","fork":true,"url":"https://api.github.com/repos/mhaessig/intellij-rust","forks_url":"https://api.github.com/repos/mhaessig/intellij-rust/forks","keys_url":"https://api.github.com/repos/mhaessig/intellij-rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mhaessig/intellij-rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mhaessig/intellij-rust/teams","hooks_url":"https://api.github.com/repos/mhaessig/intellij-rust/hooks","issue_events_url":"https://api.github.com/repos/mhaessig/intellij-rust/issues/events{/number}","events_url":"https://api.github.com/repos/mhaessig/intellij-rust/events","assignees_url":"https://api.github.com/repos/mhaessig/intellij-rust/assignees{/user}","branches_url":"https://api.github.com/repos/mhaessig/intellij-rust/branches{/branch}","tags_url":"https://api.github.com/repos/mhaessig/intellij-rust/tags","blobs_url":"https://api.github.com/repos/mhaessig/intellij-rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mhaessig/intellij-rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mhaessig/intellij-rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/mhaessig/intellij-rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mhaessig/intellij-rust/statuses/{sha}","languages_url":"https://api.github.com/repos/mhaessig/intellij-rust/languages","stargazers_url":"https://api.github.com/repos/mhaessig/intellij-rust/stargazers","contributors_url":"https://api.github.com/repos/mhaessig/intellij-rust/contributors","subscribers_url":"https://api.github.com/repos/mhaessig/intellij-rust/subscribers","subscription_url":"https://api.github.com/repos/mhaessig/intellij-rust/subscription","commits_url":"https://api.github.com/repos/mhaessig/intellij-rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/mhaessig/intellij-rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/mhaessig/intellij-rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/mhaessig/intellij-rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/mhaessig/intellij-rust/contents/{+path}","compare_url":"https://api.github.com/repos/mhaessig/intellij-rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mhaessig/intellij-rust/merges","archive_url":"https://api.github.com/repos/mhaessig/intellij-rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mhaessig/intellij-rust/downloads","issues_url":"https://api.github.com/repos/mhaessig/intellij-rust/issues{/number}","pulls_url":"https://api.github.com/repos/mhaessig/intellij-rust/pulls{/number}","milestones_url":"https://api.github.com/repos/mhaessig/intellij-rust/milestones{/number}","notifications_url":"https://api.github.com/repos/mhaessig/intellij-rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mhaessig/intellij-rust/labels{/name}","releases_url":"https://api.github.com/repos/mhaessig/intellij-rust/releases{/id}","deployments_url":"https://api.github.com/repos/mhaessig/intellij-rust/deployments","created_at":"2017-10-16T21:00:32Z","updated_at":"2017-10-16T21:00:36Z","pushed_at":"2017-12-22T16:27:46Z","git_url":"git://github.com/mhaessig/intellij-rust.git","ssh_url":"git@github.com:mhaessig/intellij-rust.git","clone_url":"https://github.com/mhaessig/intellij-rust.git","svn_url":"https://github.com/mhaessig/intellij-rust","homepage":"","size":18099,"stargazers_count":0,"watchers_count":0,"language":"Kotlin","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"intellij-rust:master","ref":"master","sha":"d975ba4ab32aa9e2cfa3d28f78d523c4d0a12d56","user":{"login":"intellij-rust","id":16057867,"avatar_url":"https://avatars0.githubusercontent.com/u/16057867?v=4","gravatar_id":"","url":"https://api.github.com/users/intellij-rust","html_url":"https://github.com/intellij-rust","followers_url":"https://api.github.com/users/intellij-rust/followers","following_url":"https://api.github.com/users/intellij-rust/following{/other_user}","gists_url":"https://api.github.com/users/intellij-rust/gists{/gist_id}","starred_url":"https://api.github.com/users/intellij-rust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intellij-rust/subscriptions","organizations_url":"https://api.github.com/users/intellij-rust/orgs","repos_url":"https://api.github.com/users/intellij-rust/repos","events_url":"https://api.github.com/users/intellij-rust/events{/privacy}","received_events_url":"https://api.github.com/users/intellij-rust/received_events","type":"Organization","site_admin":false},"repo":{"id":42619487,"name":"intellij-rust","full_name":"intellij-rust/intellij-rust","owner":{"login":"intellij-rust","id":16057867,"avatar_url":"https://avatars0.githubusercontent.com/u/16057867?v=4","gravatar_id":"","url":"https://api.github.com/users/intellij-rust","html_url":"https://github.com/intellij-rust","followers_url":"https://api.github.com/users/intellij-rust/followers","following_url":"https://api.github.com/users/intellij-rust/following{/other_user}","gists_url":"https://api.github.com/users/intellij-rust/gists{/gist_id}","starred_url":"https://api.github.com/users/intellij-rust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intellij-rust/subscriptions","organizations_url":"https://api.github.com/users/intellij-rust/orgs","repos_url":"https://api.github.com/users/intellij-rust/repos","events_url":"https://api.github.com/users/intellij-rust/events{/privacy}","received_events_url":"https://api.github.com/users/intellij-rust/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/intellij-rust/intellij-rust","description":"Rust plugin for the IntelliJ Platform: https://intellij-rust.github.io/","fork":false,"url":"https://api.github.com/repos/intellij-rust/intellij-rust","forks_url":"https://api.github.com/repos/intellij-rust/intellij-rust/forks","keys_url":"https://api.github.com/repos/intellij-rust/intellij-rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/intellij-rust/intellij-rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/intellij-rust/intellij-rust/teams","hooks_url":"https://api.github.com/repos/intellij-rust/intellij-rust/hooks","issue_events_url":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/events{/number}","events_url":"https://api.github.com/repos/intellij-rust/intellij-rust/events","assignees_url":"https://api.github.com/repos/intellij-rust/intellij-rust/assignees{/user}","branches_url":"https://api.github.com/repos/intellij-rust/intellij-rust/branches{/branch}","tags_url":"https://api.github.com/repos/intellij-rust/intellij-rust/tags","blobs_url":"https://api.github.com/repos/intellij-rust/intellij-rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/intellij-rust/intellij-rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/intellij-rust/intellij-rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/intellij-rust/intellij-rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/intellij-rust/intellij-rust/statuses/{sha}","languages_url":"https://api.github.com/repos/intellij-rust/intellij-rust/languages","stargazers_url":"https://api.github.com/repos/intellij-rust/intellij-rust/stargazers","contributors_url":"https://api.github.com/repos/intellij-rust/intellij-rust/contributors","subscribers_url":"https://api.github.com/repos/intellij-rust/intellij-rust/subscribers","subscription_url":"https://api.github.com/repos/intellij-rust/intellij-rust/subscription","commits_url":"https://api.github.com/repos/intellij-rust/intellij-rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/intellij-rust/intellij-rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/intellij-rust/intellij-rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/intellij-rust/intellij-rust/contents/{+path}","compare_url":"https://api.github.com/repos/intellij-rust/intellij-rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/intellij-rust/intellij-rust/merges","archive_url":"https://api.github.com/repos/intellij-rust/intellij-rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/intellij-rust/intellij-rust/downloads","issues_url":"https://api.github.com/repos/intellij-rust/intellij-rust/issues{/number}","pulls_url":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls{/number}","milestones_url":"https://api.github.com/repos/intellij-rust/intellij-rust/milestones{/number}","notifications_url":"https://api.github.com/repos/intellij-rust/intellij-rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/intellij-rust/intellij-rust/labels{/name}","releases_url":"https://api.github.com/repos/intellij-rust/intellij-rust/releases{/id}","deployments_url":"https://api.github.com/repos/intellij-rust/intellij-rust/deployments","created_at":"2015-09-16T23:44:57Z","updated_at":"2017-12-25T11:50:37Z","pushed_at":"2017-12-25T10:41:05Z","git_url":"git://github.com/intellij-rust/intellij-rust.git","ssh_url":"git@github.com:intellij-rust/intellij-rust.git","clone_url":"https://github.com/intellij-rust/intellij-rust.git","svn_url":"https://github.com/intellij-rust/intellij-rust","homepage":"","size":18133,"stargazers_count":1566,"watchers_count":1566,"language":"Kotlin","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":147,"mirror_url":null,"archived":false,"open_issues_count":232,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":147,"open_issues":232,"watchers":1566,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/2142"},"html":{"href":"https://github.com/intellij-rust/intellij-rust/pull/2142"},"issue":{"href":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/2142"},"comments":{"href":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/2142/comments"},"review_comments":{"href":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/2142/comments"},"review_comment":{"href":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/2142/commits"},"statuses":{"href":"https://api.github.com/repos/intellij-rust/intellij-rust/statuses/77d16f586a8e613fbb8424ed36f63cb741acb44a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Undin"}}