# Path: lib/utils/debug.py
# def Debug(classification, text):
#     if 'all' in print_classifications or classification in print_classifications:
#         print("ArcticTypescript: %s: %s" % (classification.ljust(8), text))
#     if classification not in possible_classifications:
#         print("ArcticTypescript: debug: got unknown debug message classification: %s. " \
#             "Consider adding this to possible_classifications" % classification)
#     sys.stdout.flush()
# 
# Path: lib/utils/debounce.py
# DEFAULT_DEBOUNCE_DELAY = 0.2 # Will also be used for AsyncCommand debounce


import uuid
import time
import sublime
import json
from ..utils import Debug
from ..utils.debounce import DEFAULT_DEBOUNCE_DELAY
        return self

    def set_callback_kwargs(self, **callback_kwargs):
        """ Set additional arguments the callbacks will be called with. """
        self.callback_kwargs = callback_kwargs
        return self

    def set_result_callback(self, result_callback=None):
        """ Will be called as result_callback(tss_answer, **callback_kwargs). """
        self.result_callback = result_callback
        return self

    def set_replaced_callback(self, replaced_callback=None):
        """
            Will be called as replaced_callback(now_used_command, **callback_kwargs)
            when this command has been deleted from queue without execution.
        """
        self.replaced_callback = replaced_callback
        return self

    def set_executing_callback(self, executing_callback=None):
        """ Will be called as soon as the command is sent to tss.js """
        self.executing_callback = executing_callback
        return self



    # ------------------------- finish chain: execute ------------------------------ #

    def append_to_fast_queue(self):

# Path: lib/utils/debug.py
# def Debug(classification, text):
#     if 'all' in print_classifications or classification in print_classifications:
#         print("ArcticTypescript: %s: %s" % (classification.ljust(8), text))
#     if classification not in possible_classifications:
#         print("ArcticTypescript: debug: got unknown debug message classification: %s. " \
#             "Consider adding this to possible_classifications" % classification)
#     sys.stdout.flush()
# 
# Path: lib/utils/debounce.py
# DEFAULT_DEBOUNCE_DELAY = 0.2 # Will also be used for AsyncCommand debounce


# Path: lib/server/AsyncCommand.py
import uuid
import time
import sublime
import json
from ..utils import Debug
from ..utils.debounce import DEFAULT_DEBOUNCE_DELAY

        return self

    def set_callback_kwargs(self, **callback_kwargs):
        """ Set additional arguments the callbacks will be called with. """
        self.callback_kwargs = callback_kwargs
        return self

    def set_result_callback(self, result_callback=None):
        """ Will be called as result_callback(tss_answer, **callback_kwargs). """
        self.result_callback = result_callback
        return self

    def set_replaced_callback(self, replaced_callback=None):
        """
            Will be called as replaced_callback(now_used_command, **callback_kwargs)
            when this command has been deleted from queue without execution.
        """
        self.replaced_callback = replaced_callback
        return self

    def set_executing_callback(self, executing_callback=None):
        """ Will be called as soon as the command is sent to tss.js """
        self.executing_callback = executing_callback
        return self



    # ------------------------- finish chain: execute ------------------------------ #

    def append_to_fast_queue(self):

        Debug('command', "CMD queued @FAST: %s" % self.id)