Example #1
0
    def is_enabled(self):
        """Check if command is enabled."""

        return (
            common.is_enabled() and
            not (active_thread is not None and active_thread.is_alive())
        )
Example #2
0
    def is_enabled(self):
        """Check if command is enabled."""

        view = self.window.active_view()
        return (common.is_enabled() and view is not None
                and not view.settings().get("hex_viewer_fake", False) and
                not (active_thread is not None and active_thread.is_alive()))
Example #3
0
    def is_enabled(self):
        """Check if command is enabled."""

        return (
            common.is_enabled() and
            not (active_thread is not None and active_thread.is_alive())
        )
Example #4
0
    def is_enabled(self):
        """Check if command is enabled."""

        view = self.window.active_view()
        return (
            common.is_enabled() and
            view is not None and not view.settings().get("hex_viewer_fake", False) and
            not (active_thread is not None and active_thread.is_alive())
        )
Example #5
0
    def on_pre_close(self, view):
        """On close."""

        if common.is_enabled() and view is not None and not view.settings().get("hex_viewer_fake", False):
            win = view.window()
            panel_view = win.get_output_panel('hex_viewer_inspector')
            parent_win = panel_view.window()
            if parent_win:
                parent_win.run_command('hide_panel', {'cancel': True})
Example #6
0
    def on_pre_close(self, view):
        """On close."""

        if common.is_enabled() and view is not None and not view.settings(
        ).get("hex_viewer_fake", False):
            win = view.window()
            panel_view = win.get_output_panel('hex_viewer_inspector')
            parent_win = panel_view.window()
            if parent_win:
                parent_win.run_command('hide_panel', {'cancel': True})
Example #7
0
    def is_enabled(self, **args):
        """Check if the command is enabled."""

        view = self.window.active_view()
        return (view is not None
                and (not args.get('reload', False) or
                     (common.is_enabled()
                      and not view.settings().get("hex_viewer_fake", False)))
                and not view.settings().get("hex_viewer_fake", False) and
                not (active_thread is not None and active_thread.is_alive()))
Example #8
0
    def on_selection_modified(self, view):
        """Determine if a highlight should be triggered."""

        if not common.is_enabled(view) or hh_thread.ignore_all:
            return
        now = time()
        if now - hh_thread.time > hh_thread.wait_time:
            sublime.set_timeout(hh_thread.payload, 0)
        else:
            hh_thread.modified = True
            hh_thread.time = now
Example #9
0
    def on_selection_modified(self, view):
        """Determine if a highlight should be triggered."""

        if not common.is_enabled(view) or hh_thread.ignore_all:
            return
        now = time()
        if now - hh_thread.time > hh_thread.wait_time:
            sublime.set_timeout(hh_thread.payload, 0)
        else:
            hh_thread.modified = True
            hh_thread.time = now
Example #10
0
    def is_enabled(self, **args):
        """Check if the command is enabled."""

        view = self.window.active_view()
        return (
            view is not None and
            (
                not args.get('reload', False) or
                (
                    common.is_enabled() and
                    not view.settings().get("hex_viewer_fake", False)
                )
            ) and
            not view.settings().get("hex_viewer_fake", False) and
            not(active_thread is not None and active_thread.is_alive())
        )
Example #11
0
    def is_enabled(self):
        """Check if command is enabled."""

        return bool(common.is_enabled()
                    and len(self.window.active_view().get_regions("hex_edit")))
Example #12
0
    def is_enabled(self):
        """Check if command is enabled."""

        return common.is_enabled()
Example #13
0
    def is_enabled(self):
        """Check if command is enabled."""

        return bool(common.is_enabled()
                    and common.hv_settings("inspector", False))
Example #14
0
    def is_enabled(self):
        """Check if command is enabled."""

        return bool(common.is_enabled() and common.hv_settings("inspector", False))
Example #15
0
 def is_enabled(self):
     """Check if the command is enabled."""
     return common.is_enabled()
Example #16
0
    def is_enabled(self):
        """Check if command is enabled."""

        return bool(common.is_enabled() and len(self.window.active_view().get_regions("hex_edit")))