use of org.eclipse.wst.xml.core.internal.document.ElementImpl in project webtools.sourceediting by eclipse.
the class DOMExtensionItemMenuListener method menuAboutToShow.
public void menuAboutToShow(IMenuManager manager) {
manager.removeAll();
ISelection selection = treeViewer.getSelection();
if (selection instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
if (structuredSelection.getFirstElement() instanceof ElementImpl) {
ElementImpl elementImpl = (ElementImpl) structuredSelection.getFirstElement();
IDOMDocument domDocument = (IDOMDocument) elementImpl.getOwnerDocument();
InternalNodeActionManager actionManager = new InternalNodeActionManager(domDocument.getModel(), treeViewer);
actionManager.fillContextMenu(manager, structuredSelection);
}
}
}
Aggregations