public class ScriptEditor extends java.lang.Object implements java.awt.event.ActionListener, Resolver, EditorConstants
Acts as a resolver, using the currently in-context script as the component resolver.
| Modifier and Type | Field and Description |
|---|---|
static int |
KC_INVERT
Key to use to invert an assertion/wait.
|
static int |
KC_WAIT
Key to use to insert a wait instead of an assertion.
|
ACTION_CAPTURE, ACTION_CAPTURE_ALL, ACTION_CAPTURE_COMPONENT, ACTION_CAPTURE_FOCUSED_COMPONENT, ACTION_CAPTURE_IMAGE, ACTION_DYNAMIC, ACTION_EDITOR_ABOUT, ACTION_EDITOR_BUGREPORT, ACTION_EDITOR_EMAIL, ACTION_EDITOR_QUIT, ACTION_EDITOR_USERGUIDE, ACTION_EDITOR_WEBSITE, ACTION_EXPORT_HIERARCHY, ACTION_GET_VMARGS, ACTION_INSERT_ANNOTATION, ACTION_INSERT_APPLET, ACTION_INSERT_CALL, ACTION_INSERT_COMMENT, ACTION_INSERT_EXPRESSION, ACTION_INSERT_FIXTURE, ACTION_INSERT_LAUNCH, ACTION_INSERT_SAMPLE, ACTION_INSERT_SCRIPT, ACTION_INSERT_SEQUENCE, ACTION_INSERT_TERMINATE, ACTION_PREFIX, ACTION_RUN, ACTION_RUN_LAUNCH, ACTION_RUN_SELECTED, ACTION_RUN_TERMINATE, ACTION_RUN_TO, ACTION_SCRIPT_CLEAR, ACTION_SCRIPT_CLOSE, ACTION_SCRIPT_DELETE, ACTION_SCRIPT_DUPLICATE, ACTION_SCRIPT_NEW, ACTION_SCRIPT_OPEN, ACTION_SCRIPT_RENAME, ACTION_SCRIPT_SAVE, ACTION_SCRIPT_SAVE_AS, ACTION_SELECT_COMPONENT, ACTION_SELECT_FOCUSED_COMPONENT, ACTION_SELECT_TESTSUITE, ACTION_STEP_COPY, ACTION_STEP_CUT, ACTION_STEP_DELETE, ACTION_STEP_GROUP, ACTION_STEP_MOVE_DOWN, ACTION_STEP_MOVE_UP, ACTION_STEP_PASTE, ACTION_TOGGLE_AWT_MODE, ACTION_TOGGLE_FORKED, ACTION_TOGGLE_SLOW_PLAYBACK, ACTION_TOGGLE_STOP_ON_ERROR, ACTION_TOGGLE_STOP_ON_FAILURE, MENU_CAPTURE, MENU_EDIT, MENU_FILE, MENU_HELP, MENU_INSERT, MENU_TEST| Constructor and Description |
|---|
ScriptEditor(EditorContext ec)
Constructs a ScriptEditor which handles script editing logic.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent ev)
Respond to various components.
|
ComponentReference |
addComponent(java.awt.Component comp)
From abbot.Resolver.
|
void |
addComponentReference(ComponentReference ref)
From abbot.Resolver.
|
(package private) void |
addStep(Step step)
Insert a new step at the current cursor location.
|
protected boolean |
checkSaveBeforeClose() |
void |
copyFixture(Script src)
Copy the fixture from the given script into the current one.
|
(package private) void |
dispose() |
java.lang.String |
getComponentID(java.awt.Component comp)
Returns null if not found.
|
ComponentReference |
getComponentReference(java.awt.Component comp)
From abbot.Resolver.
|
ComponentReference |
getComponentReference(java.lang.String refid)
From abbot.Resolver.
|
java.util.Collection |
getComponentReferences()
From abbot.Resolver.
|
java.lang.String |
getContext(Step step)
From abbot.Resolver.
|
java.lang.ClassLoader |
getContextClassLoader()
From abbot.Resolver.
|
java.io.File |
getDirectory()
From abbot.Resolver.
|
Hierarchy |
getHierarchy()
Get Hierarchy used by this Resolver.
|
java.lang.Object |
getProperty(java.lang.String name)
From abbot.Resolver.
|
(package private) Resolver |
getResolverContext() |
(package private) void |
insertApplet()
Insert an applet step.
|
(package private) void |
insertLaunch()
Insert a launch step.
|
(package private) void |
insertTerminate()
Insert a terminate step.
|
static void |
main(java.lang.String[] args)
Launch the script editor, with an argument of either a test suite
class or a script filename.
|
(package private) void |
newScript(java.io.File file,
boolean copyFixture)
Create a new script at the given filename, or open it if it already
exists.
|
(package private) void |
openScript(java.io.File file)
Perform the actual open operation
|
(package private) void |
quitApplication()
Quit the application.
|
(package private) void |
saveNestedScripts(Sequence seq) |
void |
setProperty(java.lang.String name,
java.lang.Object value)
From abbot.Resolver.
|
(package private) void |
setScript(java.lang.String filename)
Set the current test script.
|
void |
setStatus(java.lang.String msg)
Set the contents of the status message.
|
void |
setStatus(java.lang.String msg,
java.lang.String extended,
int type)
Set the contents of the status message.
|
static void |
showEditor(EditorContext ec)
Launch the script editor, with an argument that represents a variety
of editor customizations.
|
java.lang.String |
toString() |
public static final int KC_INVERT
public static final int KC_WAIT
public ScriptEditor(EditorContext ec)
ScriptEditorFramepublic void actionPerformed(java.awt.event.ActionEvent ev)
actionPerformed in interface java.awt.event.ActionListenervoid insertLaunch()
void insertApplet()
void insertTerminate()
void setScript(java.lang.String filename)
protected boolean checkSaveBeforeClose()
void quitApplication()
public void setStatus(java.lang.String msg)
public void setStatus(java.lang.String msg,
java.lang.String extended,
int type)
public java.lang.String getComponentID(java.awt.Component comp)
void addStep(Step step)
void newScript(java.io.File file,
boolean copyFixture)
public void copyFixture(Script src)
void openScript(java.io.File file)
void saveNestedScripts(Sequence seq) throws java.io.IOException
java.io.IOExceptionResolver getResolverContext()
public ComponentReference getComponentReference(java.lang.String refid)
getComponentReference in interface Resolverpublic ComponentReference getComponentReference(java.awt.Component comp)
getComponentReference in interface Resolverpublic void addComponentReference(ComponentReference ref)
addComponentReference in interface Resolverpublic ComponentReference addComponent(java.awt.Component comp)
addComponent in interface Resolverpublic java.util.Collection getComponentReferences()
getComponentReferences in interface Resolverpublic java.lang.String getContext(Step step)
getContext in interface Resolverpublic java.io.File getDirectory()
getDirectory in interface Resolverpublic void setProperty(java.lang.String name,
java.lang.Object value)
setProperty in interface Resolverpublic java.lang.Object getProperty(java.lang.String name)
getProperty in interface Resolverpublic java.lang.ClassLoader getContextClassLoader()
getContextClassLoader in interface Resolverpublic Hierarchy getHierarchy()
ResolvergetHierarchy in interface Resolverpublic java.lang.String toString()
toString in class java.lang.Objectvoid dispose()
public static void main(java.lang.String[] args)
public static void showEditor(EditorContext ec)
Abbot is hosted on