{"action":"created","comment":{"url":"https://api.github.com/repos/gradle/gradle/pulls/comments/91306419","pull_request_review_id":11814206,"id":91306419,"diff_hunk":"@@ -0,0 +1,195 @@\n+/*\n+ * Copyright 2011 the original author or authors.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.gradle.plugins.ide.eclipse.model;\n+\n+import com.google.common.base.Objects;\n+import groovy.lang.Closure;\n+import groovy.lang.DelegatesTo;\n+import org.gradle.api.Action;\n+import org.gradle.api.InvalidUserDataException;\n+import org.gradle.api.internal.ClosureBackedAction;\n+\n+/**\n+ * The gradle DSL model of an Eclipse resource filter.\n+ *\n+ * Later this will be extended with additional helpers, but for now it just allows specifying a filter with a custom matcher\n+ * and configuring whether it is an include/exclude filter that applies to files, folders, or both.  This example excludes the 'node_modules' folder.\n+ *\n+ * <pre autoTested=''>\n+ * apply plugin: 'java'\n+ * apply plugin: 'eclipse'\n+ *\n+ * eclipse {\n+ *   project {\n+ *     // the following closure configures the ResourceFilter\n+ *     resourceFilter {\n+ *       appliesTo = 'FOLDERS'\n+ *       type = 'EXCLUDE_ALL'\n+ *       matcher {\n+ *         id = 'org.eclipse.ui.ide.multiFilter'\n+ *         arguments = '1.0-name-matches-false-false-node_modules'\n+ *       }\n+ *     }\n+ *   }\n+ * }\n+ * </pre>\n+ *\n+ * @since NEXT_VERSION\n+ */\n+public final class ResourceFilter {\n+    private ResourceFilterAppliesTo appliesTo = ResourceFilterAppliesTo.FILES_AND_FOLDERS;\n+    private ResourceFilterType type = ResourceFilterType.EXCLUDE_ALL;\n+    private boolean recursive = true;\n+    private ResourceFilterMatcher matcher;\n+\n+    // Needed for DSL configuration Actions\n+    public ResourceFilter() {\n+    }\n+\n+    public ResourceFilter(ResourceFilterAppliesTo appliesTo, ResourceFilterType type, boolean recursive, ResourceFilterMatcher matcher) {\n+        this();\n+        setAppliesTo(appliesTo);\n+        setType(type);\n+        setRecursive(recursive);\n+        setMatcher(matcher);\n+    }\n+\n+    /**\n+     * Indicates whether this ResourceFilter applies to files, folders, or both.  Default is FILES_AND_FOLDERS\n+     */\n+    public ResourceFilterAppliesTo getAppliesTo() {\n+        return appliesTo;\n+    }\n+    \n+    /**\n+     * Sets the ResourceFilterAppliesTo","path":"subprojects/ide/src/main/java/org/gradle/plugins/ide/eclipse/model/ResourceFilter.java","position":78,"original_position":78,"commit_id":"e8a227ad02d3857ba6a5924e4018358e8af3fc71","original_commit_id":"e8a227ad02d3857ba6a5924e4018358e8af3fc71","user":{"login":"kpage","id":499725,"avatar_url":"https://avatars.githubusercontent.com/u/499725?v=3","gravatar_id":"","url":"https://api.github.com/users/kpage","html_url":"https://github.com/kpage","followers_url":"https://api.github.com/users/kpage/followers","following_url":"https://api.github.com/users/kpage/following{/other_user}","gists_url":"https://api.github.com/users/kpage/gists{/gist_id}","starred_url":"https://api.github.com/users/kpage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpage/subscriptions","organizations_url":"https://api.github.com/users/kpage/orgs","repos_url":"https://api.github.com/users/kpage/repos","events_url":"https://api.github.com/users/kpage/events{/privacy}","received_events_url":"https://api.github.com/users/kpage/received_events","type":"User","site_admin":false},"body":"Ok, copied the getter documentation to the setter also","created_at":"2016-12-07T14:45:04Z","updated_at":"2016-12-07T14:45:04Z","html_url":"https://github.com/gradle/gradle/pull/846#discussion_r91306419","pull_request_url":"https://api.github.com/repos/gradle/gradle/pulls/846","_links":{"self":{"href":"https://api.github.com/repos/gradle/gradle/pulls/comments/91306419"},"html":{"href":"https://github.com/gradle/gradle/pull/846#discussion_r91306419"},"pull_request":{"href":"https://api.github.com/repos/gradle/gradle/pulls/846"}}},"pull_request":{"url":"https://api.github.com/repos/gradle/gradle/pulls/846","id":93430718,"html_url":"https://github.com/gradle/gradle/pull/846","diff_url":"https://github.com/gradle/gradle/pull/846.diff","patch_url":"https://github.com/gradle/gradle/pull/846.patch","issue_url":"https://api.github.com/repos/gradle/gradle/issues/846","number":846,"state":"open","locked":false,"title":"Eclipse resource filters","user":{"login":"kpage","id":499725,"avatar_url":"https://avatars.githubusercontent.com/u/499725?v=3","gravatar_id":"","url":"https://api.github.com/users/kpage","html_url":"https://github.com/kpage","followers_url":"https://api.github.com/users/kpage/followers","following_url":"https://api.github.com/users/kpage/following{/other_user}","gists_url":"https://api.github.com/users/kpage/gists{/gist_id}","starred_url":"https://api.github.com/users/kpage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpage/subscriptions","organizations_url":"https://api.github.com/users/kpage/orgs","repos_url":"https://api.github.com/users/kpage/repos","events_url":"https://api.github.com/users/kpage/events{/privacy}","received_events_url":"https://api.github.com/users/kpage/received_events","type":"User","site_admin":false},"body":"Hi @oehme ! This is a draft pull request for the first phase of the eclipse resource filters, adding the EclipseProject DSL support for filters with a basic custom matcher.  I am still cleaning up the documentation, but I wanted to open this so you could start to take a look.\r\n\r\nAny of the checked boxes below indicate that I took action:\r\n\r\n- [x] Reviewed the [Contribution Guidelines](https://github.com/gradle/gradle/blob/master/.github/CONTRIBUTING.md).\r\n- [x] Signed the [Gradle CLA](http://gradle.org/contributor-license-agreement/).\r\n- [x] Ensured that basic checks pass: `./gradlew quickCheck`\r\n\r\nFor all non-trivial changes that modify the behavior or public API:\r\n\r\n- [x] Before submitting a pull request, I started a discussion on the [Gradle eclipse Buildship plugin bug tracker](https://bugs.eclipse.org/bugs/show_bug.cgi?id=495799)\r\n- [x] Design document: https://github.com/gradle/gradle/tree/master/design-docs/features/ide-integration/richer-eclipse-model/resource-filters\r\n- [x] The pull request contains an appropriate level of unit and integration\r\ntest coverage to verify the behavior. Before submitting the pull request\r\nI ran a build on your local machine via the command\r\n`./gradlew quickCheck <impacted-subproject>:check`.\r\n- [x] The pull request updates the Gradle documentation like user guide,\r\nDSL reference and Javadocs where applicable.\r\n","created_at":"2016-11-12T06:56:21Z","updated_at":"2016-12-07T14:45:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9fc19223b8b6f8f5493942761d150f2c23a63afa","assignee":{"login":"oehme","id":1191797,"avatar_url":"https://avatars.githubusercontent.com/u/1191797?v=3","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},"assignees":[{"login":"oehme","id":1191797,"avatar_url":"https://avatars.githubusercontent.com/u/1191797?v=3","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}],"milestone":null,"commits_url":"https://api.github.com/repos/gradle/gradle/pulls/846/commits","review_comments_url":"https://api.github.com/repos/gradle/gradle/pulls/846/comments","review_comment_url":"https://api.github.com/repos/gradle/gradle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gradle/gradle/issues/846/comments","statuses_url":"https://api.github.com/repos/gradle/gradle/statuses/e8a227ad02d3857ba6a5924e4018358e8af3fc71","head":{"label":"kpage:eclipse-resource-filters","ref":"eclipse-resource-filters","sha":"e8a227ad02d3857ba6a5924e4018358e8af3fc71","user":{"login":"kpage","id":499725,"avatar_url":"https://avatars.githubusercontent.com/u/499725?v=3","gravatar_id":"","url":"https://api.github.com/users/kpage","html_url":"https://github.com/kpage","followers_url":"https://api.github.com/users/kpage/followers","following_url":"https://api.github.com/users/kpage/following{/other_user}","gists_url":"https://api.github.com/users/kpage/gists{/gist_id}","starred_url":"https://api.github.com/users/kpage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpage/subscriptions","organizations_url":"https://api.github.com/users/kpage/orgs","repos_url":"https://api.github.com/users/kpage/repos","events_url":"https://api.github.com/users/kpage/events{/privacy}","received_events_url":"https://api.github.com/users/kpage/received_events","type":"User","site_admin":false},"repo":{"id":67275925,"name":"gradle","full_name":"kpage/gradle","owner":{"login":"kpage","id":499725,"avatar_url":"https://avatars.githubusercontent.com/u/499725?v=3","gravatar_id":"","url":"https://api.github.com/users/kpage","html_url":"https://github.com/kpage","followers_url":"https://api.github.com/users/kpage/followers","following_url":"https://api.github.com/users/kpage/following{/other_user}","gists_url":"https://api.github.com/users/kpage/gists{/gist_id}","starred_url":"https://api.github.com/users/kpage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpage/subscriptions","organizations_url":"https://api.github.com/users/kpage/orgs","repos_url":"https://api.github.com/users/kpage/repos","events_url":"https://api.github.com/users/kpage/events{/privacy}","received_events_url":"https://api.github.com/users/kpage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kpage/gradle","description":"A powerful build system for the JVM","fork":true,"url":"https://api.github.com/repos/kpage/gradle","forks_url":"https://api.github.com/repos/kpage/gradle/forks","keys_url":"https://api.github.com/repos/kpage/gradle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kpage/gradle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kpage/gradle/teams","hooks_url":"https://api.github.com/repos/kpage/gradle/hooks","issue_events_url":"https://api.github.com/repos/kpage/gradle/issues/events{/number}","events_url":"https://api.github.com/repos/kpage/gradle/events","assignees_url":"https://api.github.com/repos/kpage/gradle/assignees{/user}","branches_url":"https://api.github.com/repos/kpage/gradle/branches{/branch}","tags_url":"https://api.github.com/repos/kpage/gradle/tags","blobs_url":"https://api.github.com/repos/kpage/gradle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kpage/gradle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kpage/gradle/git/refs{/sha}","trees_url":"https://api.github.com/repos/kpage/gradle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kpage/gradle/statuses/{sha}","languages_url":"https://api.github.com/repos/kpage/gradle/languages","stargazers_url":"https://api.github.com/repos/kpage/gradle/stargazers","contributors_url":"https://api.github.com/repos/kpage/gradle/contributors","subscribers_url":"https://api.github.com/repos/kpage/gradle/subscribers","subscription_url":"https://api.github.com/repos/kpage/gradle/subscription","commits_url":"https://api.github.com/repos/kpage/gradle/commits{/sha}","git_commits_url":"https://api.github.com/repos/kpage/gradle/git/commits{/sha}","comments_url":"https://api.github.com/repos/kpage/gradle/comments{/number}","issue_comment_url":"https://api.github.com/repos/kpage/gradle/issues/comments{/number}","contents_url":"https://api.github.com/repos/kpage/gradle/contents/{+path}","compare_url":"https://api.github.com/repos/kpage/gradle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kpage/gradle/merges","archive_url":"https://api.github.com/repos/kpage/gradle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kpage/gradle/downloads","issues_url":"https://api.github.com/repos/kpage/gradle/issues{/number}","pulls_url":"https://api.github.com/repos/kpage/gradle/pulls{/number}","milestones_url":"https://api.github.com/repos/kpage/gradle/milestones{/number}","notifications_url":"https://api.github.com/repos/kpage/gradle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kpage/gradle/labels{/name}","releases_url":"https://api.github.com/repos/kpage/gradle/releases{/id}","deployments_url":"https://api.github.com/repos/kpage/gradle/deployments","created_at":"2016-09-03T06:52:32Z","updated_at":"2016-09-03T06:53:23Z","pushed_at":"2016-12-04T11:12:41Z","git_url":"git://github.com/kpage/gradle.git","ssh_url":"git@github.com:kpage/gradle.git","clone_url":"https://github.com/kpage/gradle.git","svn_url":"https://github.com/kpage/gradle","homepage":"gradle.org","size":148548,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"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":"gradle:master","ref":"master","sha":"91b3d2e914d33b926fe5cf9001f537adc3b0f93b","user":{"login":"gradle","id":124156,"avatar_url":"https://avatars.githubusercontent.com/u/124156?v=3","gravatar_id":"","url":"https://api.github.com/users/gradle","html_url":"https://github.com/gradle","followers_url":"https://api.github.com/users/gradle/followers","following_url":"https://api.github.com/users/gradle/following{/other_user}","gists_url":"https://api.github.com/users/gradle/gists{/gist_id}","starred_url":"https://api.github.com/users/gradle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gradle/subscriptions","organizations_url":"https://api.github.com/users/gradle/orgs","repos_url":"https://api.github.com/users/gradle/repos","events_url":"https://api.github.com/users/gradle/events{/privacy}","received_events_url":"https://api.github.com/users/gradle/received_events","type":"Organization","site_admin":false},"repo":{"id":302322,"name":"gradle","full_name":"gradle/gradle","owner":{"login":"gradle","id":124156,"avatar_url":"https://avatars.githubusercontent.com/u/124156?v=3","gravatar_id":"","url":"https://api.github.com/users/gradle","html_url":"https://github.com/gradle","followers_url":"https://api.github.com/users/gradle/followers","following_url":"https://api.github.com/users/gradle/following{/other_user}","gists_url":"https://api.github.com/users/gradle/gists{/gist_id}","starred_url":"https://api.github.com/users/gradle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gradle/subscriptions","organizations_url":"https://api.github.com/users/gradle/orgs","repos_url":"https://api.github.com/users/gradle/repos","events_url":"https://api.github.com/users/gradle/events{/privacy}","received_events_url":"https://api.github.com/users/gradle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gradle/gradle","description":"A powerful build system for the JVM","fork":false,"url":"https://api.github.com/repos/gradle/gradle","forks_url":"https://api.github.com/repos/gradle/gradle/forks","keys_url":"https://api.github.com/repos/gradle/gradle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gradle/gradle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gradle/gradle/teams","hooks_url":"https://api.github.com/repos/gradle/gradle/hooks","issue_events_url":"https://api.github.com/repos/gradle/gradle/issues/events{/number}","events_url":"https://api.github.com/repos/gradle/gradle/events","assignees_url":"https://api.github.com/repos/gradle/gradle/assignees{/user}","branches_url":"https://api.github.com/repos/gradle/gradle/branches{/branch}","tags_url":"https://api.github.com/repos/gradle/gradle/tags","blobs_url":"https://api.github.com/repos/gradle/gradle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gradle/gradle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gradle/gradle/git/refs{/sha}","trees_url":"https://api.github.com/repos/gradle/gradle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gradle/gradle/statuses/{sha}","languages_url":"https://api.github.com/repos/gradle/gradle/languages","stargazers_url":"https://api.github.com/repos/gradle/gradle/stargazers","contributors_url":"https://api.github.com/repos/gradle/gradle/contributors","subscribers_url":"https://api.github.com/repos/gradle/gradle/subscribers","subscription_url":"https://api.github.com/repos/gradle/gradle/subscription","commits_url":"https://api.github.com/repos/gradle/gradle/commits{/sha}","git_commits_url":"https://api.github.com/repos/gradle/gradle/git/commits{/sha}","comments_url":"https://api.github.com/repos/gradle/gradle/comments{/number}","issue_comment_url":"https://api.github.com/repos/gradle/gradle/issues/comments{/number}","contents_url":"https://api.github.com/repos/gradle/gradle/contents/{+path}","compare_url":"https://api.github.com/repos/gradle/gradle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gradle/gradle/merges","archive_url":"https://api.github.com/repos/gradle/gradle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gradle/gradle/downloads","issues_url":"https://api.github.com/repos/gradle/gradle/issues{/number}","pulls_url":"https://api.github.com/repos/gradle/gradle/pulls{/number}","milestones_url":"https://api.github.com/repos/gradle/gradle/milestones{/number}","notifications_url":"https://api.github.com/repos/gradle/gradle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gradle/gradle/labels{/name}","releases_url":"https://api.github.com/repos/gradle/gradle/releases{/id}","deployments_url":"https://api.github.com/repos/gradle/gradle/deployments","created_at":"2009-09-09T18:27:19Z","updated_at":"2016-12-07T14:19:04Z","pushed_at":"2016-12-07T12:39:48Z","git_url":"git://github.com/gradle/gradle.git","ssh_url":"git@github.com:gradle/gradle.git","clone_url":"https://github.com/gradle/gradle.git","svn_url":"https://github.com/gradle/gradle","homepage":"gradle.org","size":212246,"stargazers_count":4217,"watchers_count":4217,"language":"Java","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":1586,"mirror_url":null,"open_issues_count":178,"forks":1586,"open_issues":178,"watchers":4217,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gradle/gradle/pulls/846"},"html":{"href":"https://github.com/gradle/gradle/pull/846"},"issue":{"href":"https://api.github.com/repos/gradle/gradle/issues/846"},"comments":{"href":"https://api.github.com/repos/gradle/gradle/issues/846/comments"},"review_comments":{"href":"https://api.github.com/repos/gradle/gradle/pulls/846/comments"},"review_comment":{"href":"https://api.github.com/repos/gradle/gradle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gradle/gradle/pulls/846/commits"},"statuses":{"href":"https://api.github.com/repos/gradle/gradle/statuses/e8a227ad02d3857ba6a5924e4018358e8af3fc71"}}}}
{"actor":{"display_login":"kpage"}}