Runtime

org.eclipse.gmf.runtime.common.ui.action
Interface IActionWithProgress

All Known Implementing Classes:
AbstractActionDelegate, AbstractActionHandler, AbstractContributionItem

public interface IActionWithProgress

The interface for all actions that could potentially be run with a progress indicator.


Nested Class Summary
static class IActionWithProgress.WorkIndicatorType
          Enumerated type for work indicator type
 
Method Summary
 java.lang.String getLabel()
          Retrieves the label for this action.
 IActionWithProgress.WorkIndicatorType getWorkIndicatorType()
          Gets type of work indicator (progress monitor, hourglass, or none).
 boolean isRunnable()
          Retrieves a Boolean indicating whether this action can be run.
 void refresh()
          Refreshes various aspects of this action, such as its label and whether or not it is enabled.
 void run(IProgressMonitor progressMonitor)
          Runs this action.
 boolean setup()
          Sets up the action.
 

Method Detail

getLabel

public java.lang.String getLabel()
Retrieves the label for this action.

Returns:
The label for this action.

isRunnable

public boolean isRunnable()
Retrieves a Boolean indicating whether this action can be run.

Returns:
true if this action can be run; false otherwise.

refresh

public void refresh()
Refreshes various aspects of this action, such as its label and whether or not it is enabled.


setup

public boolean setup()
Sets up the action. Should always be called before IActionWithProgress.run(IProgressMonitor) is called.

Returns:
true if the setup completed successfully, false otherwise.

run

public void run(IProgressMonitor progressMonitor)
Runs this action.

Parameters:
progressMonitor - IProgressMonitor monitoring the execution of this action

getWorkIndicatorType

public IActionWithProgress.WorkIndicatorType getWorkIndicatorType()
Gets type of work indicator (progress monitor, hourglass, or none).

Returns:
type of work indicator

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.