JCheckBox (@NotNull Project project) { final JCheckBox removeOptionCheckBox = new JCheckBox(VcsBundle.message("shelve.remove.successfully.applied.files.checkbox")); removeOptionCheckBox.setMnemonic(KeyEvent.VK_R); final ShelveChangesManager shelveChangesManager = ShelveChangesManager.getInstance(project); removeOptionCheckBox.setSelected(shelveChangesManager.isRemoveFilesFromShelf()); removeOptionCheckBox.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { shelveChangesManager.setRemoveFilesFromShelf(removeOptionCheckBox.isSelected()); } }); return removeOptionCheckBox; }