hideVisibleWindow(adapter);
root = adapter.getRootPane();
Container parent = root.getParent();
if (parent != null)
parent.remove(root);
IEditorSite site = editor.getEditorSite();
undoAction = new UndoActionHandler(site, getUndoContext());
redoAction = new RedoActionHandler(site, getUndoContext());
IActionBars actionBars = site.getActionBars();
actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), undoAction);
actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), redoAction);
rootBounds = adapter.getDesignBounds();
root.setSize(rootBounds.width, rootBounds.height);
add(root);