protected void doAddManagedFilesWithProfiles(List<VirtualFile> files, MavenExplicitProfiles profiles, Module previewModuleToDelete) {
    myPreviewModule = previewModuleToDelete;
    if (!isInitialized()) {
      doInit();
      doActivate();
      var distributionUrl = getWrapperDistributionUrl(ProjectUtil.guessProjectDir(myProject));
      if (distributionUrl != null) {
        getGeneralSettings().setMavenHomeType(MavenWrapper.INSTANCE);
      }
    }
    getProjectsTree().addManagedFilesWithProfiles(files, profiles);
  }
protected void doAddManagedFilesWithProfiles(List<VirtualFile> files, MavenExplicitProfiles profiles, Module previewModuleToDelete)