void (@NotNull Module module, @NotNull ModifiableRootModel modifiableRootModel) { myRootModel = modifiableRootModel; myDummyJpsModule = JpsElementFactory.getInstance() .createModule(module.getName(), JpsJavaModuleType.INSTANCE, JpsElementFactory.getInstance().createDummyElement()); myDummyJpsRootModel = new JpsRootModel(module, myDummyJpsModule); for (JpsSourceFolder folder : myJpsSourceFolders) { Disposer.dispose(folder); } myJpsSourceFolders.clear(); for (ContentEntry eachEntry : modifiableRootModel.getContentEntries()) { for (SourceFolder eachFolder : eachEntry.getSourceFolders()) { //noinspection unchecked final JpsModuleSourceRoot jpsModuleSourceRoot = JpsElementFactory.getInstance().createModuleSourceRoot( eachFolder.getUrl(), (JpsModuleSourceRootType<JpsElement>)eachFolder.getRootType(), eachFolder.getJpsElement().getProperties().getBulkModificationSupport().createCopy()); addJspSourceFolder(jpsModuleSourceRoot, eachFolder.getUrl()); } } }