1 package com
.intellij
.openapi
.vcs
;
3 import com
.intellij
.openapi
.vcs
.checkin
.CheckinHandler
;
4 import com
.intellij
.openapi
.vcs
.checkin
.CheckinHandlerFactory
;
5 import com
.intellij
.openapi
.vcs
.ui
.RefreshableOnComponent
;
6 import org
.jetbrains
.annotations
.NotNull
;
11 public class CheckRemoteStatusCheckinHandlerFactory
extends CheckinHandlerFactory
{
14 public CheckinHandler
createHandler(final CheckinProjectPanel panel
) {
15 return new MyCheckinHandler(panel
);
18 private static class MyCheckinHandler
extends CheckinHandler
{
19 private final CheckinProjectPanel myPanel
;
20 private VcsConfiguration myVcsConfiguration
;
22 private MyCheckinHandler(final CheckinProjectPanel panel
) {
24 myVcsConfiguration
= VcsConfiguration
.getInstance(myPanel
.getProject());
28 public RefreshableOnComponent
getBeforeCheckinConfigurationPanel() {
29 final JCheckBox checkUpToDate
= new JCheckBox(VcsBundle
.message("checkbox.checkin.options.check.files.up.to.date"));
31 return new RefreshableOnComponent() {
32 public JComponent
getComponent() {
33 final JPanel panel
= new JPanel(new BorderLayout());
34 panel
.add(checkUpToDate
, BorderLayout
.WEST
);
38 public void refresh() {
41 public void saveState() {
42 myVcsConfiguration
.CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT
= checkUpToDate
.isSelected();
45 public void restoreState() {
46 checkUpToDate
.setSelected(myVcsConfiguration
.CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT
);
52 public void includedChangesChanged() {
53 // todo recalculate message
56 private void doCheck() {