public static class TestToolsTest.ExamplePlugInWithFields extends AbstractPlugIn implements ThreadedPlugIn
Configuration: #execute(PlugInContext)
shows a MultiInputDialog
, in which the user can set field values. When the dialog is
closed these values are assigned as execution parameters to the instance fields
#parameter1
and #parameter2
. The dialog is used only within
this method.
Programmatic configuration: Calling #execute(PlugInContext)
can be omitted by providing the execution parameters directly to the instance
fields using TestTools.configurePlugIn(PlugIn, java.util.Map)
.
Execution: All operations take place in #run(TaskMonitor,
PlugInContext)
which uses the execution parameters. To execute operations
without the need of an user dialog use TestTools.executePlugIn(PlugIn,
WorkbenchContext)
after the parameters were configured.
shortcutKeys, shortcutModifiers
Constructor and Description |
---|
TestToolsTest.ExamplePlugInWithFields() |
Modifier and Type | Method and Description |
---|---|
boolean |
execute(PlugInContext context)
Configures plugin.
|
void |
run(TaskMonitor monitor,
PlugInContext context)
Executes operations.
|
addParameter, createName, execute, execute, fetchShortcutEnabledPlugins, getBooleanParam, getDoubleParam, getEnableCheck, getEnableCheck, getIcon, getIcon, getIntegerParam, getName, getParameter, getParameters, getShortcutKeys, getShortcutKeyStroke, getShortcutModifiers, getStringParam, initialize, isRollingBackInvalidEdits, isShortcutEnabled, registerShortcuts, reportNothingToUndoYet, setParameters, setShortcutKeys, setShortcutModifiers, toActionListener, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName, initialize
public TestToolsTest.ExamplePlugInWithFields()
public boolean execute(PlugInContext context) throws java.lang.Exception
execute
in interface PlugIn
execute
in class AbstractPlugIn
java.lang.Exception
- if a problem occurs during plug-in executionThreadedPlugIn
public void run(TaskMonitor monitor, PlugInContext context) throws java.lang.Exception
run
in interface ThreadedPlugIn
monitor
- context to which this task can report its progress and
check whether a party has requested its cancellationjava.lang.Exception