Search in sources :

Example 1 with ExtendedEditorActionBuilder

use of org.eclipse.wst.sse.ui.internal.ExtendedEditorActionBuilder in project webtools.sourceediting by eclipse.

the class StructuredTextEditor method addExtendedContextMenuActions.

private void addExtendedContextMenuActions(IMenuManager menu) {
    IEditorActionBarContributor c = getEditorSite().getActionBarContributor();
    if (c instanceof IPopupMenuContributor) {
        ((IPopupMenuContributor) c).contributeToPopupMenu(menu);
    } else {
        ExtendedEditorActionBuilder builder = new ExtendedEditorActionBuilder();
        IExtendedContributor pmc = builder.readActionExtensions(getConfigurationPoints());
        if (pmc != null) {
            pmc.setActiveEditor(this);
            pmc.contributeToPopupMenu(menu);
        }
    }
}
Also used : ExtendedEditorActionBuilder(org.eclipse.wst.sse.ui.internal.ExtendedEditorActionBuilder) IExtendedContributor(org.eclipse.wst.sse.ui.internal.IExtendedContributor) IEditorActionBarContributor(org.eclipse.ui.IEditorActionBarContributor) IPopupMenuContributor(org.eclipse.wst.sse.ui.internal.IPopupMenuContributor)

Example 2 with ExtendedEditorActionBuilder

use of org.eclipse.wst.sse.ui.internal.ExtendedEditorActionBuilder in project webtools.sourceediting by eclipse.

the class DebugTextEditor method editorContextMenuAboutToShow.

/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.ui.texteditor.AbstractTextEditor#editorContextMenuAboutToShow(org.eclipse.jface.action.IMenuManager)
	 */
protected void editorContextMenuAboutToShow(IMenuManager menu) {
    super.editorContextMenuAboutToShow(menu);
    IEditorActionBarContributor c = getEditorSite().getActionBarContributor();
    if (c instanceof IPopupMenuContributor) {
        ((IPopupMenuContributor) c).contributeToPopupMenu(menu);
    } else {
        ExtendedEditorActionBuilder builder = new ExtendedEditorActionBuilder();
        IExtendedContributor pmc = builder.readActionExtensions(getConfigurationPoints());
        if (pmc != null) {
            pmc.setActiveEditor(this);
            pmc.contributeToPopupMenu(menu);
        }
    }
}
Also used : ExtendedEditorActionBuilder(org.eclipse.wst.sse.ui.internal.ExtendedEditorActionBuilder) IExtendedContributor(org.eclipse.wst.sse.ui.internal.IExtendedContributor) IEditorActionBarContributor(org.eclipse.ui.IEditorActionBarContributor) IPopupMenuContributor(org.eclipse.wst.sse.ui.internal.IPopupMenuContributor)

Aggregations

IEditorActionBarContributor (org.eclipse.ui.IEditorActionBarContributor)2 ExtendedEditorActionBuilder (org.eclipse.wst.sse.ui.internal.ExtendedEditorActionBuilder)2 IExtendedContributor (org.eclipse.wst.sse.ui.internal.IExtendedContributor)2 IPopupMenuContributor (org.eclipse.wst.sse.ui.internal.IPopupMenuContributor)2