use of git4idea.ui.GitStashDialog in project intellij-community by JetBrains.
the class GitStash method perform.
/**
* {@inheritDoc}
*/
protected void perform(@NotNull final Project project, @NotNull final List<VirtualFile> gitRoots, @NotNull final VirtualFile defaultRoot) {
final ChangeListManager changeListManager = ChangeListManager.getInstance(project);
if (changeListManager.isFreezedWithNotification("Can not stash changes now"))
return;
GitStashDialog d = new GitStashDialog(project, gitRoots, defaultRoot);
if (!d.showAndGet()) {
return;
}
VirtualFile root = d.getGitRoot();
final GitLineHandler h = d.handler();
AccessToken token = DvcsUtil.workingTreeChangeStarted(project);
try {
GitHandlerUtil.doSynchronously(h, GitBundle.getString("stashing.title"), h.printableCommandLine());
} finally {
token.finish();
}
VfsUtil.markDirtyAndRefresh(false, true, false, root);
if (!h.errors().isEmpty()) {
showErrors(project, getActionName(), h.errors());
}
}
Aggregations