use of jack.rm.files.Scanner in project rom-manager by Jakz.
the class MyGameSetFeatures method pluginStateChanged.
public void pluginStateChanged() {
Settings settings = Main.setManager.settings(set);
if (settings.getSearchPlugin() != null) {
List<SearchPredicate<Game>> predicates = new ArrayList<>();
SearchPlugin plugin = settings.plugins.getEnabledPlugin(PluginRealType.SEARCH);
SearchParser<Game> parser = plugin.getSearcher();
Set<SearchPredicatesPlugin> predicatePlugins = settings.plugins.getEnabledPlugins(PluginRealType.SEARCH_PREDICATES);
predicatePlugins.stream().flatMap(p -> p.getPredicates().stream()).forEach(predicates::add);
searcher = new Searcher<>(parser, predicates);
} else
searcher = new DummySearcher<>();
if (settings.getRenamer() != null)
renamer = settings.getRenamer();
else
renamer = GameRenamer.DUMMY;
if (settings.getFolderOrganizer() != null)
mover = settings.getFolderOrganizer();
else
mover = GameMover.DUMMY;
scanner = new Scanner(set);
}
Aggregations