Package org.eclipse.ui

Examples of org.eclipse.ui.IWorkbenchPart


       
        int refCount = getViewFactory().getReferenceCount(ref);
        SaveablesList saveablesList = null;
        Object postCloseInfo = null;
        if (refCount == 1) {
          IWorkbenchPart actualPart = ref.getPart(false);
          if (actualPart != null) {
        saveablesList = (SaveablesList) actualPart
            .getSite().getService(ISaveablesLifecycleListener.class);
        postCloseInfo = saveablesList.preCloseParts(Collections
            .singletonList(actualPart), !promptedForSave, this
            .getWorkbenchWindow());
        if (postCloseInfo==null) {
View Full Code Here


            if (persp != null) {
        persp.partActivated(newPart);
      }

            // Deactivate old part
            IWorkbenchPart oldPart = getActivePart();
            if (oldPart != null) {
                deactivatePart(oldPart);
            }
           
            // Set active part.
View Full Code Here

                }
            });
        } finally {
            getClientComposite().setRedraw(true);
            mgr.getControl2().setRedraw(true);
            IWorkbenchPart part = getActivePart();
            if (part != null) {
        part.setFocus();
      }
        }
    }
View Full Code Here

        Perspective persp = getActivePerspective();
        if (persp != null) {
            persp.toggleFastView(ref);
            // if the fast view has been deactivated
            if (ref != persp.getActiveFastView()) {
                IWorkbenchPart previouslyActive = activationList
                        .getPreviouslyActive();
                IEditorPart activeEditor = getActiveEditor();
                if (activeEditor != null
                        && previouslyActive instanceof IEditorPart) {
          setActivePart(activeEditor);
View Full Code Here

    List result = new ArrayList();
   
    for (int i = 0; i < refs.length; i++) {
      IWorkbenchPartReference reference = refs[i];
     
      IWorkbenchPart part = reference.getPart(false);
      if (part != null) {
        result.add(reference);
      }
    }
   
View Full Code Here

   
  }
   
    public boolean isPartVisible(IWorkbenchPartReference reference) {       
        IWorkbenchPart part = reference.getPart(false);
        // Can't be visible if it isn't created yet
        if (part == null) {
            return false;
        }
       
View Full Code Here

        void add(IWorkbenchPartReference ref) {
            if (parts.indexOf(ref) >= 0) {
        return;
      }

            IWorkbenchPart part = ref.getPart(false);
            if (part != null) {
                PartPane pane = ((PartSite) part.getSite()).getPane();
                if (pane instanceof MultiEditorInnerPane) {
                    MultiEditorInnerPane innerPane = (MultiEditorInnerPane) pane;
                    add(innerPane.getParentPane().getPartReference());
                    return;
                }
View Full Code Here

        final IWorkbenchPart[] parts = saveablesList
            .getPartsForSaveable(model);

        // this will cause the parts tabs to show the ongoing background operation
        for (int i = 0; i < parts.length; i++) {
          IWorkbenchPart workbenchPart = parts[i];
          IWorkbenchSiteProgressService progressService = (IWorkbenchSiteProgressService) workbenchPart
              .getSite().getAdapter(
                  IWorkbenchSiteProgressService.class);
          progressService.showBusyForFamily(model);
        }
        model.disableUI(parts, blockUntilSaved);
View Full Code Here

  protected IWorkbenchPart getBootstrapPart() {
    IWorkbenchPage page = getSite().getPage();

    if (page != null) {
      // check whether the active part is important to us
      IWorkbenchPart activePart = page.getActivePart();
      if (activePart != null && isImportant(activePart)) {
        return activePart;
      }
    }
    return null;
View Full Code Here

    }


    private IEntryEditor getEntryEditor( IWorkbenchPartReference partRef )
    {
        IWorkbenchPart part = partRef.getPart( false );
        if ( part != null && part instanceof IEntryEditor )
        {
            IEntryEditor entryEditor = ( IEntryEditor ) part;
            return entryEditor;
        }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IWorkbenchPart

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.