Eclipse Platform
Release 3.2

org.eclipse.ui.cheatsheets
Interface ICompositeCheatSheetTask


public interface ICompositeCheatSheetTask

A task within a composite cheat sheet.

This interface is not intended to be implemented by clients.

Since:
3.2

Field Summary
static int COMPLETED
          The constant that indicates that the task has been completed.
static int IN_PROGRESS
          The constant that indicates that the task is in progress.
static int NOT_STARTED
          The constant that indicates that the task has not been processed yet.
 
Method Summary
 void advanceState()
          Advance the state of this task
 String getCompletionMessage()
          Gets the text to be displayed when this task is completed
 String getDescription()
          Returns the description of the task.
 String getId()
           
 URL getInputUrl(String path)
          Gets a URL which can be used to open the content file for this task if the content file can be specified by a path relative to the content file for the composite cheat sheet which contains it.
 String getKind()
          Returns the kind of the task editor.
 String getName()
           
 Dictionary getParameters()
          The task parameters are used to configure the task editor with data meaningful to an editor of this kind.
 int getPercentageComplete()
          Returns the percentage of this task that has been completed.
 ICompositeCheatSheetTask[] getRequiredTasks()
          get the tasks which are required to be completed before this task is started.
 int getState()
          Get the state of this task
 IPath getStateLocation()
          Gets a location where the state for this task can be saved.
 ICompositeCheatSheetTask[] getSubtasks()
          Returns an array of subtasks that are children of this task.
 boolean isStartable()
          Determine whether this task can be started.
 void setPercentageComplete(int percentageComplete)
          Set the percentage of the task that has been completed
 

Field Detail

NOT_STARTED

public static final int NOT_STARTED
The constant that indicates that the task has not been processed yet.

See Also:
Constant Field Values

IN_PROGRESS

public static final int IN_PROGRESS
The constant that indicates that the task is in progress.

See Also:
Constant Field Values

COMPLETED

public static final int COMPLETED
The constant that indicates that the task has been completed.

See Also:
Constant Field Values
Method Detail

getId

public String getId()
Returns:
the unique identifier of this task.

getName

public String getName()
Returns:
the translatable name of the task.

getKind

public String getKind()
Returns the kind of the task editor. Tasks without editor kind are 'informational' tasks because they cannot be 'completed'.

Returns:
task editor kind or null if no editor is assoticated with this task.

getParameters

public Dictionary getParameters()
The task parameters are used to configure the task editor with data meaningful to an editor of this kind.

Returns:
the parameter names and values as specified in the composite cheatsheet content file.

getDescription

public String getDescription()
Returns the description of the task.

Returns:
a plain String, or XML markup that can be understood by FormText widget.
See Also:
FormText

getSubtasks

public ICompositeCheatSheetTask[] getSubtasks()
Returns an array of subtasks that are children of this task. The array will be empty if this is a leaf task.

Returns:
an array of subtasks for this task

getRequiredTasks

public ICompositeCheatSheetTask[] getRequiredTasks()
get the tasks which are required to be completed before this task is started.

Returns:
an array of tasks that must be completed before this task can be started. The array will be empty if this tasks is independent of other tasks.

getState

public int getState()
Get the state of this task

Returns:
NOT_STARTED, IN_PROGRESS or COMPLETED.

getPercentageComplete

public int getPercentageComplete()
Returns the percentage of this task that has been completed.

Returns:
A task that has not been started yet has '0' as result. A task that has been completed must return '100' as a result. Anything in between represents a task in various stages of completion.

setPercentageComplete

public void setPercentageComplete(int percentageComplete)
Set the percentage of the task that has been completed

Parameters:
percentageComplete - an integer between 0 and 100

advanceState

public void advanceState()
Advance the state of this task


getCompletionMessage

public String getCompletionMessage()
Gets the text to be displayed when this task is completed

Returns:
a plain String, or XML markup that can be understood by FormText widget.
See Also:
FormText

isStartable

public boolean isStartable()
Determine whether this task can be started.

Returns:
true unless this task depends on a required task that has not been completed.

getStateLocation

public IPath getStateLocation()
Gets a location where the state for this task can be saved.

Returns:
the path of a writeable directory on file system where this task can save its state. This will always be a subdirectory of the directory in which the state is stored for the parent composite cheat sheet.

getInputUrl

public URL getInputUrl(String path)
                throws MalformedURLException
Gets a URL which can be used to open the content file for this task if the content file can be specified by a path relative to the content file for the composite cheat sheet which contains it.

Parameters:
path - a relative path
Returns:
a URL which represents a location relative to the location of the content file for the composite cheat sheet.
Throws:
MalformedURLException

Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

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