void () { Runnable operation = () -> { LOG.debug("starting"); boolean savedSuccessfully = save(); LOG.debug("save result: " + savedSuccessfully); if (savedSuccessfully) { try { LOG.debug("running operation"); myOperation.run(); LOG.debug("operation completed."); } finally { LOG.debug("loading"); ProgressManager.getInstance().executeNonCancelableSection(() -> mySaver.load()); } } LOG.debug("finished."); }; new VcsFreezingProcess(myProject, myOperationTitle, operation).execute(); }