{"action":"created","issue":{"url":"https://api.github.com/repos/JetBrains/intellij-community/issues/789","repository_url":"https://api.github.com/repos/JetBrains/intellij-community","labels_url":"https://api.github.com/repos/JetBrains/intellij-community/issues/789/labels{/name}","comments_url":"https://api.github.com/repos/JetBrains/intellij-community/issues/789/comments","events_url":"https://api.github.com/repos/JetBrains/intellij-community/issues/789/events","html_url":"https://github.com/JetBrains/intellij-community/pull/789","id":321324700,"number":789,"title":"[PsiTreeUtil] adding findChildrenByFilter() method","user":{"login":"ArtsiomCh","id":14268320,"avatar_url":"https://avatars1.githubusercontent.com/u/14268320?v=4","gravatar_id":"","url":"https://api.github.com/users/ArtsiomCh","html_url":"https://github.com/ArtsiomCh","followers_url":"https://api.github.com/users/ArtsiomCh/followers","following_url":"https://api.github.com/users/ArtsiomCh/following{/other_user}","gists_url":"https://api.github.com/users/ArtsiomCh/gists{/gist_id}","starred_url":"https://api.github.com/users/ArtsiomCh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArtsiomCh/subscriptions","organizations_url":"https://api.github.com/users/ArtsiomCh/orgs","repos_url":"https://api.github.com/users/ArtsiomCh/repos","events_url":"https://api.github.com/users/ArtsiomCh/events{/privacy}","received_events_url":"https://api.github.com/users/ArtsiomCh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-08T19:54:32Z","updated_at":"2018-05-11T13:58:43Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/JetBrains/intellij-community/pulls/789","html_url":"https://github.com/JetBrains/intellij-community/pull/789","diff_url":"https://github.com/JetBrains/intellij-community/pull/789.diff","patch_url":"https://github.com/JetBrains/intellij-community/pull/789.patch"},"body":"That will give flexibility of filtering children not just by  Type (Class) but aslo by any conditions.\r\n\r\nAlso existing bottom most `findChildrenOfAnyType()` could be rewritten to something like that:\r\n```Java\r\n  @SafeVarargs\r\n  @NotNull\r\n  public static <T extends PsiElement> Collection<T> findChildrenOfAnyType(@Nullable PsiElement element,\r\n                                                                           boolean strict,\r\n                                                                           @NotNull Class<? extends T>... classes) {\r\n    return findChildrenByFilter(element, filteredElement -> \r\n         !(strict && filteredElement == element) && (instanceOf(filteredElement, classes)));\r\n  }\r\n```\r\nPS Same kind of methods could be done for `findChildOfType()` and others..."},"comment":{"url":"https://api.github.com/repos/JetBrains/intellij-community/issues/comments/388371840","html_url":"https://github.com/JetBrains/intellij-community/pull/789#issuecomment-388371840","issue_url":"https://api.github.com/repos/JetBrains/intellij-community/issues/789","id":388371840,"user":{"login":"donnerpeter","id":122009,"avatar_url":"https://avatars3.githubusercontent.com/u/122009?v=4","gravatar_id":"","url":"https://api.github.com/users/donnerpeter","html_url":"https://github.com/donnerpeter","followers_url":"https://api.github.com/users/donnerpeter/followers","following_url":"https://api.github.com/users/donnerpeter/following{/other_user}","gists_url":"https://api.github.com/users/donnerpeter/gists{/gist_id}","starred_url":"https://api.github.com/users/donnerpeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donnerpeter/subscriptions","organizations_url":"https://api.github.com/users/donnerpeter/orgs","repos_url":"https://api.github.com/users/donnerpeter/repos","events_url":"https://api.github.com/users/donnerpeter/events{/privacy}","received_events_url":"https://api.github.com/users/donnerpeter/received_events","type":"User","site_admin":false},"created_at":"2018-05-11T13:58:43Z","updated_at":"2018-05-11T13:58:43Z","author_association":"CONTRIBUTOR","body":"Why do you need this?"}}
{"actor":{"display_login":"donnerpeter"}}