void (@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()))); } } }