Пример #1
0
    def is_visible(self):
        """Returns true if the current file is an M-AT file."""
        try:
            for s in EntitySelector.get_possible_selectors_for_view(self.view):
                if DocLink in s.__mro__:
                    return True
        except AttributeError:
            pass

        return False
Пример #2
0
 def is_visible(self, cmd):
     """Returns true if the current file is an M-AT file."""
     if cmd == Highlight.HIGHLIGHT_COMMAND:
         try:
             for s in EntitySelector.get_possible_selectors_for_view(
                     self.view):
                 if Highlight in s.__mro__:
                     return True
         except AttributeError:
             pass
         return False
     elif Highlight.get_highlighter_for_view(self.view) is None:
         return False
     else:
         return True