Eclipse Platform
Release 3.2

org.eclipse.ui.cheatsheets
Interface ITaskExplorer


public interface ITaskExplorer

Classes that implement this interface are responsible for rendering the hierarchy of tasks in the composite cheat sheet. They must support task selection via the selection provider, be able to accept focus, and create control when asked.


Method Summary
 void createControl(Composite parent, FormToolkit toolkit)
          Create a control which will display the structure of the composite cheat sheet and allow tasks within the composite cheat sheet to be selected.
 void dispose()
          Called after this explorer is no longer in use.
 Control getControl()
          Get the control created by a previous call to createControl
 String getId()
           
 ISelectionProvider getSelectionProvider()
          Get the selection provider for this explorer.
 void setCompositeCheatSheet(ICompositeCheatSheet compositeCheatSheet)
          Sets the composite cheat sheet to be displayed. createControl will already have been called.
 void setFocus()
          Called when the explorer gains focus.
 void setSelection(ISelection selection, boolean reveal)
          Called to set the provided selection and optionally reveal it if the scroll bars are active and the selected tasks are partially or fully hidden.
 void taskUpdated(ICompositeCheatSheetTask task)
          Called when the state of a task changes and the representation of the task may need to be redrawn.
 

Method Detail

getId

public String getId()
Returns:
the id of this TaskExplorer which must match the id used in the extension point

createControl

public void createControl(Composite parent,
                          FormToolkit toolkit)
Create a control which will display the structure of the composite cheat sheet and allow tasks within the composite cheat sheet to be selected.

Parameters:
parent -
toolkit -

getControl

public Control getControl()
Get the control created by a previous call to createControl

Returns:
the task explorer control

setFocus

public void setFocus()
Called when the explorer gains focus.


getSelectionProvider

public ISelectionProvider getSelectionProvider()
Get the selection provider for this explorer. The selections returned by the selection provider should represent IGuideTasks.

Returns:
the selection provider for the task explorer

setCompositeCheatSheet

public void setCompositeCheatSheet(ICompositeCheatSheet compositeCheatSheet)
Sets the composite cheat sheet to be displayed. createControl will already have been called.

Parameters:
compositeCheatSheet -

dispose

public void dispose()
Called after this explorer is no longer in use. Any resources should be disposed of at this point.


taskUpdated

public void taskUpdated(ICompositeCheatSheetTask task)
Called when the state of a task changes and the representation of the task may need to be redrawn.

Parameters:
task -

setSelection

public void setSelection(ISelection selection,
                         boolean reveal)
Called to set the provided selection and optionally reveal it if the scroll bars are active and the selected tasks are partially or fully hidden.

Parameters:
selection - the new selection
reveal - if true, expose the task if hidden; otherwise, just select.

Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

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