void (@NotNull ModuleRootModel model, @NotNull String storageId) { Module module = model.getModule(); String oldStorageType = ClassPathStorageUtil.getStorageType(module); if (oldStorageType.equals(storageId)) { return; } ClasspathStorageProvider provider = getProvider(oldStorageType); if (provider != null) { provider.detach(module); } ClasspathStorageProvider newProvider = getProvider(storageId); module.setOption(JpsProjectLoader.CLASSPATH_ATTRIBUTE, newProvider == null ? null : storageId); module.setOption(JpsProjectLoader.CLASSPATH_DIR_ATTRIBUTE, newProvider == null ? null : newProvider.getContentRoot(model)); if (newProvider != null) { newProvider.attach(model); } }