use of org.eclipse.egit.ui.internal.rebase.CommitMessageEditorDialog in project egit by eclipse.
the class RewordHandler method promptCommitMessage.
private String promptCommitMessage(final Shell shell, RevCommit commit) {
final String[] message = { commit.getFullMessage() };
shell.getDisplay().syncExec(new Runnable() {
@Override
public void run() {
CommitMessageEditorDialog dialog = new CommitMessageEditorDialog(shell, message[0]);
if (dialog.open() == Window.OK)
message[0] = dialog.getCommitMessage();
else
message[0] = null;
}
});
return message[0];
}
use of org.eclipse.egit.ui.internal.rebase.CommitMessageEditorDialog in project egit by eclipse.
the class SquashHandler method promptCommitMessage.
private String promptCommitMessage(final Shell shell, final String message) {
final String[] msg = { message };
shell.getDisplay().syncExec(new Runnable() {
@Override
public void run() {
CommitMessageEditorDialog dialog = new CommitMessageEditorDialog(shell, msg[0]);
if (dialog.open() == Window.OK)
msg[0] = dialog.getCommitMessage();
else
msg[0] = message;
}
});
return msg[0];
}
use of org.eclipse.egit.ui.internal.rebase.CommitMessageEditorDialog in project egit by eclipse.
the class FeatureFinishHandler method rewordCommitMessage.
private void rewordCommitMessage(Shell activeShell, final GitFlowRepository gfRepo) throws CoreException, IOException {
Repository repository = gfRepo.getRepository();
CommitHelper commitHelper = new CommitHelper(repository);
CommitMessageEditorDialog messageEditorDialog = new CommitMessageEditorDialog(activeShell, repository.readSquashCommitMsg(), UIText.FeatureFinishHandler_rewordSquashedCommitMessage);
if (Window.OK == messageEditorDialog.open()) {
String commitMessage = stripCommentLines(messageEditorDialog.getCommitMessage());
CommitOperation commitOperation = new CommitOperation(repository, commitHelper.getAuthor(), commitHelper.getCommitter(), commitMessage);
commitOperation.execute(null);
}
}
Aggregations