use of org.eclipse.osgi.container.ModuleDatabase in project rt.equinox.framework by eclipse.
the class PlatformAdminImpl method createSystemState.
private State createSystemState() {
State state = factory.createState(true);
StateConverter converter = new StateConverter(state);
ModuleDatabase database = equinoxContainer.getStorage().getModuleDatabase();
database.readLock();
try {
ModuleContainer container = equinoxContainer.getStorage().getModuleContainer();
List<Module> modules = equinoxContainer.getStorage().getModuleContainer().getModules();
for (Module module : modules) {
ModuleRevision current = module.getCurrentRevision();
BundleDescription description = converter.createDescription(current);
state.addBundle(description);
}
state.setPlatformProperties(asDictionary(equinoxContainer.getConfiguration().getInitialConfig()));
synchronizer = new PlatformBundleListener(state, converter, database, container);
state.setResolverHookFactory(synchronizer);
bc.addBundleListener(synchronizer);
bc.addFrameworkListener(synchronizer);
state.resolve();
state.setTimeStamp(database.getRevisionsTimestamp());
} finally {
database.readUnlock();
}
return state;
}
Aggregations