# 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/uiutils.py
# def get_prefix(token):
#     if token in PREFIXES:
#         return PREFIXES[token]
#     else:
#         return ''
# 
# Path: lib/utils/viewutils.py
# def get_file_infos(view):
#     return (view.file_name(), get_lines(view), get_content(view))
# 
# def get_content_of_line_at(view, pos):
#     return view.substr(sublime.Region(view.line(pos-1).a, pos))


import re
import json
import sublime
from ..utils import Debug
from ..utils.uiutils import get_prefix
from ..utils.viewutils import get_file_infos, get_content_of_line_at
        for entry in entries:
            if self.interface and entry['kind'] != 'primitive type' and entry['kind'] != 'interface' : continue
            key = self._get_list_key(entry)
            value = self._get_list_value(entry)
            self.completion_list.append((key,value))

        self.completion_list.sort()
        return len(self.completion_list)


    # GET LISTE
    def get_list(self):
        return self.completion_list


    # TYPESCRIPT COMPLETION ?
    def trigger(self, view, force_enable=False):

        cursor_pos = view.sel()[0].begin() # cursor pos as int
        (cursor_line, cursor_col) = view.rowcol(cursor_pos)

        char = view.substr(cursor_pos-1)


        enabled = force_enable or (char in self.completion_chars)
        self.interface = char is ':'

        if enabled:
            Debug('autocomplete', "Autocompletion for line %i , %i, forced=%s" % (cursor_line+1, cursor_col+1, force_enable) )


# 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/uiutils.py
# def get_prefix(token):
#     if token in PREFIXES:
#         return PREFIXES[token]
#     else:
#         return ''
# 
# Path: lib/utils/viewutils.py
# def get_file_infos(view):
#     return (view.file_name(), get_lines(view), get_content(view))
# 
# def get_content_of_line_at(view, pos):
#     return view.substr(sublime.Region(view.line(pos-1).a, pos))


# Path: lib/system/Completion.py
import re
import json
import sublime
from ..utils import Debug
from ..utils.uiutils import get_prefix
from ..utils.viewutils import get_file_infos, get_content_of_line_at

        for entry in entries:
            if self.interface and entry['kind'] != 'primitive type' and entry['kind'] != 'interface' : continue
            key = self._get_list_key(entry)
            value = self._get_list_value(entry)
            self.completion_list.append((key,value))

        self.completion_list.sort()
        return len(self.completion_list)


    # GET LISTE
    def get_list(self):
        return self.completion_list


    # TYPESCRIPT COMPLETION ?
    def trigger(self, view, force_enable=False):

        cursor_pos = view.sel()[0].begin() # cursor pos as int
        (cursor_line, cursor_col) = view.rowcol(cursor_pos)

        char = view.substr(cursor_pos-1)


        enabled = force_enable or (char in self.completion_chars)
        self.interface = char is ':'

        if enabled:
            Debug('autocomplete', "Autocompletion for line %i , %i, forced=%s" % (cursor_line+1, cursor_col+1, force_enable) )


            is_member = is_member_completion( get_content_of_line_at(view, cursor_pos) )