|
TPTP 4.4.0 Testing Tools Project Internal API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.tptp.test.auto.gui.internal.macro.AbstractMacroInstruction
org.eclipse.tptp.test.auto.gui.internal.commands.AbstractMacroCommand
An abstract implementation of IMacroCommand. Contributors can subclass this
class or provide a direct implementation of IMacroCommand.
| Field Summary | |
|---|---|
protected static int |
DESCRIPTIVE_FIELD_BOUND
The bound for the value of descriptive fields |
| Constructor Summary | |
|---|---|
AbstractMacroCommand(MacroCommandShell parent,
WidgetIdentifier widgetId)
Constructor |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
protected void |
findDescriptiveField(java.lang.Object[] objects)
Similar to initializeDescriptiveField(Widget), but the descriptive field is a comma-separated string of all the descriptive fields that corresponds to the objects passed in. |
protected void |
findDescriptiveField(org.eclipse.swt.widgets.Widget widget)
Initializes the descriptive field of this command based on the value returned by the getText() method of the widget (if it has one) |
java.lang.String |
getDescriptiveField()
Returns the descriptive field of this command. |
protected java.lang.String |
getObjectClassName(java.lang.Object object)
Returns the class name of the object passed in (excluding the package name) This is useful for adding a descriptive field to the command |
MacroCommandShell |
getParent()
Returns the parent of this command. |
protected java.lang.String |
getText(java.lang.Object obj)
|
long |
getTimeDifference()
|
boolean |
isRepeatRedundant()
Should return false if executing this command just after it has already been executed will have a different output. |
void |
load(org.w3c.dom.Node node,
java.util.Hashtable lineTable)
Invoked to load the macro instruction based on its corresponding XML node. |
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. |
void |
setDescriptiveField(java.lang.String descriptiveField)
Set the descriptive field of this command. |
void |
setParent(MacroCommandShell parent)
Sets the parent of this command. |
void |
setTimeDifference(long timeDifference)
|
java.lang.String |
toString()
|
void |
write(int indent,
java.lang.StringBuffer sb)
Equivalent to write(indent, writer, false, false) |
void |
write(int indent,
java.lang.StringBuffer sb,
boolean close,
boolean end)
Writes the common fiels of this command |
void |
writeFinish(int indent,
java.lang.StringBuffer writer)
Invoked in the end of the write of a writable object |
void |
writeStart(int indent,
java.lang.StringBuffer writer)
This is our chance to write any artificial wait commands if the option is enabled. |
| Methods inherited from class org.eclipse.tptp.test.auto.gui.internal.macro.AbstractMacroInstruction |
|---|
bindSourceLocation, getCorrespondingObject, 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.commands.IMacroCommand |
|---|
getType, processEvent |
| Methods inherited from interface org.eclipse.tptp.test.auto.gui.internal.core.IMacroInstruction |
|---|
getCorrespondingObject, getStartLine, getStopLine, getWidgetId, setCorrespondingObject, setWidgetId |
| Methods inherited from interface org.eclipse.tptp.test.auto.gui.internal.core.IPlayable |
|---|
playback |
| Field Detail |
protected static final int DESCRIPTIVE_FIELD_BOUND
| Constructor Detail |
public AbstractMacroCommand(MacroCommandShell parent,
WidgetIdentifier widgetId)
parent - The parent command shellwidgetId - The associated widget id| Method Detail |
public void load(org.w3c.dom.Node node,
java.util.Hashtable lineTable)
throws org.eclipse.core.runtime.CoreException
IMacroInstruction
load in interface IMacroInstructionload in class AbstractMacroInstructionorg.eclipse.core.runtime.CoreExceptionIMacroInstruction.load(org.w3c.dom.Node, java.util.Hashtable)public boolean mergeEvent(org.eclipse.swt.widgets.Event e)
IMacroCommand
mergeEvent in interface IMacroCommandpublic java.lang.String getDescriptiveField()
getDescriptiveField in interface IMacroCommandpublic void setDescriptiveField(java.lang.String descriptiveField)
setDescriptiveField in interface IMacroCommanddescriptiveField - The descriptive field (can be a button's text, a tree
item label, or etc...)protected void findDescriptiveField(org.eclipse.swt.widgets.Widget widget)
widget - The widgetprotected void findDescriptiveField(java.lang.Object[] objects)
objects - The objectsprotected java.lang.String getText(java.lang.Object obj)
public java.lang.String toString()
public boolean equals(java.lang.Object obj)
public MacroCommandShell getParent()
IMacroCommand
getParent in interface IMacroCommandpublic void setParent(MacroCommandShell parent)
IMacroCommand
setParent in interface IMacroCommandparent - The parentpublic boolean isRepeatRedundant()
isRepeatRedundant in interface IMacroCommand
public void writeStart(int indent,
java.lang.StringBuffer writer)
writeStart in interface IWritableindent - The current indent that the command should be atwriter - The writer used to write the macro
public void write(int indent,
java.lang.StringBuffer sb)
write in interface IWritableindent - The indentssb - The buffer that the string serialization should be written to
public void write(int indent,
java.lang.StringBuffer sb,
boolean close,
boolean end)
indent - The current indent that the command should be atclose - A flag that indicates whether the command fragment should be closed (i.e.adding "/" to the end).end - A flag that indicates whether the command fragment should end (i.e.adding "/" to the end).
public void writeFinish(int indent,
java.lang.StringBuffer writer)
IWritable
writeFinish in interface IWritableindent - The indentswriter - The buffer that the string serialization should be written topublic long getTimeDifference()
public void setTimeDifference(long timeDifference)
protected java.lang.String getObjectClassName(java.lang.Object object)
object - The object
|
TPTP 4.4.0 Testing Tools Project Internal API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||