void (@Nullable VirtualFile targetDirectory) { new Task.Backgroundable(myProject, HgBundle.message("progress.title.enabling.hg"), true) { @Override public void run(@NotNull ProgressIndicator indicator) { new HgIntegrationEnabler(HgVcs.this, targetDirectory).detectAndEnable(); } }.queue(); }