(IDEA 7.0.5 #7962) So I was pondering around the Project (Alt+1) dialog. I found this Project Scopes feature which I never used before. At least not in this place. I certainly use scopes in search, inspections etc.
Since I found no information about using scopes in Project dialog I will summarize what I understand and hopefully somebody else would comment on it how they use it.
So we have the predefined Scopes: Production, Tests and Problems.
- Production - shows all non test files
- Tests - shows all files defined in Test Sources
- Problems - I guess supposed to show files which have errors. In my case it shows only package where the error class is, but the class itself is not visible there. Probably bug?
You can define custom scopes from Project dialog but you can't redefine predefined scopes nor use them as template.
Then I had this idea if it would be possible to use scopes for filtering files for deployment. For example from seam-gen I have 3 files: persistence-dev.xml, persistence-test.xml and persistence-prod.xml. So I was thinking it would be nice to create 3 scopes - dev, test, prod, which would would contain all files as in Production scope but each with different persistence.xml. Then when I want to do build IDEA would magically create 3 different builds for me with correct files inside.
Unfortunately the idea behind scopes does not go that far. IDEA will create build only for two predefined scopes - production and test. Maybe in the future?