Package com.adobe.xfa.formcalc
Interface DebugHost
-
- All Known Implementing Classes:
FormCalcScriptHandler.FormCalcParser
public interface DebugHost
Class DebugHost defines the interface by which theCalcParser
(FormCalc scripting engine) can interact with a debugger host.In environments where this is possible and desired, applications will need to inform the FormCalc script engine that they are capable of supporting the DebugHost interface by invoking the
CalcParser.setDebugHost(DebugHost)
method.Environments that are not able to debug need not define nor install a DebugHost objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
breakPoint(com.adobe.xfa.formcalc.CalcParser oParser, int nScriptID, int nLine, boolean bSet)
Abstract method that sets or clears a breakpoint.boolean
command(com.adobe.xfa.formcalc.CalcParser oParser, int eCmd)
Abstract method that allows for single-stepping.java.lang.String
getStackTrace(com.adobe.xfa.formcalc.CalcParser oParser)
Abstract method that returns a new-line delimited string showing the current stack and parameter values.void
getVariables(com.adobe.xfa.formcalc.CalcParser oParser, java.util.List<java.lang.String> oNames, java.util.List<CalcSymbol> oValues)
Abstract method that returns parallel lists of variables/parameters and values (the lists are the same size).void
poll()
Abstract method that is called periodically during script execution.int
stopped(int nScriptID, int nLine)
Abstract method that is called when the engine stops in debug mode.
-
-
-
Field Detail
-
STEP_OVER
static final int STEP_OVER
Enumeration of all debugging commands that can be used to control the FormCalc scripting engine when debugging.- See Also:
- Constant Field Values
-
STEP_INTO
static final int STEP_INTO
- See Also:
- Constant Field Values
-
STEP_OUT
static final int STEP_OUT
- See Also:
- Constant Field Values
-
STOP
static final int STOP
- See Also:
- Constant Field Values
-
-
Method Detail
-
stopped
int stopped(int nScriptID, int nLine)
Abstract method that is called when the engine stops in debug mode.- Parameters:
nScriptID
- the ID of script, which had been set viaCalcParser.setScriptID(int)
.nLine
- the line of script at which execution has stopped.- Returns:
- currently not used.
-
poll
void poll()
Abstract method that is called periodically during script execution.
-
breakPoint
boolean breakPoint(com.adobe.xfa.formcalc.CalcParser oParser, int nScriptID, int nLine, boolean bSet)
Abstract method that sets or clears a breakpoint.- Parameters:
oParser
- the parser to affect.nScriptID
- the ID of script, which had been set viaCalcParser.setScriptID(int)
.nLine
- the line of script.bSet
- true if setting breakpoint; false if clearing it.- Returns:
- true if successful.
-
command
boolean command(com.adobe.xfa.formcalc.CalcParser oParser, int eCmd)
Abstract method that allows for single-stepping. Note that this call does not actually cause any script to be executed. Rather, it sets the internal state so that the next time the appropriate condition is met, the Stopped callback will be called.- Parameters:
oParser
- the parser to affect.eCmd
- the command code (eg. step over/step into/step out).- Returns:
- true if successful.
-
getStackTrace
java.lang.String getStackTrace(com.adobe.xfa.formcalc.CalcParser oParser)
Abstract method that returns a new-line delimited string showing the current stack and parameter values.- Parameters:
oParser
- the parser to query.- Returns:
- a new-line delimited string showing the current stack and parameter values.
-
getVariables
void getVariables(com.adobe.xfa.formcalc.CalcParser oParser, java.util.List<java.lang.String> oNames, java.util.List<CalcSymbol> oValues)
Abstract method that returns parallel lists of variables/parameters and values (the lists are the same size). The symbols are not copied, so they must not be stored for later use. Note that it's only meaningful to call this function from within a break-point.- Parameters:
oParser
- the parser to query.oNames
- returned list of variable/parameter names.oValues
- returned list of values.
-
-