diff --git a/plugins/git4idea/src/git4idea/checkout/GitCheckoutDialog.java b/plugins/git4idea/src/git4idea/checkout/GitCheckoutDialog.java index 4459c0393eeb..6da7c4388eaf 100644 --- a/plugins/git4idea/src/git4idea/checkout/GitCheckoutDialog.java +++ b/plugins/git4idea/src/git4idea/checkout/GitCheckoutDialog.java @@ -47,70 +47,21 @@ import java.util.List; * Checkout dialog. It also allows checking out a new branch. */ public class GitCheckoutDialog extends DialogWrapper { - /** - * The root panel - */ private JPanel myPanel; - /** - * Git root field - */ private JComboBox myGitRoot; - /** - * Branch/tag to check out - */ private JComboBox myBranchToCkeckout; - /** - * Current branch - */ private JLabel myCurrentBranch; - /** - * Checkbox that specifies whether tags are included into drop down - */ - private JCheckBox myIncludeTagsCheckBox; - /** - * The name of new branch - */ + private JCheckBox myIncludeTagsCheckBox; // Checkbox that specifies whether tags are included into drop down private JTextField myNewBranchName; - /** - * The delete branch before checkout flag - */ - private JCheckBox myOverrideCheckBox; - /** - * The create reference log checkbox - */ + private JCheckBox myOverrideCheckBox; // The delete branch before checkout flag private JCheckBox myCreateRefLogCheckBox; - /** - * The track branch checkbox - */ private JCheckBox myTrackBranchCheckBox; - /** - * The validator for branch to checkout - */ private final GitReferenceValidator myBranchToCkeckoutValidator; - /** - * The validate button - */ private JButton myValidateButton; - /** - * The context project - */ private final Project myProject; - /** - * The Git setting for the project - */ @Nullable private final GitVcsSettings mySettings; - /** - * Existing branches for the currently selected root - */ private final HashSet existingBranches = new HashSet(); - /** - * A constructor - * - * @param project the context project - * @param roots the git roots for the project - * @param defaultRoot the default root - */ public GitCheckoutDialog(@NotNull Project project, @NotNull List roots, @Nullable VirtualFile defaultRoot) { super(project, true); setTitle(GitBundle.getString("checkout.branch")); @@ -132,6 +83,11 @@ public class GitCheckoutDialog extends DialogWrapper { checkOkButton(); } + @Override + public JComponent getPreferredFocusedComponent() { + return myBranchToCkeckout; + } + /** * Validate if ok button should be enabled and set appropriate error */