void (@NotNull Task.Backgroundable activity) { PrePushHandler.Result result = runPrePushHandlersInModalTask(); if (result == PrePushHandler.Result.OK) { activity.queue(); close(OK_EXIT_CODE); } else if (result == PrePushHandler.Result.ABORT_AND_CLOSE) { doCancelAction(); } else if (result == PrePushHandler.Result.ABORT) { // cancel push and leave the push dialog open } }