use of org.eclipse.wst.xml.ui.internal.taginfo.MarkupTagInfoProvider in project webtools.sourceediting by eclipse.
the class XMLAnnotationsView method selectionChanged.
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
IEditorPart edPart = getSite().getPage().getActiveEditor();
if (part.equals(edPart)) {
if (selection instanceof IStructuredSelection) {
currentSelection = (IStructuredSelection) selection;
if (!selection.isEmpty() && (currentSelection.getFirstElement() instanceof Node)) {
Node node = (Node) currentSelection.getFirstElement();
ModelQuery mq = ModelQueryUtil.getModelQuery(node.getOwnerDocument());
if (mq != null) {
cmNode = mq.getCMNode(node);
MarkupTagInfoProvider tagInfo = new MarkupTagInfoProvider();
xmlDoc = tagInfo.getInfo(cmNode);
} else {
xmlDoc = XMLUIMessages.Documentation_view_default_msg;
}
doStyledTextInput();
}
}
}
}
Aggregations