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.views.tasklist
Class TaskList

    java.lang.Object
      org.eclipse.ui.part.WorkbenchPart
          org.eclipse.ui.part.ViewPart
              org.eclipse.ui.views.tasklist.TaskList

All Implemented Interfaces:
  IAdaptable, IExecutableExtension, IViewPart, IWorkbenchPart, IWorkbenchPart2

public class TaskList
extends ViewPart

Main class for the Task List view for displaying tasks and problem annotations on resources, and for opening an editor on the resource when the user commands.

This standard view has id `"org.eclipse.ui.views.TaskList"`.

The workbench will automatically instantiate this class when a Task List view is needed for a workbench window. This class is not intended to be instantiated or subclassed by clients.

Field Summary

Fields inherited from interface org.eclipse.ui.IWorkbenchPart
`PROP_TITLE`

Constructor Summary
`TaskList()` Creates a new task list view.

Method Summary
`void` | `createPartControl(Composite parent)` Creates the SWT controls for this workbench part.
`void` | `dispose()` Disposes of this workbench part.
`void` | `edit(IMarker marker)` Activates the editor on the given marker.
`Object` | `getAdapter(Class adapter)` Returns an object which is an instance of the given class associated with this object.
`IResource` | `getResource()` Returns the resource for which the task list is showing tasks.
`IResource[]` | `getResources()`
`ISelection` | `getSelection()` API method which returns the current selection.
`void` | `init(IViewSite site, IMemento memento)` Initializes this view with the given view site.
`void` | `saveState(IMemento memento)` Saves the object state within a memento.
`void` | `setFocus()` Asks this part to take focus within the workbench.
`void` | `setSelection(ISelection selection, boolean reveal)` API method which sets the current selection of this viewer.

Methods inherited from class org.eclipse.ui.part.ViewPart
`getViewSite, init, setContentDescription, setInitializationData, setPartName`

Methods inherited from class org.eclipse.ui.part.WorkbenchPart
`addPropertyListener, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getPartName, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.ui.IWorkbenchPart
`addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener`

Constructor Detail

### TaskList

    public TaskList()

  Creates a new task list view.

Method Detail

### createPartControl

    public void createPartControl(Composite parent)

  Description copied from interface: `IWorkbenchPart`
  Creates the SWT controls for this workbench part.

  Clients should not call this method (the workbench calls this method when it needs to, which may be never).

  For implementors this is a multi-step process:

  1. Create one or more controls within the parent.
  2. Set the parent layout as needed.
  3. Register any global actions with the `IActionService`.
  4. Register any popup menus with the `IActionService`.
  5. Register a selection provider with the `ISelectionService` (optional).

  Specified by:
    `createPartControl` in interface `IWorkbenchPart`
  Specified by:
    `createPartControl` in class `WorkbenchPart`

### dispose

    public void dispose()

  Description copied from interface: `IWorkbenchPart`
  Disposes of this workbench part.

  This is the last method called on the `IWorkbenchPart`. At this point the part controls (if they were ever created) have been disposed as part of an SWT composite. There is no guarantee that createPartControl() has been called, so the part controls may never have been created.

  Within this method a part may release any resources, fonts, images, etc. held by this part. It is also very important to deregister all listeners from the workbench.

  Clients should not call this method (the workbench calls this method at appropriate times).

  Specified by:
    `dispose` in interface `IWorkbenchPart`
  Overrides:
    `dispose` in class `WorkbenchPart`

### edit

    public void edit(IMarker marker)

  Activates the editor on the given marker.

### getAdapter

    public Object getAdapter(Class adapter)

  Description copied from interface: `IAdaptable`
  Returns an object which is an instance of the given class associated with this object. Returns `null` if no such object can be found.

  Specified by:
    `getAdapter` in interface `IAdaptable`
  Overrides:
    `getAdapter` in class `WorkbenchPart`

### getResource

    public IResource getResource()

  Returns the resource for which the task list is showing tasks.

  Returns:
    the resource, possibly the workspace root

### getResources

    public IResource[] getResources()

### getSelection

    public ISelection getSelection()

  API method which returns the current selection.

  Returns:
    the current selection (element type: `IMarker`)

### init

    public void init(IViewSite site,
                     IMemento memento)
              throws PartInitException

  Description copied from interface: `IViewPart`
  Initializes this view with the given view site. A memento is passed to the view which contains a snapshot of the views state from a previous session. Where possible, the view should try to recreate that state within the part controls.

  This method is automatically called by the workbench shortly after the part is instantiated. It marks the start of the views's lifecycle. Clients must not call this method.

  Specified by:
    `init` in interface `IViewPart`
  Overrides:
    `init` in class `ViewPart`
  Throws:
    `PartInitException`

### saveState

    public void saveState(IMemento memento)

  Description copied from interface: `IViewPart`
  Saves the object state within a memento.

  Specified by:
    `saveState` in interface `IViewPart`
  Overrides:
    `saveState` in class `ViewPart`

### setFocus

    public void setFocus()

  Description copied from interface: `IWorkbenchPart`
  Asks this part to take focus within the workbench.

  Clients should not call this method (the workbench calls this method at appropriate times). To have the workbench activate a part, use `IWorkbenchPage.activate(IWorkbenchPart) instead`.

  Specified by:
    `setFocus` in interface `IWorkbenchPart`
  Specified by:
    `setFocus` in class `WorkbenchPart`

### setSelection

    public void setSelection(ISelection selection,
                             boolean reveal)

  API method which sets the current selection of this viewer.

  Parameters:
    `selection` - a structured selection of `IMarker` objects
    `reveal` - `true` to reveal the selection, otherwise

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.