542543544545546547548549550551552
{ eventBus_.fireEvent(new LastChanceSaveEvent(barrier)); } finally { token.release(); } } private void init(PresentationState state)
146147148149150151152153154155156
} public void clearProgress() { // alternate way to signal completion. safe to quit token.release(); } public void onCompleted() { // We saved successfully. We're safe to quit now.
152153154155156157158159160161162
} public void onCompleted() { // We saved successfully. We're safe to quit now. token.release(); } public void onError(String message) { // The save didn't succeed. Oh well. Nothing we can
159160161162163164165166167168169
public void onError(String message) { // The save didn't succeed. Oh well. Nothing we can // do but quit. token.release(); } }); if (!saving) {
167168169170171172173174175176177
if (!saving) { // No save was performed (not needed). We're safe to quit // now, no need to wait for server requests to complete. token.release(); } } }); }
200201202203204205206207208209210
{ events_.fireEvent(new LastChanceSaveEvent(barrier)); } finally { token.release(); } } @Handler public void onShowToolbar()
646647648649650651652653654655656
{ eventBus_.fireEvent(new LastChanceSaveEvent(barrier)); } finally { token.release(); } } private final boolean saveChanges_; private final String switchToProject_;