{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/buildship/pulls/comments/223308483","pull_request_review_id":162400490,"id":223308483,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzMwODQ4Mw==","diff_hunk":"@@ -70,9 +70,59 @@\n      * inputs/outputs/cancellation/etc.\n      *\n      * <p>\n-     * The following sections show examples how can this API be used.\n-     * TODO (donat) explain common use-cases: task execution, test execution, and model loading\n-     * TODO (donat) document how to load custom models (here or link to external documentation)\n+     * The following sections show examples how this API can be used.\n+     *\n+     * <p>\n+     * <i>1. Load models</i>\n+     *\n+     * <p>\n+     * <pre><code>\n+     *     IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(\"project-name\");\n+     *     GradleBuild build = GradleCore.getWorkspace().getBuild(project).get();\n+     *\n+     *     GradleProject model = build.withConnection(connection -> connection.getModel(GradleProject.class), monitor);\n+     *     System.out.println(model.getBuildDirectory());\n+     * </code></pre>\n+     * Clients can load the <a href=\"https://docs.gradle.org/current/javadoc/org/gradle/tooling/ProjectConnection.html#model-java.lang.Class-\"> default models</a>.\n+     * Also, custom model loading possible with using {@code --init-script}:\n+     * <pre><code>\n+     *     connection.model(CustomModel.class).withArguments(\"--init-script\", \"/path/to/init-script/with/model\").get();\n+     * </code></pre>\n+     * An example project with custom model loading is available at <a href=\"https://github.com/donat/buildship-custom-tapi-model\">https://github.com/donat/buildship-custom-tapi-model</a>.","path":"org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/GradleBuild.java","position":25,"original_position":25,"commit_id":"78825452bd90d4a8df545d5b839c425760e9b491","original_commit_id":"9a2cd73c6bb8851271af0b952c7049913b044bff","user":{"login":"oehme","id":1191797,"node_id":"MDQ6VXNlcjExOTE3OTc=","avatar_url":"https://avatars2.githubusercontent.com/u/1191797?v=4","gravatar_id":"","url":"https://api.github.com/users/oehme","html_url":"https://github.com/oehme","followers_url":"https://api.github.com/users/oehme/followers","following_url":"https://api.github.com/users/oehme/following{/other_user}","gists_url":"https://api.github.com/users/oehme/gists{/gist_id}","starred_url":"https://api.github.com/users/oehme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oehme/subscriptions","organizations_url":"https://api.github.com/users/oehme/orgs","repos_url":"https://api.github.com/users/oehme/repos","events_url":"https://api.github.com/users/oehme/events{/privacy}","received_events_url":"https://api.github.com/users/oehme/received_events","type":"User","site_admin":false},"body":">  I can extract the interface from the model project and have only that included in the plugin.\r\n\r\nYou mean the implementation? Yes, I think that's important, because clients should not know about the implementation. ","created_at":"2018-10-08T09:58:23Z","updated_at":"2018-10-08T09:58:23Z","html_url":"https://github.com/eclipse/buildship/pull/782#discussion_r223308483","pull_request_url":"https://api.github.com/repos/eclipse/buildship/pulls/782","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/eclipse/buildship/pulls/comments/223308483"},"html":{"href":"https://github.com/eclipse/buildship/pull/782#discussion_r223308483"},"pull_request":{"href":"https://api.github.com/repos/eclipse/buildship/pulls/782"}},"in_reply_to_id":223304380},"pull_request":{"url":"https://api.github.com/repos/eclipse/buildship/pulls/782","id":221048997,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMDQ4OTk3","html_url":"https://github.com/eclipse/buildship/pull/782","diff_url":"https://github.com/eclipse/buildship/pull/782.diff","patch_url":"https://github.com/eclipse/buildship/pull/782.patch","issue_url":"https://api.github.com/repos/eclipse/buildship/issues/782","number":782,"state":"open","locked":false,"title":"Describe `withConnection` use-cases in javadoc","user":{"login":"donat","id":419883,"node_id":"MDQ6VXNlcjQxOTg4Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/419883?v=4","gravatar_id":"","url":"https://api.github.com/users/donat","html_url":"https://github.com/donat","followers_url":"https://api.github.com/users/donat/followers","following_url":"https://api.github.com/users/donat/following{/other_user}","gists_url":"https://api.github.com/users/donat/gists{/gist_id}","starred_url":"https://api.github.com/users/donat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donat/subscriptions","organizations_url":"https://api.github.com/users/donat/orgs","repos_url":"https://api.github.com/users/donat/repos","events_url":"https://api.github.com/users/donat/events{/privacy}","received_events_url":"https://api.github.com/users/donat/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-08T09:18:46Z","updated_at":"2018-10-08T09:58:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64cd7a33de77790537bc4441d97fd06fdfc4311f","assignee":{"login":"donat","id":419883,"node_id":"MDQ6VXNlcjQxOTg4Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/419883?v=4","gravatar_id":"","url":"https://api.github.com/users/donat","html_url":"https://github.com/donat","followers_url":"https://api.github.com/users/donat/followers","following_url":"https://api.github.com/users/donat/following{/other_user}","gists_url":"https://api.github.com/users/donat/gists{/gist_id}","starred_url":"https://api.github.com/users/donat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donat/subscriptions","organizations_url":"https://api.github.com/users/donat/orgs","repos_url":"https://api.github.com/users/donat/repos","events_url":"https://api.github.com/users/donat/events{/privacy}","received_events_url":"https://api.github.com/users/donat/received_events","type":"User","site_admin":false},"assignees":[{"login":"donat","id":419883,"node_id":"MDQ6VXNlcjQxOTg4Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/419883?v=4","gravatar_id":"","url":"https://api.github.com/users/donat","html_url":"https://github.com/donat","followers_url":"https://api.github.com/users/donat/followers","following_url":"https://api.github.com/users/donat/following{/other_user}","gists_url":"https://api.github.com/users/donat/gists{/gist_id}","starred_url":"https://api.github.com/users/donat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donat/subscriptions","organizations_url":"https://api.github.com/users/donat/orgs","repos_url":"https://api.github.com/users/donat/repos","events_url":"https://api.github.com/users/donat/events{/privacy}","received_events_url":"https://api.github.com/users/donat/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/buildship/pulls/782/commits","review_comments_url":"https://api.github.com/repos/eclipse/buildship/pulls/782/comments","review_comment_url":"https://api.github.com/repos/eclipse/buildship/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/buildship/issues/782/comments","statuses_url":"https://api.github.com/repos/eclipse/buildship/statuses/78825452bd90d4a8df545d5b839c425760e9b491","head":{"label":"eclipse:donat/public-tapi/usecases-rebase2","ref":"donat/public-tapi/usecases-rebase2","sha":"78825452bd90d4a8df545d5b839c425760e9b491","user":{"login":"eclipse","id":56974,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2OTc0","avatar_url":"https://avatars1.githubusercontent.com/u/56974?v=4","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":32398083,"node_id":"MDEwOlJlcG9zaXRvcnkzMjM5ODA4Mw==","name":"buildship","full_name":"eclipse/buildship","private":false,"owner":{"login":"eclipse","id":56974,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2OTc0","avatar_url":"https://avatars1.githubusercontent.com/u/56974?v=4","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/eclipse/buildship","description":"The Eclipse Plug-ins for Gradle project.","fork":false,"url":"https://api.github.com/repos/eclipse/buildship","forks_url":"https://api.github.com/repos/eclipse/buildship/forks","keys_url":"https://api.github.com/repos/eclipse/buildship/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/buildship/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/buildship/teams","hooks_url":"https://api.github.com/repos/eclipse/buildship/hooks","issue_events_url":"https://api.github.com/repos/eclipse/buildship/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/buildship/events","assignees_url":"https://api.github.com/repos/eclipse/buildship/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/buildship/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/buildship/tags","blobs_url":"https://api.github.com/repos/eclipse/buildship/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/buildship/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/buildship/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/buildship/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/buildship/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/buildship/languages","stargazers_url":"https://api.github.com/repos/eclipse/buildship/stargazers","contributors_url":"https://api.github.com/repos/eclipse/buildship/contributors","subscribers_url":"https://api.github.com/repos/eclipse/buildship/subscribers","subscription_url":"https://api.github.com/repos/eclipse/buildship/subscription","commits_url":"https://api.github.com/repos/eclipse/buildship/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/buildship/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/buildship/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/buildship/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/buildship/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/buildship/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/buildship/merges","archive_url":"https://api.github.com/repos/eclipse/buildship/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/buildship/downloads","issues_url":"https://api.github.com/repos/eclipse/buildship/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/buildship/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/buildship/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/buildship/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/buildship/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/buildship/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/buildship/deployments","created_at":"2015-03-17T14:25:15Z","updated_at":"2018-10-08T08:19:27Z","pushed_at":"2018-10-08T09:57:46Z","git_url":"git://github.com/eclipse/buildship.git","ssh_url":"git@github.com:eclipse/buildship.git","clone_url":"https://github.com/eclipse/buildship.git","svn_url":"https://github.com/eclipse/buildship","homepage":"","size":69089,"stargazers_count":395,"watchers_count":395,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":108,"mirror_url":null,"archived":false,"open_issues_count":172,"license":null,"forks":108,"open_issues":172,"watchers":395,"default_branch":"master"}},"base":{"label":"eclipse:release-3.0","ref":"release-3.0","sha":"fc3afdac3e196cf815bac5aa3e504a56c0583447","user":{"login":"eclipse","id":56974,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2OTc0","avatar_url":"https://avatars1.githubusercontent.com/u/56974?v=4","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":32398083,"node_id":"MDEwOlJlcG9zaXRvcnkzMjM5ODA4Mw==","name":"buildship","full_name":"eclipse/buildship","private":false,"owner":{"login":"eclipse","id":56974,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2OTc0","avatar_url":"https://avatars1.githubusercontent.com/u/56974?v=4","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/eclipse/buildship","description":"The Eclipse Plug-ins for Gradle project.","fork":false,"url":"https://api.github.com/repos/eclipse/buildship","forks_url":"https://api.github.com/repos/eclipse/buildship/forks","keys_url":"https://api.github.com/repos/eclipse/buildship/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/buildship/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/buildship/teams","hooks_url":"https://api.github.com/repos/eclipse/buildship/hooks","issue_events_url":"https://api.github.com/repos/eclipse/buildship/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/buildship/events","assignees_url":"https://api.github.com/repos/eclipse/buildship/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/buildship/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/buildship/tags","blobs_url":"https://api.github.com/repos/eclipse/buildship/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/buildship/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/buildship/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/buildship/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/buildship/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/buildship/languages","stargazers_url":"https://api.github.com/repos/eclipse/buildship/stargazers","contributors_url":"https://api.github.com/repos/eclipse/buildship/contributors","subscribers_url":"https://api.github.com/repos/eclipse/buildship/subscribers","subscription_url":"https://api.github.com/repos/eclipse/buildship/subscription","commits_url":"https://api.github.com/repos/eclipse/buildship/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/buildship/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/buildship/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/buildship/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/buildship/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/buildship/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/buildship/merges","archive_url":"https://api.github.com/repos/eclipse/buildship/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/buildship/downloads","issues_url":"https://api.github.com/repos/eclipse/buildship/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/buildship/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/buildship/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/buildship/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/buildship/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/buildship/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/buildship/deployments","created_at":"2015-03-17T14:25:15Z","updated_at":"2018-10-08T08:19:27Z","pushed_at":"2018-10-08T09:57:46Z","git_url":"git://github.com/eclipse/buildship.git","ssh_url":"git@github.com:eclipse/buildship.git","clone_url":"https://github.com/eclipse/buildship.git","svn_url":"https://github.com/eclipse/buildship","homepage":"","size":69089,"stargazers_count":395,"watchers_count":395,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":108,"mirror_url":null,"archived":false,"open_issues_count":172,"license":null,"forks":108,"open_issues":172,"watchers":395,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/buildship/pulls/782"},"html":{"href":"https://github.com/eclipse/buildship/pull/782"},"issue":{"href":"https://api.github.com/repos/eclipse/buildship/issues/782"},"comments":{"href":"https://api.github.com/repos/eclipse/buildship/issues/782/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/buildship/pulls/782/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/buildship/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/buildship/pulls/782/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/buildship/statuses/78825452bd90d4a8df545d5b839c425760e9b491"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"oehme"}}