use of org.eclipse.mylyn.internal.wikitext.ui.editor.actions.PreviewOutlineItemAction in project mylyn.docs by eclipse.
the class MarkupEditor method editorContextMenuAboutToShow.
@Override
protected void editorContextMenuAboutToShow(IMenuManager menu) {
super.editorContextMenuAboutToShow(menu);
final MarkupLanguage markupLanguage = getMarkupLanguage();
MenuManager markupLanguageMenu = new MenuManager(Messages.MarkupEditor_markupLanguage);
for (String markupLanguageName : new TreeSet<>(WikiText.getMarkupLanguageNames())) {
markupLanguageMenu.add(new SetMarkupLanguageAction(this, markupLanguageName, markupLanguage != null && markupLanguageName.equals(markupLanguage.getName())));
}
menu.prependToGroup(ITextEditorActionConstants.GROUP_SETTINGS, markupLanguageMenu);
OutlineItem nearestOutlineItem = getNearestMatchingOutlineItem();
if (nearestOutlineItem != null && !nearestOutlineItem.isRootItem()) {
menu.appendToGroup(ITextEditorActionConstants.GROUP_OPEN, new PreviewOutlineItemAction(this, nearestOutlineItem));
}
}
Aggregations