// content.add(tabFolder);
Listener<ContainerEvent<TabPanel, TabItem>> listener = new Listener<ContainerEvent<TabPanel, TabItem>>() {
public void handleEvent(final ContainerEvent<TabPanel, TabItem> ce) {
if (ce.item instanceof ViewEditorTab) {
final ViewEditorTab editorTab = (ViewEditorTab) ce.item;
CubeViewEditor vEditor = editorTab.getEditor();
switch (ce.type) {
case Events.BeforeRemove:
if (vEditor.isDirty()) {
ce.doit = false;
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)) {