Interface DebugHost

  • All Known Implementing Classes:
    FormCalcScriptHandler.FormCalcParser

    public interface DebugHost
    Class DebugHost defines the interface by which the CalcParser (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.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int STEP_INTO  
      static int STEP_OUT  
      static int STEP_OVER
      Enumeration of all debugging commands that can be used to control the FormCalc scripting engine when debugging.
      static int STOP  
    • 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.
    • 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 via CalcParser.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 via CalcParser.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.