def on_activated(self, view):
        if is_colorizable(view):
            generate_menu(view)

        state = state_for(view)
        if state and state.theme_path:
            # set file's own theme path, because we use one per css file
            theme.set(state.theme_path)

        if need_colorization(view):
            colorize_file(view, state)

        if need_uncolorization(view):
            uncolorize_file(view, state_for(view))
Example #2
0
    def on_activated(self, view):
        if is_colorizable(view):
            generate_menu(view)

        state = state_for(view)
        if state and state.theme_path:
            # set file's own theme path, because we use one per css file
            theme.set(state.theme_path)

        if need_colorization(view):
            colorize_file(view, state)

        if need_uncolorization(view):
            uncolorize_file(view)
Example #3
0
    def on_activated(self, view):
        if is_colorizable(view):
            generate_menu(view)

            # set file's own theme path
            # because we use one per css file
            state = State(view)
            if state.theme_path:
                theme.set(state.theme_path)

        if need_colorization(view):
            colorize_file(view)

        if need_uncolorization(view):
            uncolorize_file(view)
Example #4
0
 def is_visible(self):
     return is_colorizable(self.view)
 def is_visible(self):
     return is_colorizable(self.view)