TPTP 4.4.0 Testing Tools Project
Internal API Specification

org.eclipse.tptp.test.auto.gui.internal.commands
Class StructuredSelectionCommand

java.lang.Object
  extended byorg.eclipse.tptp.test.auto.gui.internal.macro.AbstractMacroInstruction
      extended byorg.eclipse.tptp.test.auto.gui.internal.commands.AbstractMacroCommand
          extended byorg.eclipse.tptp.test.auto.gui.internal.commands.AbstractStructuredCommand
              extended byorg.eclipse.tptp.test.auto.gui.internal.commands.StructuredSelectionCommand
All Implemented Interfaces:
IMacroCommand, IMacroInstruction, IPlayable, IWritable

public class StructuredSelectionCommand
extends AbstractStructuredCommand


Field Summary
static java.lang.String DEFAULT_SELECT
           
static java.lang.String ITEM_SELECT
           
 
Fields inherited from class org.eclipse.tptp.test.auto.gui.internal.commands.AbstractStructuredCommand
items
 
Fields inherited from class org.eclipse.tptp.test.auto.gui.internal.commands.AbstractMacroCommand
DESCRIPTIVE_FIELD_BOUND
 
Constructor Summary
StructuredSelectionCommand(MacroCommandShell parent, WidgetIdentifier wid, java.lang.String type)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Overwrite this method in order to indicate that two item selection commands that have different items are not the same
protected  java.lang.Object[] getItemsForEvent(org.eclipse.swt.widgets.Event event)
          Returns the items that are embedded in the event passed in
 java.lang.String getType()
          Returns the type of this command
 boolean mergeEvent(org.eclipse.swt.widgets.Event e)
          If this command occurs consecutively, then this method gives this command a chance to merge mutliple commands together to reduce the overhead.
protected  void playStructuredCommand(org.eclipse.swt.widgets.Widget widget, java.lang.Object[] matches)
          Used to play the structured command collectively for all the discovered matches.
protected  void playStructuredCommandForFoundMatch(org.eclipse.swt.widgets.Widget widget, java.lang.Object match)
          Some events require to be played as matches are discovered.
 
Methods inherited from class org.eclipse.tptp.test.auto.gui.internal.commands.AbstractStructuredCommand
findMatches, findObjectId, getCorrespondingObject, getItemAttributes, getItems, load, playback, processEvent, write, writeAdditionalAttributes
 
Methods inherited from class org.eclipse.tptp.test.auto.gui.internal.commands.AbstractMacroCommand
findDescriptiveField, findDescriptiveField, getDescriptiveField, getObjectClassName, getParent, getText, getTimeDifference, isRepeatRedundant, setDescriptiveField, setParent, setTimeDifference, toString, write, writeFinish, writeStart
 
Methods inherited from class org.eclipse.tptp.test.auto.gui.internal.macro.AbstractMacroInstruction
bindSourceLocation, getStartLine, getStopLine, getWidgetId, setCorrespondingObject, setWidgetId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.tptp.test.auto.gui.internal.core.IMacroInstruction
getStartLine, getStopLine, getWidgetId, setCorrespondingObject, setWidgetId
 

Field Detail

DEFAULT_SELECT

public static final java.lang.String DEFAULT_SELECT
See Also:
Constant Field Values

ITEM_SELECT

public static final java.lang.String ITEM_SELECT
See Also:
Constant Field Values
Constructor Detail

StructuredSelectionCommand

public StructuredSelectionCommand(MacroCommandShell parent,
                                  WidgetIdentifier wid,
                                  java.lang.String type)
Method Detail

mergeEvent

public boolean mergeEvent(org.eclipse.swt.widgets.Event e)
Description copied from interface: IMacroCommand
If this command occurs consecutively, then this method gives this command a chance to merge mutliple commands together to reduce the overhead.

Specified by:
mergeEvent in interface IMacroCommand
Overrides:
mergeEvent in class AbstractStructuredCommand
See Also:
AbstractMacroCommand.mergeEvent(org.eclipse.swt.widgets.Event)

getType

public java.lang.String getType()
Description copied from interface: IMacroCommand
Returns the type of this command

Returns:
The type

getItemsForEvent

protected java.lang.Object[] getItemsForEvent(org.eclipse.swt.widgets.Event event)
Description copied from class: AbstractStructuredCommand
Returns the items that are embedded in the event passed in

Overrides:
getItemsForEvent in class AbstractStructuredCommand
Parameters:
event - The event
Returns:
The items of the event

playStructuredCommand

protected void playStructuredCommand(org.eclipse.swt.widgets.Widget widget,
                                     java.lang.Object[] matches)
Description copied from class: AbstractStructuredCommand
Used to play the structured command collectively for all the discovered matches.

Specified by:
playStructuredCommand in class AbstractStructuredCommand
Parameters:
widget - The widget
matches - The matches discovered

equals

public boolean equals(java.lang.Object obj)
Overwrite this method in order to indicate that two item selection commands that have different items are not the same

Overrides:
equals in class AbstractStructuredCommand

playStructuredCommandForFoundMatch

protected void playStructuredCommandForFoundMatch(org.eclipse.swt.widgets.Widget widget,
                                                  java.lang.Object match)
Description copied from class: AbstractStructuredCommand
Some events require to be played as matches are discovered. (e.g. an expansion command requires to be played for each discovered item in order for successive children to be found) It's recommended that either playStructuredCommandForFoundMatch or playStructuredCommand be implemented by clients, eventhough both methods will be invoked.

Specified by:
playStructuredCommandForFoundMatch in class AbstractStructuredCommand
Parameters:
widget - The widget

TPTP 4.4.0 Testing Tools Project
Internal API Specification