Package org.eclipse.ui

Examples of org.eclipse.ui.IEditorActionBarContributor


      activeServiceLocator = null;
    }

    setFocus();
    IEditorPart activeEditor = getEditor(newPageIndex);
    IEditorActionBarContributor contributor = getEditorSite()
        .getActionBarContributor();
    if (contributor != null
        && contributor instanceof MultiPageEditorActionBarContributor) {
      ((MultiPageEditorActionBarContributor) contributor)
          .setActivePage(activeEditor);
View Full Code Here


    // Some Design editors (DTD) rely on this view for their own uses
    menu.appendToGroup(IWorkbenchActionConstants.GROUP_ADD, fShowPropertiesAction);
  }

  private void addExtendedContextMenuActions(IMenuManager menu) {
    IEditorActionBarContributor c = getEditorSite().getActionBarContributor();
    if (c instanceof IPopupMenuContributor) {
      ((IPopupMenuContributor) c).contributeToPopupMenu(menu);
    }
    else {
      ExtendedEditorActionBuilder builder = new ExtendedEditorActionBuilder();
View Full Code Here

    // Some Design editors (DTD) rely on this view for their own uses
    menu.appendToGroup(IWorkbenchActionConstants.GROUP_ADD, fShowPropertiesAction);
  }

  private void addExtendedContextMenuActions(IMenuManager menu) {
    IEditorActionBarContributor c = getEditorSite().getActionBarContributor();
    if (c instanceof IPopupMenuContributor) {
      ((IPopupMenuContributor) c).contributeToPopupMenu(menu);
    }
    else {
      ExtendedEditorActionBuilder builder = new ExtendedEditorActionBuilder();
View Full Code Here

    if (page == null)
      return null;
    IEditorPart editor = page.getActiveEditor();
    if (editor == null)
      return null;
    IEditorActionBarContributor contributor = editor.getEditorSite().getActionBarContributor();
    if (contributor instanceof EditorActionBarContributor) {
      return ((EditorActionBarContributor) contributor).getActionBars().getStatusLineManager();
    }
    return null;
  }
View Full Code Here

   * @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();
View Full Code Here

    setActiveEditor(activeEditor);
    setFocus();

    IEditorSite site = getEditorSite();
    while (site != null) {
      IEditorActionBarContributor contributor = site
          .getActionBarContributor();
      if (contributor instanceof MultiPageEditorActionBarContributor) {
        ((MultiPageEditorActionBarContributor) contributor)
            .setActivePage(activeEditor);
      }
View Full Code Here

      connectDesignPage();

      // set the active editor in the action bar contributor first
      // before setactivepage calls action bar contributor's
      // setactivepage (bug141013 - remove when bug151488 is fixed)
      IEditorActionBarContributor contributor = getEditorSite().getActionBarContributor();
      if (contributor instanceof MultiPageEditorActionBarContributor) {
        ((MultiPageEditorActionBarContributor) contributor).setActiveEditor(this);
      }

      int activePageIndex = getPreferenceStore().getInt(getEditorSite().getId() + "." + IXMLPreferenceNames.LAST_ACTIVE_PAGE); //$NON-NLS-1$;
View Full Code Here

      site = new MultiPageEditorSite(this, editor) {
        /**
         * @see org.eclipse.ui.part.MultiPageEditorSite#getActionBarContributor()
         */
        public IEditorActionBarContributor getActionBarContributor() {
          IEditorActionBarContributor contributor = super.getActionBarContributor();
          IEditorActionBarContributor multiContributor = XMLMultiPageEditorPart.this.getEditorSite().getActionBarContributor();
          if (multiContributor instanceof XMLMultiPageEditorActionBarContributor) {
            contributor = ((XMLMultiPageEditorActionBarContributor) multiContributor).sourceViewerActionContributor;
          }
          return contributor;
        }
View Full Code Here

        if (className == null) {
      return null;
    }

        // Create the contributor object.
        IEditorActionBarContributor contributor = null;
        try {
            contributor = (IEditorActionBarContributor) WorkbenchPlugin
                    .createExtension(configurationElement,
                            IWorkbenchRegistryConstants.ATT_CONTRIBUTOR_CLASS);
        } catch (CoreException e) {
View Full Code Here

    actionBars = new EditorActionBars(page, site.getWorkbenchWindow(), type);
    actionBars.addRef();
    actionCache.put(type, actionBars);

    // Read base contributor.
    IEditorActionBarContributor contr = desc.createActionBarContributor();
    if (contr != null) {
      actionBars.setEditorContributor(contr);
      contr.init(actionBars, page);
    }

    // Read action extensions.
    EditorActionBuilder builder = new EditorActionBuilder();
    contr = builder.readActionExtensions(desc);
    if (contr != null) {
      actionBars.setExtensionContributor(contr);
      contr.init(actionBars, page);
    }

    // Return action bars.
    return actionBars;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IEditorActionBarContributor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.