}
int startOffset = MWPaneFormatter.getUUIDStartOffset(textPane, element);
int endOffset = MWPaneFormatter.getUUIDEndOffet(textPane, element);
// Retrieve main attributes
AttributeSet attributes = element.getAttributes();
Object attrPage = attributes.getAttribute(MWPaneFormatter.ATTRIBUTE_PAGE);
Object attrPageElement = attributes.getAttribute(MWPaneFormatter.ATTRIBUTE_PAGE_ELEMENT);
Object attrTemplateMatcher = attributes.getAttribute(MWPaneFormatter.ATTRIBUTE_TEMPLATE_MATCHER);
Object attrText = attributes.getAttribute(MWPaneFormatter.ATTRIBUTE_TEXT);
Page page = (attrPage instanceof Page) ? (Page) attrPage : null;
TemplateMatcher matcher = (attrTemplateMatcher instanceof TemplateMatcher) ?
(TemplateMatcher) attrTemplateMatcher : null;
MWPaneDisambiguationMenuCreator menu = new MWPaneDisambiguationMenuCreator();