use of org.jboss.tools.hibernate.ui.diagram.editors.parts.TreePartFactory in project jbosstools-hibernate by jbosstools.
the class DiagramContentOutlinePage method configureOutlineViewer.
/**
* Outline viewer configuration
*/
protected void configureOutlineViewer() {
getViewer().setEditDomain(editor.getDefaultEditDomain());
getViewer().setEditPartFactory(new TreePartFactory());
MenuManager provider = new PopupMenuProvider(getViewer(), getActionRegistry());
// getViewer().setContextMenu(provider);
getViewer().setContextMenu(provider);
getSite().registerContextMenu(// $NON-NLS-1$
"org.jboss.tools.hibernate.ui.diagram.editors.popup.outline.contextmenu", provider, getSite().getSelectionProvider());
IToolBarManager tbm = getSite().getActionBars().getToolBarManager();
tbm.add(editor.getLexicalSortingAction());
showOutlineAction = new Action() {
public void run() {
showPage(ID_OUTLINE);
}
};
showOutlineAction.setToolTipText(DiagramViewerMessages.DiagramContentOutlinePage_Outline);
showOutlineAction.setImageDescriptor(ImageDescriptor.createFromFile(DiagramViewer.class, // $NON-NLS-1$
"icons/outline.gif"));
tbm.add(showOutlineAction);
showOverviewAction = new Action() {
public void run() {
showPage(ID_OVERVIEW);
}
};
showOverviewAction.setToolTipText(DiagramViewerMessages.DiagramContentOutlinePage_Overview);
showOverviewAction.setImageDescriptor(ImageDescriptor.createFromFile(DiagramViewer.class, // $NON-NLS-1$
"icons/overview.gif"));
tbm.add(showOverviewAction);
showPage(ID_OVERVIEW);
}
Aggregations