if(!stateLocation.isFile()) { Location parentConfiguration = null; if ((parentConfiguration = LocationManager.getConfigurationLocation().getParentLocation()) != null) { stateLocation = new File(parentConfiguration.getURL().getFile(), FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME + '/' + LocationManager.STATE_FILE); } }
	protected StateManager createStateManager() {		readHeaders();		checkLocationAndReinitialize();		File stateLocation = LocationManager.getConfigurationFile(LocationManager.STATE_FILE);		stateManager = new StateManager(stateLocation, timeStamp);		stateManager.setInstaller(new EclipseBundleInstaller());		StateImpl systemState = stateManager.getSystemState();		if (systemState != null)			return stateManager;		systemState = stateManager.createSystemState();		BundleData[] installedBundles = getInstalledBundles();		if (installedBundles == null)			return stateManager;		StateObjectFactory factory = stateManager.getFactory();		for (int i = 0; i < installedBundles.length; i++) {			BundleData toAdd = (BundleData) installedBundles[i];			try {				Dictionary manifest = toAdd.getManifest();				BundleDescription newDescription = factory.createBundleDescription(manifest, 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();		return stateManager;	}