void update(@NotNull ExternalProjectInfo externalProjectInfo) {
    ProjectSystemId projectSystemId = externalProjectInfo.getProjectSystemId();
    String projectPath = externalProjectInfo.getExternalProjectPath();
    InternalExternalProjectInfo newInfo = new InternalExternalProjectInfo(
      projectSystemId,
      projectPath,
      externalProjectInfo.getExternalProjectStructure() == null ? null : externalProjectInfo.getExternalProjectStructure().graphCopy()
    );
    newInfo.setLastImportTimestamp(externalProjectInfo.getLastImportTimestamp());
    newInfo.setLastSuccessfulImportTimestamp(externalProjectInfo.getLastSuccessfulImportTimestamp());

    restoreInclusionSettings(newInfo.getExternalProjectStructure());

    Pair<ProjectSystemId, File> key = Pair.create(projectSystemId, new File(projectPath));
    myExternalRootProjects.merge(key, newInfo, (oldInfo, info) -> {
      InternalExternalProjectInfo merged = new InternalExternalProjectInfo(
        projectSystemId,
        projectPath,
        info.getExternalProjectStructure() == null ? oldInfo.getExternalProjectStructure() : info.getExternalProjectStructure()
      );
      merged.setLastImportTimestamp(info.getLastImportTimestamp());
      long lastSuccessfulImportTimestamp = info.getLastSuccessfulImportTimestamp() == -1
                                           ? oldInfo.getLastSuccessfulImportTimestamp()
                                           : info.getLastSuccessfulImportTimestamp();
      merged.setLastSuccessfulImportTimestamp(lastSuccessfulImportTimestamp);
      return merged;
    });

    incModificationCount();
    markAsChangedAndScheduleSave();
  }
void update(@NotNull ExternalProjectInfo externalProjectInfo)