use of org.opengrok.indexer.index.IndexChangedListener in project OpenGrok by OpenGrok.
the class JarAnalyzerTest method setUpClass.
@BeforeAll
public static void setUpClass() throws Exception {
env = RuntimeEnvironment.getInstance();
originalProjectsEnabled = env.isProjectsEnabled();
env.setProjectsEnabled(false);
repository = new TestRepository();
repository.createEmpty();
repository.addAdhocFile(TESTPLUGINS_JAR, AuthorizationFrameworkReloadTest.class.getResourceAsStream("/authorization/plugins/" + TESTPLUGINS_JAR), null);
env.setSourceRoot(repository.getSourceRoot());
env.setDataRoot(repository.getDataRoot());
RepositoryFactory.initializeIgnoredNames(env);
env.setHistoryEnabled(false);
IndexChangedListener progress = new DefaultIndexChangedListener();
Indexer.getInstance().prepareIndexer(env, true, true, false, null, null);
env.setDefaultProjectsFromNames(new TreeSet<>(Collections.singletonList("/c")));
Indexer.getInstance().doIndexerExecution(true, null, progress);
configFile = File.createTempFile("configuration", ".xml");
env.writeConfiguration(configFile);
env.readConfiguration(new File(configFile.getAbsolutePath()));
}
Aggregations