Package org.eclipse.ui

Examples of org.eclipse.ui.IWorkbenchPartSite


   */
  public Object execute(ExecutionEvent event) throws ExecutionException {

    IWorkbenchPart part = HandlerUtil.getActivePart(event);
    if (part != null) {
      IWorkbenchPartSite site = part.getSite();
      if (site instanceof PartSite) {
        PartPane pane = ((PartSite) site).getPane();
        pane.showPaneMenu();
      }
    }
View Full Code Here


    /**
     * Adds a listener that toggles standby state if the view pane is zoomed.
     */
    private void addPaneListener() {
        IWorkbenchPartSite site = getSite();
        if (site instanceof PartSite) {       
            final WorkbenchPartReference ref = ((WorkbenchPartReference)((PartSite) site).getPartReference());
            ref.addInternalPropertyListener(
                    new IPropertyListener() {
                        public void propertyChanged(Object source, int propId) {
View Full Code Here

            handler.removePropertyChangeListener(propertyChangeListener);
            handler = null;
        }
        IWorkbenchPart part = getActivePart();
        if (part != null) {
            IWorkbenchPartSite site = part.getSite();
            SubActionBars bars = (SubActionBars) ((PartSite) site).getActionBars();
            bars.removePropertyChangeListener(propertyChangeListener);
        }
    }
View Full Code Here

     *
     * @param part the workbench part that has been activated
     */
    public void partActivated(IWorkbenchPart part) {
        super.partActivated(part);
        IWorkbenchPartSite site = part.getSite();
        SubActionBars bars = (SubActionBars) ((PartSite) site).getActionBars();
        bars.addPropertyChangeListener(propertyChangeListener);
        setActionHandler(bars.getGlobalActionHandler(getId()));
    }
View Full Code Here

     *
     * @param part the workbench part that has been deactivated
     */
    public void partDeactivated(IWorkbenchPart part) {
        super.partDeactivated(part);
        IWorkbenchPartSite site = part.getSite();
        SubActionBars bars = (SubActionBars) ((PartSite) site).getActionBars();
        bars.removePropertyChangeListener(propertyChangeListener);

        IWorkbenchPart activePart = part.getSite().getPage().getActivePart();
        if (activePart != null) {
View Full Code Here

    return false;
  }

  private IPartListener getPartListener() {
    if (partListener == null) {
      final IWorkbenchPartSite site = (IWorkbenchPartSite) appContext
          .getVariable(ISources.ACTIVE_SITE_NAME);

      final IWorkbenchPart currentPart;
      if (site instanceof MultiPageEditorSite) {
        currentPart = ((MultiPageEditorSite) site).getMultiPageEditor();
      } else {
        currentPart = site.getPart();
      }

      partListener = new IPartListener() {
        public void partActivated(IWorkbenchPart part) {
        }
View Full Code Here

    if (appContext != null) {
      if (localHandler) {
        partHandler.dispose();
      }
      if (partListener != null) {
        IWorkbenchPartSite site = (IWorkbenchPartSite) appContext
            .getVariable(ISources.ACTIVE_SITE_NAME);
        site.getPage().removePartListener(partListener);
        partListener = null;
      }
      appContext = null;
      partHandler = null;
    }
View Full Code Here

      removeEntriesForTab(perTabHistory.forwardEntries);
    }
   
    private Object getCookieForTab(IEditorPart part) {
      if (part != null) {
          IWorkbenchPartSite site = part.getSite();
          if (site instanceof PartSite) {
            PartSite partSite = (PartSite) site;
            WorkbenchPartReference ref = (WorkbenchPartReference) partSite.getPartReference();
            if (!ref.isDisposed()) {
              return partSite.getPane();
View Full Code Here

  public Object execute(ExecutionEvent event) throws ExecutionException {

    IWorkbenchPart part = HandlerUtil.getActivePart(event);
    if (part != null) {
      IWorkbenchPartSite site = part.getSite();
      if (site instanceof PartSite) {
        PartPane pane = ((PartSite) site).getPane();
        pane.showSystemMenu();
      }
    }
View Full Code Here

     */
    public void menuAboutToShow(IMenuManager mgr) {
      IMenuManager originalManager = mgr;
     
      // Add this menu as a visible menu.
      final IWorkbenchPartSite site = part.getSite();
      if (site != null) {
      final IWorkbench workbench = site.getWorkbenchWindow()
          .getWorkbench();
      if (workbench instanceof Workbench) {
        final Workbench realWorkbench = (Workbench) workbench;
        ISelection input = null;
        if ((bitSet & INCLUDE_EDITOR_INPUT) != 0) {
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IWorkbenchPartSite

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.