Examples of ITrimManager


Examples of org.eclipse.ui.internal.layout.ITrimManager

     
    WorkbenchWindow wbw = (WorkbenchWindow) getPage().getWorkbenchWindow();
    if (wbw == null || wbw.getShell() == null)
      return;

    ITrimManager tbm = wbw.getTrimManager();
    Perspective perspective = getPage().getActivePerspective();
    FastViewManager fvm = perspective.getFastViewManager();

    ILayoutContainer root = getContainer();

    // We go up one more level when maximizing an editor stack
    // so that we 'zoom' the editor area
    boolean restoringEditorArea = false;
    if (root instanceof EditorSashContainer) {
      root = ((EditorSashContainer) root).getContainer();
      restoringEditorArea = true;
    }

    // This is a compound operation
    fvm.deferUpdates(true);
   
    LayoutPart[] children = root.getChildren();
    for (int i = 0; i < children.length; i++) {
      if (children[i] != this) {
        IWindowTrim trim = tbm.getTrim(children[i].getID());
        if (trim == null)
          continue;

        if (trim instanceof ViewStackTrimToolBar) {
          ViewStackTrimToolBar vstb = (ViewStackTrimToolBar) trim;
View Full Code Here

Examples of org.eclipse.ui.internal.layout.ITrimManager

      }
      else {
        // Update the FVB only if not using the new min/max
        WorkbenchWindow wbw = (WorkbenchWindow) page.getWorkbenchWindow();
        if (wbw != null) {
          ITrimManager tbm = wbw.getTrimManager();
          if (tbm != null) {
            IWindowTrim fvb = tbm.getTrim(FastViewBar.FASTVIEWBAR_ID);
            if (fvb instanceof FastViewBar) {
              ((FastViewBar)fvb).update(true);
            }
          }
        }
View Full Code Here

Examples of org.eclipse.ui.internal.layout.ITrimManager

        editorHolder = null;
    }

    private EditorAreaTrimToolBar getEditorAreaTrim(boolean createIfNecessary) {
    WorkbenchWindow wbw = (WorkbenchWindow) page.getWorkbenchWindow();
    ITrimManager tbm = wbw.getTrimManager();
    if (tbm == null)
      return null;

    // Create if necesary
    EditorAreaTrimToolBar editorAreaTrim = (EditorAreaTrimToolBar) tbm.getTrim(IPageLayout.ID_EDITOR_AREA);
      if (editorAreaTrim  == null && createIfNecessary) {
        int suggestedSide = SWT.RIGHT;
      int cachedSide = ((TrimLayout)tbm).getPreferredArea(IPageLayout.ID_EDITOR_AREA);
      if (cachedSide != -1)
        suggestedSide = cachedSide;
     
      IWindowTrim beforeMe = ((TrimLayout)tbm).getPreferredLocation(IPageLayout.ID_EDITOR_AREA);
     
        // Gain access to the trim manager
      editorAreaTrim = new EditorAreaTrimToolBar(wbw, editorArea);
      editorAreaTrim.dock(suggestedSide);
      tbm.addTrim(suggestedSide, editorAreaTrim, beforeMe);
      }
   
    return editorAreaTrim;
    }
View Full Code Here

Examples of org.eclipse.ui.internal.layout.ITrimManager

    }
  }

  protected EditorAreaTrimToolBar setEditorAreaTrimVisibility(boolean visible) {
    WorkbenchWindow wbw = (WorkbenchWindow) page.getWorkbenchWindow();
    ITrimManager tbm = wbw.getTrimManager();
    if (tbm == null)
      return null;
   
    // Only create the trim element if it's going to be visible
    EditorAreaTrimToolBar editorAreaTrim = getEditorAreaTrim(visible);
    if (editorAreaTrim == null)
      return null;
   
      tbm.setTrimVisible(editorAreaTrim, visible);
      tbm.forceLayout();
     
      return editorAreaTrim;
    }
View Full Code Here

Examples of org.eclipse.ui.internal.layout.ITrimManager

  public void createInActiveWindow() {
    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();

    dock(location);

    ITrimManager trimManager = getTrimManager();
    trimManager.addTrim(location, this);
    window.getShell().layout();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.