|
IBM Rational Performance Tester SDK | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
org.eclipse.jface.action.Action
com.ibm.rational.test.lt.recorder.ui.actions.AbstractAnnotationAction
public abstract class AbstractAnnotationAction
This abstract class can be extended by clients to define an action that adds a new
annotation to a recording session. The action may appear at several places in the recording
framework UI. Both a label and an image are required on the action. Annotation actions
must be declared using the extension point
com.ibm.rational.test.lt.recorder.ui.annotationContribution. Implementations
must implement Action.run(), and may override AbstractAnnotationAction.canEmitAnnotation().
| 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 |
| Constructor Summary | |
|---|---|
AbstractAnnotationAction(String text,
ImageDescriptor image)
Instantiates a new annotation action. |
|
AbstractAnnotationAction(String text,
int hotkeyModifier,
int hotkeyValue)
Instantiates a new annotation action. |
|
| Method Summary | |
|---|---|
protected boolean |
canEmitAnnotation()
Determines whether an annotation can be emitted at this time. |
void |
dispose()
Disposes any control/resource allocated by this action. |
IRecorder |
getAnnotationRecorder()
Returns the annotation recorder where any annotation emitted by this action should be sent. |
protected IAnnotationStateHandler |
getAnnotationStateHandler(String annotationType)
Returns the state handler for the specified annotation type. |
Shell |
getShell()
Returns the shell that should be used as parent shell to any new window created by the action. |
protected void |
recorderChanged()
Allows the action to initialize its state once it is connected to the annotation recorder. |
void |
registerHotkey()
Register the associated system-level hotkey if non-zero |
void |
setAnnotationRecorder(IRecorder recorder)
Sets the annotation recorder where any annotation emitted by this action should be sent. |
void |
setShell(Shell shell)
Sets the shell that should be used as parent shell to any new window created by the action. |
void |
unregisterHotkey()
Unregister the associated system-level hotkey if non-zero |
void |
update()
Updates the enablement of this action. |
| Methods inherited from class org.eclipse.jface.action.AbstractAction |
|---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener |
| Methods inherited from class org.eclipse.core.commands.common.EventManager |
|---|
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.jface.action.IAction |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Constructor Detail |
|---|
public AbstractAnnotationAction(String text,
int hotkeyModifier,
int hotkeyValue)
text - The action label.hotkeyModifier - The bitwise combination of modifiershotkeyValue - The hotkey value. 0 means none.
public AbstractAnnotationAction(String text,
ImageDescriptor image)
text - The action label.image - The action icon.| Method Detail |
|---|
public Shell getShell()
AbstractAnnotationAction.setShell(Shell).
public void setShell(Shell shell)
AbstractAnnotationAction.getShell().
public IRecorder getAnnotationRecorder()
AbstractAnnotationAction.setAnnotationRecorder(IRecorder).
public final void setAnnotationRecorder(IRecorder recorder)
AbstractAnnotationAction.getAnnotationRecorder(). Sub-classes must invoke the super implementation
of this method if it overridden.
recorder - protected void recorderChanged()
protected boolean canEmitAnnotation()
true provided that the annotation recorder is active. Sub-classes must
invoke the super implementation of this method if it overridden.
public void update()
AbstractAnnotationAction.canEmitAnnotation()
and updates enablement accordingly.
protected final IAnnotationStateHandler getAnnotationStateHandler(String annotationType)
throws UnsupportedPropertyException
annotationType - An annotation type
null
if the annotation type has no state handler.
UnsupportedPropertyException - If the annotation type does not exist.public void dispose()
public void registerHotkey()
public void unregisterHotkey()
|
IBM Rational Performance Tester SDK | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||