stateManager.setInstaller(new EclipseBundleInstaller()); StateImpl systemState = null;
stateManager.setInstaller(new EclipseBundleInstaller(context)); State systemState = null;
	protected StateManager createStateManager() {		File[] stateFiles = findStateFiles();		File stateFile = stateFiles[0];		File lazyFile = stateFiles[1];		stateManager = new StateManager(stateFile, lazyFile, context, timeStamp);		stateManager.setInstaller(new EclipseBundleInstaller());		StateImpl systemState = null;		if (!invalidState) {			systemState = stateManager.readSystemState();			if (systemState != null)				return stateManager;		}		systemState = stateManager.createSystemState();		Bundle[] installedBundles = context.getBundles();		if (installedBundles == null)			return stateManager;		StateObjectFactory factory = stateManager.getFactory();		for (int i = 0; i < installedBundles.length; i++) {			Bundle toAdd = installedBundles[i];			try {				Dictionary toAddManifest = toAdd.getHeaders(""); //$NON-NLS-1$				// if this is a cached manifest need to get the real one				if (toAddManifest instanceof CachedManifest)					toAddManifest = ((CachedManifest) toAddManifest).getManifest();				BundleDescription newDescription = factory.createBundleDescription(systemState, toAddManifest, toAdd.getLocation(), toAdd.getBundleId());				systemState.addBundle(newDescription);			} catch (BundleException be) {				// just ignore bundle datas with invalid manifests			}		}		// we need the state resolved		systemState.setTimeStamp(timeStamp);		systemState.resolve();		invalidState = false;		return stateManager;	}