{"action":"created","comment":{"url":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/comments/57288810","id":57288810,"diff_hunk":"@@ -44,5 +69,11 @@ abstract class CargoImportTestCaseBase : ExternalSystemImportingTestCase() {\n \n     private val module: Module get() =\n         ModuleManager.getInstance(myProject).modules.single()\n+\n+    private fun createTestSdk() {\n+        RustSdkType.INSTANCE.suggestHomePath()?.let {\n+            sdk = ProjectJdkImpl(\"RustTestSkd\", RustSdkType.INSTANCE, it, \"1.8.0\")","path":"src/test/kotlin/org/rust/cargo/project/CargoImportTestCaseBase.kt","position":60,"original_position":60,"commit_id":"89c1483062c0f655445aa7a5c42016be37f94551","original_commit_id":"89c1483062c0f655445aa7a5c42016be37f94551","user":{"login":"jajakobyly","id":3450050,"avatar_url":"https://avatars.githubusercontent.com/u/3450050?v=3","gravatar_id":"","url":"https://api.github.com/users/jajakobyly","html_url":"https://github.com/jajakobyly","followers_url":"https://api.github.com/users/jajakobyly/followers","following_url":"https://api.github.com/users/jajakobyly/following{/other_user}","gists_url":"https://api.github.com/users/jajakobyly/gists{/gist_id}","starred_url":"https://api.github.com/users/jajakobyly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jajakobyly/subscriptions","organizations_url":"https://api.github.com/users/jajakobyly/orgs","repos_url":"https://api.github.com/users/jajakobyly/repos","events_url":"https://api.github.com/users/jajakobyly/events{/privacy}","received_events_url":"https://api.github.com/users/jajakobyly/received_events","type":"User","site_admin":false},"body":"`Skd`?","created_at":"2016-03-24T09:00:52Z","updated_at":"2016-03-24T09:00:52Z","html_url":"https://github.com/intellij-rust/intellij-rust/pull/253#discussion_r57288810","pull_request_url":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/253","_links":{"self":{"href":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/comments/57288810"},"html":{"href":"https://github.com/intellij-rust/intellij-rust/pull/253#discussion_r57288810"},"pull_request":{"href":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/253"}}},"pull_request":{"url":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/253","id":60050800,"html_url":"https://github.com/intellij-rust/intellij-rust/pull/253","diff_url":"https://github.com/intellij-rust/intellij-rust/pull/253.diff","patch_url":"https://github.com/intellij-rust/intellij-rust/pull/253.patch","issue_url":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/253","number":253,"state":"open","locked":false,"title":"(CARGO): use sdk when importing project","user":{"login":"matklad","id":1711539,"avatar_url":"https://avatars.githubusercontent.com/u/1711539?v=3","gravatar_id":"","url":"https://api.github.com/users/matklad","html_url":"https://github.com/matklad","followers_url":"https://api.github.com/users/matklad/followers","following_url":"https://api.github.com/users/matklad/following{/other_user}","gists_url":"https://api.github.com/users/matklad/gists{/gist_id}","starred_url":"https://api.github.com/users/matklad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matklad/subscriptions","organizations_url":"https://api.github.com/users/matklad/orgs","repos_url":"https://api.github.com/users/matklad/repos","events_url":"https://api.github.com/users/matklad/events{/privacy}","received_events_url":"https://api.github.com/users/matklad/received_events","type":"User","site_admin":false},"body":"Finally it is working.\r\n\r\nThe aim of this change is twofold:\r\n\r\n* replace custom `cargoHomePath` field and [associated logic](https://github.com/intellij-rust/intellij-rust/blob/ffde5f02d182b267547f9b9c6eca8f68eb478814/src/main/kotlin/org/rust/cargo/project/settings/controls/builders/CargoProjectSettingsControlBuilderImpl.kt#L63-L66) with a build in `SdkComboBox`\r\n\r\n* automatically setup project SDK on import (inspired by [Java](https://upsource.jetbrains.com/idea-ce/file/idea-ce-5fec12b146609338bee5dee5208dd1a011a1fabd/java/java-impl/src/com/intellij/externalSystem/JavaProjectDataService.java?nav=1843:1865:focused&line=0)).\r\n\r\nSo, before this change the import dialog looked like this\r\n\r\n![before](https://cloud.githubusercontent.com/assets/1711539/13989775/e47dabb0-f122-11e5-882d-78d7f52d2097.png)\r\n\r\nand the user had to setup SDK manually even though she has already specified path to cargo.\r\n\r\nNow it looks like this: \r\n\r\n![after](https://cloud.githubusercontent.com/assets/1711539/13989814/0affdbe6-f123-11e5-8cf8-8af83357e538.png)\r\n\r\n@alexeykudinkin please review","created_at":"2016-02-20T15:19:32Z","updated_at":"2016-03-24T09:00:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e6d6d51a8c1385b1828ec27e159b23dc91e8130","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/253/commits","review_comments_url":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/253/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/253/comments","statuses_url":"https://api.github.com/repos/intellij-rust/intellij-rust/statuses/89c1483062c0f655445aa7a5c42016be37f94551","head":{"label":"intellij-rust:use-rust-sdk-for-import","ref":"use-rust-sdk-for-import","sha":"89c1483062c0f655445aa7a5c42016be37f94551","user":{"login":"intellij-rust","id":16057867,"avatar_url":"https://avatars.githubusercontent.com/u/16057867?v=3","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://avatars.githubusercontent.com/u/16057867?v=3","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 IDE built using the IntelliJ Platform","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":"2016-03-23T21:56:45Z","pushed_at":"2016-03-24T08:17:59Z","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":null,"size":6308,"stargazers_count":472,"watchers_count":472,"language":"Kotlin","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":26,"forks":31,"open_issues":26,"watchers":472,"default_branch":"master"}},"base":{"label":"intellij-rust:master","ref":"master","sha":"ffde5f02d182b267547f9b9c6eca8f68eb478814","user":{"login":"intellij-rust","id":16057867,"avatar_url":"https://avatars.githubusercontent.com/u/16057867?v=3","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://avatars.githubusercontent.com/u/16057867?v=3","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 IDE built using the IntelliJ Platform","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":"2016-03-23T21:56:45Z","pushed_at":"2016-03-24T08:17:59Z","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":null,"size":6308,"stargazers_count":472,"watchers_count":472,"language":"Kotlin","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":26,"forks":31,"open_issues":26,"watchers":472,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/253"},"html":{"href":"https://github.com/intellij-rust/intellij-rust/pull/253"},"issue":{"href":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/253"},"comments":{"href":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/253/comments"},"review_comments":{"href":"https://api.github.com/repos/intellij-rust/intellij-rust/pulls/253/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/253/commits"},"statuses":{"href":"https://api.github.com/repos/intellij-rust/intellij-rust/statuses/89c1483062c0f655445aa7a5c42016be37f94551"}}}}