Package org.eclipse.ui

Examples of org.eclipse.ui.IEditorActionBarContributor


   */
  protected EditorSite createEditorSite(String editorId, IEditorInput input, IEditorPart editor) {
    EditorDescriptor descriptor = (EditorDescriptor) idToDescriptor.get(editorId);
    IEditorReference ref = new EditorReference(getEditorManager(), input, descriptor);
    EditorSite site = new EditorInViewSite(viewSite, ref, editor, page, descriptor);
    IEditorActionBarContributor contributor = descriptor.createActionBarContributor();
    site.setActionBars(createEditorActionBars(descriptor, contributor, site));
    return site;
  }
View Full Code Here


      contributor.init(actionBars, page);
    }

    // Read action extensions.
    EditorActionBuilder builder = new EditorActionBuilder();
    IEditorActionBarContributor extension = builder.readActionExtensions(descriptor /*WDG , actionBars*/);
    if (extension != null) {
      actionBars.setExtensionContributor(extension);
      extension.init(actionBars, page);
    }

    return actionBars;
  }
View Full Code Here

   */
  protected EditorSite createEditorSite(String editorId, IEditorPart editor) {
    EditorDescriptor descriptor = (EditorDescriptor) idToDescriptor.get(editorId);
    IEditorReference ref = new EditorReference();
    EditorSite site = new CompositeEditorSite(mainEditorSite, ref, editor, page, descriptor);
    IEditorActionBarContributor contributor = descriptor.createActionBarContributor();
    site.setActionBars(createEditorActionBars(descriptor, contributor, site));
    return site;
  }
View Full Code Here

      contributor.init(actionBars, page);
    }

    // Read action extensions.
    EditorActionBuilder builder = new EditorActionBuilder();
    IEditorActionBarContributor extension = builder.readActionExtensions(descriptor /*WDG , actionBars */);
    if (extension != null) {
      actionBars.setExtensionContributor(extension);
      extension.init(actionBars, page);
    }

    return actionBars;
  }
View Full Code Here

      }
    }
  }

  private void retrieveStatusLineItems() {
    IEditorActionBarContributor contributor = getEditorSite().getActionBarContributor();
    if (contributor instanceof EditorActionBarContributor) {
      IStatusLineManager slm = ((EditorActionBarContributor) contributor).getActionBars().getStatusLineManager();

      statusLineMain = (StatusLineContributionItem) slm.find("MainDeck");
      statusLineSideboard = (StatusLineContributionItem) slm.find("Sideboard");
View Full Code Here

   *            the index of the new page
   */
  protected void updateActionBarContributor(int pageIndex) {
    // this is to enable the undo/redo actions before a page change has
    // occurred
    IEditorActionBarContributor contributor = getEditorSite()
        .getActionBarContributor();
    if (contributor != null
        && contributor instanceof MultiPageEditorActionBarContributor) {
      ((MultiPageEditorActionBarContributor) contributor)
          .setActivePage(getEditor(pageIndex));
View Full Code Here

     *
     * copied from superclass, as it is private there...
     */
    public IStatusLineManager getStatusLineManager() {

        IEditorActionBarContributor contributor = getEditorSite().getActionBarContributor();
        if (!(contributor instanceof EditorActionBarContributor))
            return null;

        IActionBars actionBars = ((EditorActionBarContributor) contributor).getActionBars();
        if (actionBars == null)
View Full Code Here

   *            the index of the new page
   */
  protected void updateActionBarContributor(int pageIndex) {
    // this is to enable the undo/redo actions before a page change has
    // occurred
    IEditorActionBarContributor contributor = getEditorSite()
        .getActionBarContributor();
    if (contributor != null
        && contributor instanceof MultiPageEditorActionBarContributor) {
      ((MultiPageEditorActionBarContributor) contributor)
          .setActivePage(getEditor(pageIndex));
View Full Code Here

      return activeViewSite.getActionBars().getStatusLineManager();
    }

    if(activePart instanceof IEditorPart) {
      IEditorPart activeEditorPart = (IEditorPart) activePart;
      IEditorActionBarContributor contributor = activeEditorPart.getEditorSite()
                                                                .getActionBarContributor();
      if(contributor instanceof EditorActionBarContributor) {
        return ((EditorActionBarContributor) contributor).getActionBars().getStatusLineManager();
      }
    }
View Full Code Here

    IEditorSite site = null;
    if (page == sourceEditor) {
      site = new MultiPageEditorSite(this, page) {
        @Override
        public IEditorActionBarContributor getActionBarContributor() {
          IEditorActionBarContributor contributor = super.getActionBarContributor();
          IEditorActionBarContributor multiContributor = AbstractConfigEditor.this.getEditorSite()
              .getActionBarContributor();
          if (multiContributor instanceof SpringConfigEditorContributor) {
            contributor = ((SpringConfigEditorContributor) multiContributor).sourceViewerActionContributor;
          }
          return contributor;
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.