Hide kapt (kotlin) generated classes in package view
I'm using dagger, Is it possible to hide classes generated by kapt from package view? they are a lot of them when generated and it makes the packages (and files) list long and ugly.
I looked at kapt source code apparently the output directory is hard-coded to build/generated/source/kapt (I though maybe moving them out of `source` directory somewhere, and adding that directory to source-set manually would solve the issue).
I can add the dagger generated classes to the list of `ignore files and folders` in `Settings > Editor > File Types` There is a `ignore files and folders` option, I can add name pattern `*_Factory.java` but then I'd have issues when compiling and running, as the DaggerBlablaCompoenent, generated by dagger imports all those ignored classes and now IDE can't find them.
Please sign in to leave a comment.
You can create a custom scope for the Project View which will exclude certain directories or files, then switch to this scope.
I can not find the option to create the scope. Should there be an Edit Scope option?
I had found this : https://intellij-support.jetbrains.com/hc/en-us/community/posts/206931665/comments/207093809
could I trouble you by asking for a screen shot of the where that Edit thingy is?
See https://www.jetbrains.com/help/idea/scopes.html
The scopes generate a Project view only, not a Packages view (i.e. with prod and test classes in the same folder). Is there a way to force the Packages view for scopes?
I too would really like the ability to hide generated files from the packages view, with or without using scopes.
You can vote for this feature: https://youtrack.jetbrains.com/issue/IDEA-172489.