java.lang.Object
org.eclipse.lemminx.customservice.synapse.debugger.visitor.VisitorUtils

public class VisitorUtils extends Object
  • Constructor Details

    • VisitorUtils

      public VisitorUtils()
  • Method Details

    • checkNodeInRange

      public static boolean checkNodeInRange(STNode node, Breakpoint breakpoint)
      Check whether the breakpoint is within the range of the node.
      Parameters:
      node - The node to check.
      breakpoint - The breakpoint to check.
      Returns:
      True if the breakpoint is within the range of the node, false otherwise.
    • checkValidBreakpoint

      public static boolean checkValidBreakpoint(STNode node, Breakpoint breakpoint)
      Check whether the breakpoint is in the start tag range of the mediator node.
      Parameters:
      node - The node(mediator) to check.
      breakpoint - The breakpoint to check.
      Returns:
      True if the breakpoint is within the start tag range of the node, false otherwise.
    • visitMediators

      public static void visitMediators(List<Mediator> mediators, BreakpointMediatorVisitor visitor)
      Visit the mediators in the list and get the debug info.
      Parameters:
      mediators - The list of mediators to visit.
      visitor - The visitor to visit the mediators.
    • visitMediators

      public static void visitMediators(List<Mediator> mediators, BreakpointMediatorVisitor visitor, HashMap<Breakpoint,IDebugInfo> debugInfos)
      Visit the mediators in the list and generate debug info for the current breakpoint. If the visitor is done, then the breakpoint will be removed from the list and the debug info will be stored in the map. Then the visitor will continue from the next breakpoint.
      Parameters:
      mediators - The list of mediators to visit.
      visitor - The visitor to visit the mediators.
      debugInfos - The map to store the debug info of the mediators.
    • visitMediators

      public static void visitMediators(List<Mediator> mediators, StepOverMediatorVisitor visitor)
      Visit the mediators in the list and get the next step over breakpoints.
      Parameters:
      mediators - The list of mediators to visit.
      visitor - The visitor to visit the mediators.
    • visitMediator

      public static void visitMediator(Mediator node, AbstractMediatorVisitor visitor)
      Visit the mediator node.
      Parameters:
      node - The mediator node to visit.
      visitor - The visitor to visit the mediator.
    • markAsInvalid

      public static void markAsInvalid(Breakpoint breakpoint, String error, IDebugInfo debugInfo, HashMap<Breakpoint,IDebugInfo> breakpointInfoMap, List<Breakpoint> breakpoints)
      Mark the breakpoint as invalid and store the error message in the debug info.
      Parameters:
      breakpoint - The breakpoint to mark as invalid.
      error - The error message to store in the debug info.
      debugInfo - The debug info to store the error message.
      breakpointInfoMap - The map to store the debug info of the breakpoints.
      breakpoints - The list of breakpoints.