/* * (non-Javadoc) * * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getMenuListener(org.eclipse.jface.viewers.TreeViewer) */ public IMenuListener getMenuListener(TreeViewer viewer) { IMenuListener listener = null; if (fMenuHelper == null && viewer.getInput() instanceof DTDModelImpl) { fMenuHelper = new DTDContextMenuHelper((DTDModelImpl) viewer.getInput()); fMenuHelper.createMenuListenersFor(viewer); } if (fMenuHelper != null) { listener = fMenuHelper.getMenuListener(); } return listener; }
/* * (non-Javadoc) * * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#unconfigure(org.eclipse.jface.viewers.TreeViewer) */ public void unconfigure(TreeViewer viewer) { super.unconfigure(viewer); fViewerContributions.remove(viewer); if (fMenuHelper != null) { fMenuHelper.removeMenuListenersFor(viewer); fMenuHelper = null; } }