Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 interface is not intended to be implemented by clients.

See Also:
  `IWorkbenchPage`

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

    public void addPartListener(IPartListener listener)

  Adds the given listener for part lifecycle events. Has no effect if an identical listener is already registered.

  Parameters:
    `listener` - a part listener

### addPartListener

    public void addPartListener(IPartListener2 listener)

  Adds the given listener for part lifecycle events. Has no effect if an identical listener is already registered.

  Parameters:
    `listener` - a part listener

### getActivePart

    public IWorkbenchPart getActivePart()

  Returns the active part.

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

### getActivePartReference

    public IWorkbenchPartReference getActivePartReference()

  Returns the active part reference.

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

### removePartListener

    public 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

    public void removePartListener(IPartListener2 listener)

  Removes the given part listener. Has no affect if an identical listener is not registered.

  Parameters:
    `listener` - a part listener

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.