Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui
Interface IPartService

All Known Subinterfaces:
IWorkbenchPage

public interface IPartService

A part service tracks the creation and activation of parts within a workbench page.

This service can be acquired from your service locator:

        IPartService service = (IPartService) getSite().getService(IPartService.class);
 
  • This service is not available globally, only from the workbench window level down.

See Also:
IWorkbenchPage, IServiceLocator.getService(Class)
Restriction:
This interface is not intended to be implemented by clients.

Method Summary
 void addPartListener ( IPartListener listener)
          Adds the given listener for part lifecycle events.
 void addPartListener ( IPartListener2 listener)
          Adds the given listener for part lifecycle events.
  IWorkbenchPart getActivePart ()
          Returns the active part.
  IWorkbenchPartReference getActivePartReference ()
          Returns the active part reference.
 void removePartListener ( IPartListener listener)
          Removes the given part listener.
 void removePartListener ( IPartListener2 listener)
          Removes the given part listener.
 

Method Detail

addPartListener

void addPartListener(
IPartListener listener)
Adds the given listener for part lifecycle events. Has no effect if an identical listener is already registered.

Note: listeners should be removed when no longer necessary. If not, they will be removed when the IServiceLocator used to acquire this service is disposed.

Parameters:
listener - a part listener
See Also:
removePartListener(IPartListener)

addPartListener

void addPartListener(
IPartListener2 listener)
Adds the given listener for part lifecycle events. Has no effect if an identical listener is already registered.

As of 3.5, the IPartListener2 can also implement IPageChangedListener to be notified about any parts that implement IPageChangeProvider and post PageChangedEvents.

Note: listeners should be removed when no longer necessary. If not, they will be removed when the IServiceLocator used to acquire this service is disposed.

Parameters:
listener - a part listener
See Also:
removePartListener(IPartListener2), IPageChangeProvider, IPageChangedListener

getActivePart


IWorkbenchPart getActivePart()
Returns the active part.

Returns:
the active part, or null if no part is currently active

getActivePartReference


IWorkbenchPartReference getActivePartReference()
Returns the active part reference.

Returns:
the active part reference, or null if no part is currently active

removePartListener

void removePartListener(
IPartListener listener)
Removes the given part listener. Has no affect if an identical listener is not registered.

Parameters:
listener - a part listener

removePartListener

void removePartListener(
IPartListener2 listener)
Removes the given part listener. Has no affect if an identical listener is not registered.

Parameters:
listener - a part listener

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire