Package adams.flow.control
Class Breakpoint
-
- All Implemented Interfaces:
AdditionalInformationHandler,CleanUpHandler,Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,ShallowCopySupporter<Actor>,SizeOfHandler,Stoppable,StoppableWithFeedback,VariablesInspectionHandler,VariableChangeListener,BooleanConditionSupporter,Actor,ControlActor,ErrorHandler,InputConsumer,OutputProducer,Serializable,Comparable
public class Breakpoint extends AbstractTransformer implements ControlActor, BooleanConditionSupporter
Allows to pause the execution of the flow when this actor is reached and the condition evaluates to 'true'.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING min-user-mode: Expert
-name <java.lang.String> (property: name) The name of the actor. default: Breakpoint
-annotation <adams.core.base.BaseAnnotation> (property: annotations) The annotations to attach to this actor. default:
-skip <boolean> (property: skip) If set to true, transformation is skipped and the input token is just forwarded as it is. default: false
-stop-flow-on-error <boolean> (property: stopFlowOnError) If set to true, the flow execution at this level gets stopped in case this actor encounters an error; the error gets propagated; useful for critical actors. default: false min-user-mode: Expert
-silent <boolean> (property: silent) If enabled, then no errors are output in the console; Note: the enclosing actor handler must have this enabled as well. default: false min-user-mode: Expert
-scope-restriction <adams.flow.execution.debug.AbstractScopeRestriction> (property: scopeRestriction) The scopeRestriction to use for suspending the flow execution. default: adams.flow.execution.debug.NoScopeRestriction
-on-pre-input <boolean> (property: onPreInput) If set to true, the breakpoint gets evaluated at pre-input (of token) time; token available. default: false
-on-post-input <boolean> (property: onPostInput) If set to true, the breakpoint gets evaluated at post-input (of token) time. default: false
-on-pre-execute <boolean> (property: onPreExecute) If set to true, the breakpoint gets evaluated at pre-execute time. default: true
-on-post-execute <boolean> (property: onPostExecute) If set to true, the breakpoint gets evaluated at post-execute time. default: false
-on-pre-output <boolean> (property: onPreOutput) If set to true, the breakpoint gets evaluated at pre-output (of token) time; token available. default: false
-on-post-output <boolean> (property: onPostOutput) If set to true, the breakpoint gets evaluated at post-output (of token) time. default: false
-condition <adams.flow.condition.bool.BooleanCondition> (property: condition) The condition to evaluate; if the condition evaluates to 'true', the execution of the flow is paused. default: adams.flow.condition.bool.Expression
-watch <adams.core.base.BaseString> [-watch ...] (property: watches) The expression to display initially in the watch dialog; the type of the watch needs to be specified as well. default:
-watch-type <VARIABLE|STRING|BOOLEAN_EXPRESSION|MATH_EXPRESSION|STRING_EXPRESSION> [-watch-type ...] (property: watchTypes) The types of the watch expressions; determines how the expressions get evaluated and displayed. default:
-view <SOURCE|EXPRESSIONS|VARIABLES|STORAGE|INSPECT_TOKEN|BREAKPOINTS> [-view ...] (property: views) The views to display automatically when the breakpoint is reached. default:
-bring-to-front <boolean> (property: bringToFront) If set to true, it is attempted to bring the flow editor window to the front once the breakpoint is reached. NB Does not work on all platforms. default: false
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_BringToFrontwhether to bring the window to the front.protected BooleanConditionm_Conditionthe condition to evaluate.protected booleanm_OnPostExecutebreak on postExecute.protected booleanm_OnPostInputbreak on postInput.protected booleanm_OnPostOutputbreak on postOutput.protected booleanm_OnPreExecutebreak on preExecute.protected booleanm_OnPreInputbreak on preInput.protected booleanm_OnPreOutputbreak on preOutput.protected AbstractScopeRestrictionm_ScopeRestrictionthe scope restriction to use.protected View[]m_Viewsthe views to display automatically.protected BaseString[]m_Watchesthe watch expressions.protected ExpressionWatchPanel.ExpressionType[]m_WatchTypesthe watch expression types.-
Fields inherited from class adams.flow.transformer.AbstractTransformer
BACKUP_INPUT, BACKUP_OUTPUT, m_InputToken, m_OutputToken
-
Fields inherited from class adams.flow.core.AbstractActor
m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_Executing, m_ExecutionListeningSupporter, m_FullName, m_LoggingPrefix, m_Name, m_Parent, m_ScopeHandler, m_Self, m_Silent, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
Fields inherited from interface adams.flow.core.Actor
FILE_EXTENSION, FILE_EXTENSION_GZ
-
-
Constructor Summary
Constructors Constructor Description Breakpoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class[]accepts()Returns the class that the consumer accepts.StringbringToFrontTipText()Returns the tip text for this property.StringconditionTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected StringdoExecute()Executes the flow item.Class[]generates()Returns the class of objects that it generates.booleangetBringToFront()Returns whether to bring the flow editor window to the front once the breakpoint is reached.BooleanConditiongetCondition()Returns the break condition to evaluate.booleangetOnPostExecute()Returns whether the breakpoint gets evaluated on post-execute.booleangetOnPostInput()Returns whether the breakpoint gets evaluated on post-input (of token).booleangetOnPostOutput()Returns whether the breakpoint gets evaluated on post-output (of token).booleangetOnPreExecute()Returns whether the breakpoint gets evaluated on pre-execute.booleangetOnPreInput()Returns whether the breakpoint gets evaluated on pre-input (of token).booleangetOnPreOutput()Returns whether the breakpoint gets evaluated on pre-output (of token).StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.AbstractScopeRestrictiongetScopeRestriction()Returns the restriction for the scope to use for suspending the flow execution.View[]getViews()Returns the views to display automatically.BaseString[]getWatches()Returns the watch expressions for the watch dialog.ExpressionWatchPanel.ExpressionType[]getWatchTypes()Returns the types of the watch expressions.StringglobalInfo()Returns a string describing the object.StringonPostExecuteTipText()Returns the tip text for this property.StringonPostInputTipText()Returns the tip text for this property.StringonPostOutputTipText()Returns the tip text for this property.StringonPreExecuteTipText()Returns the tip text for this property.StringonPreInputTipText()Returns the tip text for this property.StringonPreOutputTipText()Returns the tip text for this property.StringscopeRestrictionTipText()Returns the tip text for this property.voidsetBringToFront(boolean value)Sets whether to bring the flow editor window to the front once the breakpoint is reached.voidsetCondition(BooleanCondition value)Sets the break condition to evaluate.voidsetOnPostExecute(boolean value)Sets whether to evaluate the breakpoing on post-execute.voidsetOnPostInput(boolean value)Sets whether to evaluate the breakpoing on post-input (of token).voidsetOnPostOutput(boolean value)Sets whether to evaluate the breakpoing on post-output (of token).voidsetOnPreExecute(boolean value)Sets whether to evaluate the breakpoing on pre-execute.voidsetOnPreInput(boolean value)Sets whether to evaluate the breakpoing on pre-input (of token).voidsetOnPreOutput(boolean value)Sets whether to evaluate the breakpoing on pre-output (of token).voidsetScopeRestriction(AbstractScopeRestriction value)Sets the restriction for the scope to use for suspending the flow execution.StringsetUp()Initializes the item for flow execution.voidsetViews(View[] value)Sets the views to display automatically.voidsetWatches(BaseString[] value)Sets the watch expressions for the watch dialog.voidsetWatchTypes(ExpressionWatchPanel.ExpressionType[] value)Sets the types of the watch expressions.StringviewsTipText()Returns the tip text for this property.StringwatchesTipText()Returns the tip text for this property.StringwatchTypesTipText()Returns the tip text for this property.-
Methods inherited from class adams.flow.transformer.AbstractTransformer
backupState, currentInput, execute, hasInput, hasPendingOutput, input, output, postExecute, restoreState, wrapUp
-
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, canInspectOptions, canPerformSetUpCheck, cleanUp, compareTo, configureLogger, destroy, equals, finalUpdateVariables, findVariables, findVariables, forceVariables, forCommandLine, forName, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, handleException, hasErrorHandler, hasStopMessage, index, initialize, isBackedUp, isExecuted, isExecuting, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, performVariableChecks, preExecute, pruneBackup, pruneBackup, reset, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setVariables, shallowCopy, shallowCopy, silentTipText, sizeOf, skipTipText, stopExecution, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.flow.core.Actor
cleanUp, compareTo, destroy, equals, execute, findVariables, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, hasErrorHandler, hasStopMessage, index, isExecuted, isFinished, isHeadless, isStopped, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setVariables, shallowCopy, shallowCopy, sizeOf, stopExecution, stopExecution, toCommandLine, variableChanged, wrapUp
-
Methods inherited from interface adams.core.AdditionalInformationHandler
getAdditionalInformation
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager
-
Methods inherited from interface adams.core.VariablesInspectionHandler
canInspectOptions
-
-
-
-
Field Detail
-
m_ScopeRestriction
protected AbstractScopeRestriction m_ScopeRestriction
the scope restriction to use.
-
m_OnPreInput
protected boolean m_OnPreInput
break on preInput.
-
m_OnPostInput
protected boolean m_OnPostInput
break on postInput.
-
m_OnPreExecute
protected boolean m_OnPreExecute
break on preExecute.
-
m_OnPostExecute
protected boolean m_OnPostExecute
break on postExecute.
-
m_OnPreOutput
protected boolean m_OnPreOutput
break on preOutput.
-
m_OnPostOutput
protected boolean m_OnPostOutput
break on postOutput.
-
m_Condition
protected BooleanCondition m_Condition
the condition to evaluate.
-
m_Views
protected View[] m_Views
the views to display automatically.
-
m_Watches
protected BaseString[] m_Watches
the watch expressions.
-
m_WatchTypes
protected ExpressionWatchPanel.ExpressionType[] m_WatchTypes
the watch expression types.
-
m_BringToFront
protected boolean m_BringToFront
whether to bring the window to the front.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractActor
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceActor- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractActor- Returns:
- null if no info available, otherwise short string
-
setScopeRestriction
public void setScopeRestriction(AbstractScopeRestriction value)
Sets the restriction for the scope to use for suspending the flow execution.- Parameters:
value- the restriction
-
getScopeRestriction
public AbstractScopeRestriction getScopeRestriction()
Returns the restriction for the scope to use for suspending the flow execution.- Returns:
- the restriction
-
scopeRestrictionTipText
public String scopeRestrictionTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOnPreInput
public void setOnPreInput(boolean value)
Sets whether to evaluate the breakpoing on pre-input (of token).- Parameters:
value- true if evaluated
-
getOnPreInput
public boolean getOnPreInput()
Returns whether the breakpoint gets evaluated on pre-input (of token).- Returns:
- true if evaluated
-
onPreInputTipText
public String onPreInputTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOnPostInput
public void setOnPostInput(boolean value)
Sets whether to evaluate the breakpoing on post-input (of token).- Parameters:
value- true if evaluated
-
getOnPostInput
public boolean getOnPostInput()
Returns whether the breakpoint gets evaluated on post-input (of token).- Returns:
- true if evaluated
-
onPostInputTipText
public String onPostInputTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOnPreExecute
public void setOnPreExecute(boolean value)
Sets whether to evaluate the breakpoing on pre-execute.- Parameters:
value- true if evaluated
-
getOnPreExecute
public boolean getOnPreExecute()
Returns whether the breakpoint gets evaluated on pre-execute.- Returns:
- true if evaluated
-
onPreExecuteTipText
public String onPreExecuteTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOnPostExecute
public void setOnPostExecute(boolean value)
Sets whether to evaluate the breakpoing on post-execute.- Parameters:
value- true if evaluated
-
getOnPostExecute
public boolean getOnPostExecute()
Returns whether the breakpoint gets evaluated on post-execute.- Returns:
- true if evaluated
-
onPostExecuteTipText
public String onPostExecuteTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOnPreOutput
public void setOnPreOutput(boolean value)
Sets whether to evaluate the breakpoing on pre-output (of token).- Parameters:
value- true if evaluated
-
getOnPreOutput
public boolean getOnPreOutput()
Returns whether the breakpoint gets evaluated on pre-output (of token).- Returns:
- true if evaluated
-
onPreOutputTipText
public String onPreOutputTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOnPostOutput
public void setOnPostOutput(boolean value)
Sets whether to evaluate the breakpoing on post-output (of token).- Parameters:
value- true if evaluated
-
getOnPostOutput
public boolean getOnPostOutput()
Returns whether the breakpoint gets evaluated on post-output (of token).- Returns:
- true if evaluated
-
onPostOutputTipText
public String onPostOutputTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setCondition
public void setCondition(BooleanCondition value)
Sets the break condition to evaluate.- Specified by:
setConditionin interfaceBooleanConditionSupporter- Parameters:
value- the expression
-
getCondition
public BooleanCondition getCondition()
Returns the break condition to evaluate.- Specified by:
getConditionin interfaceBooleanConditionSupporter- Returns:
- the expression
-
conditionTipText
public String conditionTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setWatches
public void setWatches(BaseString[] value)
Sets the watch expressions for the watch dialog.- Parameters:
value- the expressions
-
getWatches
public BaseString[] getWatches()
Returns the watch expressions for the watch dialog.- Returns:
- the expressions
-
watchesTipText
public String watchesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setWatchTypes
public void setWatchTypes(ExpressionWatchPanel.ExpressionType[] value)
Sets the types of the watch expressions.- Parameters:
value- the types
-
getWatchTypes
public ExpressionWatchPanel.ExpressionType[] getWatchTypes()
Returns the types of the watch expressions.- Returns:
- the types
-
watchTypesTipText
public String watchTypesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setViews
public void setViews(View[] value)
Sets the views to display automatically.- Parameters:
value- the views
-
getViews
public View[] getViews()
Returns the views to display automatically.- Returns:
- the views
-
viewsTipText
public String viewsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setBringToFront
public void setBringToFront(boolean value)
Sets whether to bring the flow editor window to the front once the breakpoint is reached.- Parameters:
value- true if to bring to front
-
getBringToFront
public boolean getBringToFront()
Returns whether to bring the flow editor window to the front once the breakpoint is reached.- Returns:
- true if to bring to front
-
bringToFrontTipText
public String bringToFrontTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setUp
public String setUp()
Initializes the item for flow execution.- Specified by:
setUpin interfaceActor- Overrides:
setUpin classAbstractActor- Returns:
- null if everything is fine, otherwise error message
- See Also:
AbstractActor.reset()
-
accepts
public Class[] accepts()
Returns the class that the consumer accepts.- Specified by:
acceptsin interfaceInputConsumer- Returns:
- adams.flow.core.Unknown.class
-
generates
public Class[] generates()
Returns the class of objects that it generates.- Specified by:
generatesin interfaceOutputProducer- Returns:
- adams.flow.core.Unknown.class
-
doExecute
protected String doExecute()
Executes the flow item.- Specified by:
doExecutein classAbstractActor- Returns:
- null if everything is fine, otherwise error message
-
-