TPTP 4.2.0 Testing Tools Project
Public API Specification

org.eclipse.hyades.test.ui.forms.extensions
Interface IEventAction

All Superinterfaces:
org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelectionChangedListener
All Known Implementing Classes:
OpenJavaScriptAction

public interface IEventAction
extends org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelectionChangedListener

This interface defines an action whose status depends on selection changes. Used in extension point "org.eclipse.hyades.test.ui.executionHistoryExtension.actionExtension" for adding actions for execution events in Test Log Viewer.

Since:
4.2
See Also:
point "org.eclipse.hyades.test.ui.executionHistoryExtension"
Provisional API: This API is subject to change in the next release.

Field Summary
 
Fields inherited from interface org.eclipse.jface.action.IAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
 
Method Summary
 void menuAboutToShow(org.eclipse.jface.action.IMenuManager manager)
          If your extension of "org.eclipse.hyades.test.ui.executionHistoryExtension actionExtension" is defined "asContextMenu", this method will be called right before the context menu is about to show.
 boolean updateButtonStatus()
          If your extension of "org.eclipse.hyades.test.ui.executionHistoryExtension actionExtension" is defined "asButton", this method will be called and the return value will be used to set the enable/disable status of the button.
 
Methods inherited from interface org.eclipse.jface.action.IAction
addPropertyChangeListener, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, removePropertyChangeListener, run, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from interface org.eclipse.jface.viewers.ISelectionChangedListener
selectionChanged
 

Method Detail

updateButtonStatus

public boolean updateButtonStatus()
If your extension of "org.eclipse.hyades.test.ui.executionHistoryExtension actionExtension" is defined "asButton", this method will be called and the return value will be used to set the enable/disable status of the button.

Returns:
true if the button of this action should be enabled on current selection, or false otherwise.

menuAboutToShow

public void menuAboutToShow(org.eclipse.jface.action.IMenuManager manager)

If your extension of "org.eclipse.hyades.test.ui.executionHistoryExtension actionExtension" is defined "asContextMenu", this method will be called right before the context menu is about to show. Because the context menu will be dynamically built every time based on the current selection, the extension implementing class should decide whether to add this action to the context menu. To add, simply do:
manager.add(this);
The enablement state of this action isEnabled() decides whether the menu item is enabled or not.


TPTP 4.2.0 Testing Tools Project
Public API Specification