diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListManagerImpl.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListManagerImpl.java index 18c615edc131..9730bff7fd06 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListManagerImpl.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListManagerImpl.java @@ -284,15 +284,19 @@ public class ChangeListManagerImpl extends ChangeListManagerEx implements Projec invokeAfterUpdate(new Runnable() { @Override public void run() { - myUpdater.setIgnoreBackgroundOperation(false); - myUpdater.pause(); - myFreezeName.set(reason); + freezeImmediately(reason); context.ping(); } }, InvokeAfterUpdateMode.SILENT_CALLBACK_POOLED, "", ModalityState.NON_MODAL); context.suspend(); } + public void freezeImmediately(@Nullable String reason) { + myUpdater.setIgnoreBackgroundOperation(false); + myUpdater.pause(); + myFreezeName.set(reason); + } + @Override public void letGo() { myUpdater.go(); diff --git a/plugins/git4idea/src/git4idea/util/GitFreezingProcess.java b/plugins/git4idea/src/git4idea/util/GitFreezingProcess.java index a11fd17ccb06..a6fb2f44cc6e 100644 --- a/plugins/git4idea/src/git4idea/util/GitFreezingProcess.java +++ b/plugins/git4idea/src/git4idea/util/GitFreezingProcess.java @@ -19,8 +19,7 @@ import com.intellij.ide.SaveAndSyncHandler; import com.intellij.openapi.fileEditor.FileDocumentManager; import com.intellij.openapi.project.Project; import com.intellij.openapi.project.ex.ProjectManagerEx; -import com.intellij.openapi.vcs.changes.ChangeListManager; -import com.intellij.util.continuation.GatheringContinuationContext; +import com.intellij.openapi.vcs.changes.ChangeListManagerImpl; import com.intellij.util.ui.UIUtil; import org.jetbrains.annotations.NotNull; @@ -35,12 +34,12 @@ public class GitFreezingProcess { @NotNull private final String myOperationTitle; @NotNull private final Runnable myRunnable; - @NotNull private final ChangeListManager myChangeListManager; + @NotNull private final ChangeListManagerImpl myChangeListManager; public GitFreezingProcess(@NotNull Project project, @NotNull String operationTitle, @NotNull Runnable runnable) { myOperationTitle = operationTitle; myRunnable = runnable; - myChangeListManager = ChangeListManager.getInstance(project); + myChangeListManager = ChangeListManagerImpl.getInstanceImpl(project); } public void execute() { @@ -93,8 +92,7 @@ public class GitFreezingProcess { } private void freeze() { - myChangeListManager.freeze(new GatheringContinuationContext(), - "Local changes are not available until Git " + myOperationTitle + " is finished."); + myChangeListManager.freezeImmediately("Local changes are not available until Git " + myOperationTitle + " is finished."); } private void unfreeze() {