getViewer().createControl(parent);
// configure outline viewer
getViewer().setEditDomain(getEditDomain());
getViewer().setEditPartFactory(new ShapesTreeEditPartFactory());
// configure & add context menu to viewer
ContextMenuProvider cmProvider = new ShapesEditorContextMenuProvider(getViewer(), getActionRegistry());
getViewer().setContextMenu(cmProvider);
getSite().registerContextMenu("org.eclipse.gef.examples.shapes.outline.contextmenu", cmProvider,
getSite().getSelectionProvider());
// hook outline viewer
getSelectionSynchronizer().addViewer(getViewer());