@RequiresEdt
  public void enableIntegration(@Nullable VirtualFile targetDirectory) {
    ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(myProject);
    if (vcsManager != null) {
      if (targetDirectory != null) {
        vcsManager.setDirectoryMappings(Collections.singletonList(new VcsDirectoryMapping(targetDirectory.getPath(), getName())));
      }
      else {
        vcsManager.setDirectoryMappings(Collections.singletonList(VcsDirectoryMapping.createDefault(getName())));
      }
    }
  }
@RequiresEdt
  public void enableIntegration(@Nullable VirtualFile targetDirectory)