Package org.eclipse.ui

Examples of org.eclipse.ui.IWorkbenchPartSite


        }
        IWorkbenchPart activePart = activePage.getActivePart();
        if (activePart==null) {
            return null;
        }
        IWorkbenchPartSite site = activePart.getSite();
        if (site instanceof IEditorSite) {
            IEditorSite editorSite = (IEditorSite)site;
            return editorSite.getActionBars().getStatusLineManager();
        } else if (site instanceof IViewSite) {
            IViewSite viewSite = (IViewSite)site;
View Full Code Here


        JcrPropertiesView.this.fillContextMenu(manager);
      }
    });
    Menu menu = menuMgr.createContextMenu(viewer.getControl());
    viewer.getControl().setMenu(menu);
    IWorkbenchPartSite site = getSite();
    if (site!=null) {
        site.registerContextMenu(menuMgr, viewer);
    }
  }
View Full Code Here

      if (activeWindow != null) {
        IWorkbenchPage activePage = activeWindow.getActivePage();
        if (activePage != null) {
          IWorkbenchPart activePart = activePage.getActivePart();
          if (activePart != null) {
            IWorkbenchPartSite activeSite = activePart.getSite();
            if (activeSite != null) {
              if (renameAction.getSite() != activeSite) {
                init(activeWindow);
              }
View Full Code Here

      if (activeWindow != null) {
        IWorkbenchPage activePage = activeWindow.getActivePage();
        if (activePage != null) {
          IWorkbenchPart activePart = activePage.getActivePart();
          if (activePart != null) {
            IWorkbenchPartSite activeSite = activePart.getSite();
            if (activeSite != null) {
              if (extractAction.getSite() != activeSite) {
                init(activeWindow);
              }
View Full Code Here

            // if there is one already: toggling twice is the identity
            if (fFoldingRunner != null) {
                fFoldingRunner.cancel();
                return;
            }
            final IWorkbenchPartSite site = getSite();
            if (site != null) {
                final IWorkbenchPage page = site.getPage();
                if (!page.isPartVisible(ErlangEditor.this)) {
                    // if we're not visible - defer until visible
                    fPage = page;
                    fFoldingRunner = this;
                    page.addPartListener(this);
View Full Code Here

    public void init(final ICommonActionExtensionSite aSite) {
        super.init(aSite);
        final ICommonViewerSite viewSite = aSite.getViewSite();
        if (viewSite instanceof ICommonViewerWorkbenchSite) {
            final ICommonViewerWorkbenchSite workbenchSite = (ICommonViewerWorkbenchSite) viewSite;
            final IWorkbenchPartSite site = workbenchSite.getSite();
            openAction = new OpenErlangAction(aSite, workbenchSite.getSelectionProvider());
            searchActionGroup = new ErlangSearchActionGroup(site);
            final IContextService service = (IContextService) site
                    .getService(IContextService.class);
            service.activateContext("org.erlide.ui.erlangOutlineAndNavigatorScope");
        }
    }
View Full Code Here

        }
        if (copy.isWorkingCopy()) {
          copy.commitWorkingCopy(true, monitor);
          copy.discardWorkingCopy();
        }
        IWorkbenchPartSite site = getEditorSite();
        if (site != null) {
          OrganizeImportsAction action = new OrganizeImportsAction(site);
          action.run(unit);
        }
        type = getUnitMainType(unit);
View Full Code Here

    if (ref != null) {
      IWorkbenchPart part = ref.getPart(true);
      Assert.isNotNull(part);
      if (part instanceof MultiEditor) {
        IWorkbenchPartSite site = ((MultiEditor) part)
            .getActiveEditor().getSite();
        if (site instanceof PartSite) {
          ref = ((PartSite) site).getPane().getPartReference();
        }
      }
View Full Code Here

    if (ref != null) {
      IWorkbenchPart part = ref.getPart(true);
      Assert.isNotNull(part);
      if (part instanceof MultiEditor) {
        IWorkbenchPartSite site = ((MultiEditor) part)
            .getActiveEditor().getSite();
        if (site instanceof PartSite) {
          ref = (IEditorReference) ((PartSite) site).getPane()
              .getPartReference();
        }
View Full Code Here

        propChangeListeners.remove(listener);
    }

    public final String getId() {
        if (part != null) {
            IWorkbenchPartSite site = part.getSite();
            if (site != null) {
        return site.getId();
      }
        }
        return Util.safeString(id);
    }
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.