# 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/system/globals.py
# OPENED_PROJECTS = {}


import sublime
import os
from .debug import Debug
from ..system.globals import plugin_disabled_for_folders
        folder = os.path.dirname(folder.file_name())
    folder = os.path.normcase(folder)
    return folder in plugin_disabled_for_folders


def set_plugin_temporarily_enabled(folder=None):
    """ Disables the plugin globally or for folder.
        Folder can be a view """
    if folder is None:
        if is_plugin_globally_disabled():
            plugin_disabled_for_folders.remove("*global")
    else:
        if isinstance(folder, sublime.View):
            folder = os.path.dirname(folder.file_name())
        folder = os.path.normcase(folder)
        Debug('project', 'Enable ArcticTypescript for %s' % folder)
        if folder in plugin_disabled_for_folders:
            plugin_disabled_for_folders.remove(folder)


def set_plugin_temporarily_disabled(folder=None):
    """ Enables the plugin globally or for folder.
        Folder can be a view """
    if folder is None:
        if not is_plugin_globally_disabled():
            plugin_disabled_for_folders.append("*global")
    else:
        if isinstance(folder, sublime.View):
            folder = os.path.dirname(folder.file_name())
        folder = os.path.normcase(folder)

# 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/system/globals.py
# OPENED_PROJECTS = {}


# Path: lib/utils/disabling.py
import sublime
import os
from .debug import Debug
from ..system.globals import plugin_disabled_for_folders

        folder = os.path.dirname(folder.file_name())
    folder = os.path.normcase(folder)
    return folder in plugin_disabled_for_folders


def set_plugin_temporarily_enabled(folder=None):
    """ Disables the plugin globally or for folder.
        Folder can be a view """
    if folder is None:
        if is_plugin_globally_disabled():
            plugin_disabled_for_folders.remove("*global")
    else:
        if isinstance(folder, sublime.View):
            folder = os.path.dirname(folder.file_name())
        folder = os.path.normcase(folder)
        Debug('project', 'Enable ArcticTypescript for %s' % folder)
        if folder in plugin_disabled_for_folders:
            plugin_disabled_for_folders.remove(folder)


def set_plugin_temporarily_disabled(folder=None):
    """ Enables the plugin globally or for folder.
        Folder can be a view """
    if folder is None:
        if not is_plugin_globally_disabled():
            plugin_disabled_for_folders.append("*global")
    else:
        if isinstance(folder, sublime.View):
            folder = os.path.dirname(folder.file_name())
        folder = os.path.normcase(folder)

        Debug('project', 'Disable ArcticTypescript for %s' % folder)