Package org.eclipse.ui

Examples of org.eclipse.ui.IWorkbenchPart


    /**
     * @param ref
     */
    private void firePartActivated(IWorkbenchPartReference ref) {
        IWorkbenchPart part = ref.getPart(false);
        if(part != null) {
            UIListenerLogging.logPartListenerEvent(debugListenersKey, this, part, UIListenerLogging.PE_ACTIVATED);
            listeners.firePartActivated(part);
        }
       
View Full Code Here


   
    /**
     * @param ref
     */
    public void firePartBroughtToTop(IWorkbenchPartReference ref) {
        IWorkbenchPart part = ref.getPart(false);
        if(part != null) {
            UIListenerLogging.logPartListenerEvent(debugListenersKey, this, part, UIListenerLogging.PE_PART_BROUGHT_TO_TOP);
            listeners.firePartBroughtToTop(part);
        }
        UIListenerLogging.logPartListener2Event(debugListeners2Key, this, ref, UIListenerLogging.PE2_PART_BROUGHT_TO_TOP);
View Full Code Here

   
    /**
     * @param ref
     */
    public void firePartClosed(IWorkbenchPartReference ref) {
        IWorkbenchPart part = ref.getPart(false);
        if(part != null) {
            UIListenerLogging.logPartListenerEvent(debugListenersKey, this, part, UIListenerLogging.PE_PART_CLOSED);
            listeners.firePartClosed(part);
        }
        UIListenerLogging.logPartListener2Event(debugListeners2Key, this, ref, UIListenerLogging.PE2_PART_CLOSED);
View Full Code Here

   
    /**
     * @param ref
     */
    private void firePartDeactivated(IWorkbenchPartReference ref) {
        IWorkbenchPart part = ref.getPart(false);
        if(part != null) {
            UIListenerLogging.logPartListenerEvent(debugListenersKey, this, part, UIListenerLogging.PE_PART_DEACTIVATED);
            listeners.firePartDeactivated(part);
        }
        UIListenerLogging.logPartListener2Event(debugListeners2Key, this, ref, UIListenerLogging.PE2_PART_DEACTIVATED);
View Full Code Here

   
    /**
     * @param ref
     */
    public void firePartOpened(IWorkbenchPartReference ref) { 
        IWorkbenchPart part = ref.getPart(false);
        if(part != null) {
            UIListenerLogging.logPartListenerEvent(debugListenersKey, this, part, UIListenerLogging.PE_PART_OPENED);
            listeners.firePartOpened(part);
        }
        UIListenerLogging.logPartListener2Event(debugListeners2Key, this, ref, UIListenerLogging.PE2_PART_OPENED);
View Full Code Here

     */
    private void makeActive(IWorkbenchPartReference ref) {
        if (ref == null) {
            setActivePart(null);
        } else {
            IWorkbenchPart newActive = ref.getPart(true);
            if (newActive == null) {
                setActivePart(null);
            } else {
                activate(newActive);
            }
View Full Code Here

    // disposed. Collect all the views on the page and notify the
    // saveable list of a pre/post close. This will free model data.
    IWorkbenchPartReference[] partsToClose = getOpenParts();
    List dirtyParts = new ArrayList(partsToClose.length);
    for (int i = 0; i < partsToClose.length; i++) {
      IWorkbenchPart part = partsToClose[i].getPart(false);
      if (part != null && part instanceof IViewPart) {
        dirtyParts.add(part);
      }
    }
    SaveablesList saveablesList = (SaveablesList) getWorkbenchWindow().getWorkbench().getService(ISaveablesLifecycleListener.class);
View Full Code Here

        Display d = getWorkbenchWindow().getShell().getDisplay();
        //Must be backward compatible.
        d.syncExec(new Runnable() {
            public void run() {
                for (int i = 0; i < refs.length; i++) {
                    IWorkbenchPart part = refs[i].getPart(true);
                    if (part != null) {
            result.add(part);
          }
                }
            }
View Full Code Here

        List result = new ArrayList(3);
        IWorkbenchPartReference[] allParts = getAllParts();
        for (int i = 0; i < allParts.length; i++) {
            IWorkbenchPartReference reference = allParts[i];
           
            IWorkbenchPart part = reference.getPart(false);
            if (part != null && part instanceof ISaveablePart) {
                ISaveablePart saveable = (ISaveablePart)part;
                if (saveable.isDirty()) {
                    result.add(saveable);
                }
View Full Code Here

   
        if (persp != null) {
            IViewReference refs[] = persp.getViewReferences();
            ArrayList parts = new ArrayList(refs.length);
            for (int i = 0; i < refs.length; i++) {
                IWorkbenchPart part = refs[i].getPart(restore);
                if (part != null) {
          parts.add(part);
        }
            }
            IViewPart[] result = new IViewPart[parts.size()];
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.