diff --git a/src/gitflow/ui/GitflowBranchChooseDialog.java b/src/gitflow/ui/GitflowBranchChooseDialog.java index 14ea8ab..66f3d06 100644 --- a/src/gitflow/ui/GitflowBranchChooseDialog.java +++ b/src/gitflow/ui/GitflowBranchChooseDialog.java @@ -2,6 +2,7 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.DialogWrapper; +import com.intellij.openapi.ui.ValidationInfo; import org.jetbrains.annotations.Nullable; import javax.swing.*; @@ -29,6 +30,16 @@ public GitflowBranchChooseDialog(Project project, List branchNames) { init(); } + @Nullable + @Override + protected ValidationInfo doValidate() { + if (branchList.getSelectedValue() == null){ + return new ValidationInfo("No branch selected!"); + } else { + return null; + } + } + @Nullable @Override protected JComponent createCenterPanel() {