}
private final void askBeforeClose(final ViewEditorTab editorTab, final AsyncCallback <Boolean> callback) {
CubeViewEditor vEditor = editorTab.getEditor();
final XViewModel view = vEditor.getView();
MessageBoxUtils.yesNoCancel(constants.saveView(), messages.saveViewBeforeClosing(ViewBrowserModel.modify(view.getName())),
new Listener<WindowEvent>() {
public void handleEvent(WindowEvent be) {
if (be.buttonClicked.getItemId()
.equalsIgnoreCase(Dialog.YES)) {
saveAndClose(editorTab, callback);