use of com.intellij.openapi.vcs.changes.ui.SessionDialog in project intellij-community by JetBrains.
the class CreatePatchFromChangesAction method createPatch.
public static void createPatch(Project project, String commitMessage, List<Change> changeCollection) {
project = project == null ? ProjectManager.getInstance().getDefaultProject() : project;
final CreatePatchCommitExecutor executor = CreatePatchCommitExecutor.getInstance(project);
CommitSession commitSession = executor.createCommitSession();
if (commitSession instanceof CommitSessionContextAware) {
((CommitSessionContextAware) commitSession).setContext(new CommitContext());
}
DialogWrapper sessionDialog = new SessionDialog(executor.getActionText(), project, commitSession, changeCollection, commitMessage);
if (!sessionDialog.showAndGet()) {
return;
}
preloadContent(project, changeCollection);
commitSession.execute(changeCollection, commitMessage);
}
Aggregations