public class ScriptEditor extends Object implements 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(ActionEvent ev)
Respond to various components.
|
ComponentReference |
addComponent(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() |
String |
getComponentID(Component comp)
Returns null if not found.
|
ComponentReference |
getComponentReference(Component comp)
From abbot.Resolver.
|
ComponentReference |
getComponentReference(String refid)
From abbot.Resolver.
|
Collection |
getComponentReferences()
From abbot.Resolver.
|
String |
getContext(Step step)
From abbot.Resolver.
|
ClassLoader |
getContextClassLoader()
From abbot.Resolver.
|
File |
getDirectory()
From abbot.Resolver.
|
Hierarchy |
getHierarchy()
Get Hierarchy used by this Resolver.
|
Object |
getProperty(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(String[] args)
Launch the script editor, with an argument of either a test suite
class or a script filename.
|
(package private) void |
newScript(File file,
boolean copyFixture)
Create a new script at the given filename, or open it if it already
exists.
|
(package private) void |
openScript(File file)
Perform the actual open operation
|
(package private) void |
quitApplication()
Quit the application.
|
(package private) void |
saveNestedScripts(Sequence seq) |
void |
setProperty(String name,
Object value)
From abbot.Resolver.
|
(package private) void |
setScript(String filename)
Set the current test script.
|
void |
setStatus(String msg)
Set the contents of the status message.
|
void |
setStatus(String msg,
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.
|
String |
toString() |
public static final int KC_INVERT
public static final int KC_WAIT
public ScriptEditor(EditorContext ec)
ScriptEditorFrame
public void actionPerformed(ActionEvent ev)
actionPerformed
in interface ActionListener
void insertLaunch()
void insertApplet()
void insertTerminate()
void setScript(String filename)
protected boolean checkSaveBeforeClose()
void quitApplication()
public void setStatus(String msg)
public void setStatus(String msg, String extended, int type)
void addStep(Step step)
void newScript(File file, boolean copyFixture)
public void copyFixture(Script src)
void openScript(File file)
void saveNestedScripts(Sequence seq) throws IOException
IOException
Resolver getResolverContext()
public ComponentReference getComponentReference(String refid)
getComponentReference
in interface Resolver
public ComponentReference getComponentReference(Component comp)
getComponentReference
in interface Resolver
public void addComponentReference(ComponentReference ref)
addComponentReference
in interface Resolver
public ComponentReference addComponent(Component comp)
addComponent
in interface Resolver
public Collection getComponentReferences()
getComponentReferences
in interface Resolver
public String getContext(Step step)
getContext
in interface Resolver
public File getDirectory()
getDirectory
in interface Resolver
public void setProperty(String name, Object value)
setProperty
in interface Resolver
public Object getProperty(String name)
getProperty
in interface Resolver
public ClassLoader getContextClassLoader()
getContextClassLoader
in interface Resolver
public Hierarchy getHierarchy()
Resolver
getHierarchy
in interface Resolver
void dispose()
public static void main(String[] args)
public static void showEditor(EditorContext ec)
Abbot is hosted on