Search in sources :

Example 1 with ReleaseNameValidator

use of org.eclipse.egit.gitflow.ui.internal.validation.ReleaseNameValidator in project egit by eclipse.

the class ReleaseStartHandler method doExecute.

void doExecute(GitFlowRepository gfRepo, final String startCommitSha1, Shell activeShell) {
    InputDialog inputDialog = new InputDialog(activeShell, UIText.ReleaseStartHandler_provideReleaseName, // $NON-NLS-1$
    UIText.ReleaseStartHandler_provideANameForTheNewRelease, // $NON-NLS-1$
    "", new ReleaseNameValidator(gfRepo));
    if (inputDialog.open() != Window.OK) {
        return;
    }
    final String releaseName = inputDialog.getValue();
    ReleaseStartOperation releaseStartOperation = new ReleaseStartOperation(gfRepo, startCommitSha1, releaseName);
    JobUtil.scheduleUserWorkspaceJob(releaseStartOperation, UIText.ReleaseStartHandler_startingNewRelease, JobFamilies.GITFLOW_FAMILY);
}
Also used : InputDialog(org.eclipse.jface.dialogs.InputDialog) ReleaseStartOperation(org.eclipse.egit.gitflow.op.ReleaseStartOperation) ReleaseNameValidator(org.eclipse.egit.gitflow.ui.internal.validation.ReleaseNameValidator)

Aggregations

ReleaseStartOperation (org.eclipse.egit.gitflow.op.ReleaseStartOperation)1 ReleaseNameValidator (org.eclipse.egit.gitflow.ui.internal.validation.ReleaseNameValidator)1 InputDialog (org.eclipse.jface.dialogs.InputDialog)1