void () { CompilerConfigurationImpl configuration = (CompilerConfigurationImpl)CompilerConfiguration.getInstance(myProject); String[] oldPatterns = configuration.getResourceFilePatterns(); try { configuration.removeResourceFilePatterns(); configuration.addResourceFilePattern("*.xml"); VirtualFile src = createFile("src/a.txt").getParent(); createFile("src/b.xml"); Module m = addModule("m", src); make(m); assertModulesUpToDate(); assertOutput(m, fs().file("b.xml")); configuration.addResourceFilePattern("*.txt"); forceFSRescan(); make(m); assertOutput(m, fs().file("a.txt").file("b.xml")); configuration.removeResourceFilePatterns(); configuration.addResourceFilePattern("*.txt"); forceFSRescan(); make(m); assertOutput(m, fs().file("a.txt")); } finally { configuration.removeResourceFilePatterns(); for (String pattern : oldPatterns) { configuration.addResourceFilePattern(pattern); } } }