void () { TestFileStructure fileTree = new TestFileStructure(getModule(), myWorkingDirectory); PsiFile java1 = fileTree.addTestFile("Test1.java", "empty content"); PsiFile php1 = fileTree.addTestFile("Pair1.phpMask", "empty content"); PsiFile js1 = fileTree.addTestFile("Pair1.jsMask", "empty content"); PsiDirectory outer = fileTree.createDirectoryAndMakeItCurrent("toFormat"); PsiFile java2 = fileTree.addTestFile("Test2.java", "empty content"); PsiFile php2 = fileTree.addTestFile("Pair2.phpMask", "empty content"); PsiFile js2 = fileTree.addTestFile("Pair2.jsMask", "empty content"); PsiDirectory inner = fileTree.createDirectoryAndMakeItCurrent("toFormat"); PsiFile java3 = fileTree.addTestFile("Test3.java", "empty content"); PsiFile php3 = fileTree.addTestFile("Pair3.phpMask", "empty content"); PsiFile js3 = fileTree.addTestFile("Pair3.jsMask", "empty content"); reformatDirectory(myWorkingDirectory, "*.jsMask", directoryScope(outer, true)); assertWasFormatted(js2, js3); assertWasNotFormatted(java1, php1, js1, java2, php2, java3, php3); reformatDirectory(myWorkingDirectory, "*.jsMask", directoryScope(myWorkingDirectory, false)); assertWasFormatted(js1); assertWasNotFormatted(js2, js3, java1, php1, java2, php2, java3, php3); reformatDirectory(myWorkingDirectory, "*.java, *.phpMask", directoryScope(myWorkingDirectory, false).union(directoryScope(inner, false))); assertWasFormatted(java1, php1, java3, php3); assertWasNotFormatted(java2, php2, js1, js2, js3); }