fOutlineViewer.setLabelProvider(editor.createOutlineLabelProvider());
fOutlineViewer.setInput(fModule);
}
fOutlineViewer.addPostSelectionChangedListener(this);
final IPageSite site = getSite();
fLinkHelper = new LinkingHelper();
final IContextService service = (IContextService) site
.getService(IContextService.class);
service.activateContext("org.erlide.ui.erlangOutlineAndNavigatorScope");
final MenuManager manager = new MenuManager();
manager.setRemoveAllWhenShown(true);
manager.addMenuListener(new IMenuListener() {
@Override
public void menuAboutToShow(final IMenuManager m) {
// recursive loop?
// menuAboutToShow(m);
contextMenuAboutToShow(m);
}
});
final Menu menu = manager.createContextMenu(tree);
tree.setMenu(menu);
site.registerContextMenu(ErlangCore.PLUGIN_ID + ".outline", manager,
fOutlineViewer);
fActionGroups = new CompositeActionGroup(
new ActionGroup[] { new ErlangSearchActionGroup(this) });
// register global actions
final IActionBars actionBars = site.getActionBars();
actionBars.setGlobalActionHandler(ITextEditorActionConstants.UNDO,
editor.getAction(ITextEditorActionConstants.UNDO));
actionBars.setGlobalActionHandler(ITextEditorActionConstants.REDO,
editor.getAction(ITextEditorActionConstants.REDO));
fActionGroups.fillActionBars(actionBars);
registerToolbarActions(actionBars);
final IHandlerService handlerService = (IHandlerService) site
.getService(IHandlerService.class);
handlerService.activateHandler(
IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR,
new ActionHandler(fToggleLinkingAction));
fPartListener = new IPartListener() {