use of com.intellij.openapi.compiler.options.ExcludesConfiguration in project intellij-community by JetBrains.
the class CompilerReferencesFindUsagesTest method doTestRunnableFindUsagesWithExcludesConfiguration.
private void doTestRunnableFindUsagesWithExcludesConfiguration(@NotNull Consumer<ExcludesConfiguration> excludesConfigurationPatcher, int expectedUsagesCount, String... testFiles) {
final ExcludesConfiguration excludesConfiguration = CompilerConfiguration.getInstance(myProject).getExcludedEntriesConfiguration();
try {
configureByFiles(getName(), Arrays.stream(testFiles).map(f -> getName() + "/" + f).toArray(String[]::new));
excludesConfigurationPatcher.consume(excludesConfiguration);
assertSize(expectedUsagesCount, FunctionalExpressionSearch.search(myJavaFacade.findClass(CommonClassNames.JAVA_LANG_RUNNABLE)).findAll());
myCompilerTester.rebuild();
assertSize(expectedUsagesCount, FunctionalExpressionSearch.search(myJavaFacade.findClass(CommonClassNames.JAVA_LANG_RUNNABLE)).findAll());
} finally {
excludesConfiguration.removeAllExcludeEntryDescriptions();
}
}
Aggregations