StateStorage (@NotNull StateStorageManager storageManager) { ComponentManager componentManager = storageManager.getComponentManager(); assert componentManager != null; if (path.equals(StoragePathMacros.MODULE_FILE)) { return new ExternalModuleStorage((Module)componentManager, storageManager); } Project project = (Project)componentManager; if (inProjectStateSpec == null) { return new ExternalProjectStorage(path, project, storageManager); } else { return new ExternalProjectFilteringStorage(path, project, storageManager, inProjectStateSpec.name(), (DirectoryBasedStorage)storageManager.getStateStorage(inProjectStateSpec.storages()[0])); } }