Exemplo n.º 1
0
    def run(self, arguments, options):
        object = fb.evaluateObjectExpression(arguments[0])

        isHidden = fb.evaluateBooleanExpression('[' + object + ' isHidden]')
        shouldHide = not isHidden
        for x in range(0, 2):
            viewHelpers.setViewHidden(object, shouldHide)
            viewHelpers.setViewHidden(object, isHidden)
Exemplo n.º 2
0
  def run(self, arguments, options):
    object = fb.evaluateObjectExpression(arguments[0])

    isHidden = fb.evaluateBooleanExpression('[' + object + ' isHidden]')
    shouldHide = not isHidden
    for x in range(0, 2):
      viewHelpers.setViewHidden(object, shouldHide)
      viewHelpers.setViewHidden(object, isHidden)
Exemplo n.º 3
0
    def inputCallback(self, input):
        oldView = self.currentView

        if input == 'q':
            cmd = 'echo %s | tr -d "\n" | pbcopy' % oldView
            os.system(cmd)

            print '\nI hope ' + oldView + ' was what you were looking for. I put it on your clipboard.'

            self.handler.stop()
        elif input == 'w':
            v = superviewOfView(self.currentView)
            if not v:
                print 'There is no superview. Where are you trying to go?!'
            self.setCurrentView(v)
        elif input == 's':
            v = firstSubviewOfView(self.currentView)
            if not v:
                print '\nThe view has no subviews.\n'
            self.setCurrentView(v)
        elif input == 'd':
            v = nthSiblingOfView(self.currentView, -1)
            if v == oldView:
                print '\nThere are no sibling views to this view.\n'
            self.setCurrentView(v)
        elif input == 'a':
            v = nthSiblingOfView(self.currentView, 1)
            if v == oldView:
                print '\nThere are no sibling views to this view.\n'
            self.setCurrentView(v)
        elif input == 'p':
            recusionName = 'recursiveDescription'
            isMac = runtimeHelpers.isMacintoshArch()

            if isMac:
                recursionName = '_subtreeDescription'

            lldb.debugger.HandleCommand('po [(id)' + oldView + ' ' +
                                        recusionName + ']')
        else:
            print '\nI really have no idea what you meant by \'' + input + '\'... =\\\n'

        viewHelpers.setViewHidden(oldView, False)
Exemplo n.º 4
0
  def inputCallback(self, input):
    oldView = self.currentView

    if input == 'q':
      cmd = 'echo %s | tr -d "\n" | pbcopy' % oldView
      os.system(cmd)

      print '\nI hope ' + oldView + ' was what you were looking for. I put it on your clipboard.'

      self.handler.stop()
    elif input == 'w':
      v = superviewOfView(self.currentView)
      if not v:
        print 'There is no superview. Where are you trying to go?!'
      self.setCurrentView(v)
    elif input == 's':
      v = firstSubviewOfView(self.currentView)
      if not v:
        print '\nThe view has no subviews.\n'
      self.setCurrentView(v)
    elif input == 'd':
      v = nthSiblingOfView(self.currentView, -1)
      if v == oldView:
        print '\nThere are no sibling views to this view.\n'
      self.setCurrentView(v)
    elif input == 'a':
      v = nthSiblingOfView(self.currentView, 1)
      if v == oldView:
        print '\nThere are no sibling views to this view.\n'
      self.setCurrentView(v)
    elif input == 'p':
      recusionName = 'recursiveDescription'
      isMac = runtimeHelpers.isMacintoshArch()

      if isMac:
        recursionName = '_subtreeDescription'

      lldb.debugger.HandleCommand('po [(id)' + oldView + ' ' + recusionName + ']')
    else:
      print '\nI really have no idea what you meant by \'' + input + '\'... =\\\n'

    viewHelpers.setViewHidden(oldView, False)
Exemplo n.º 5
0
  def inputCallback(self, input):
    oldView = self.currentView

    if input == 'q':
      cmd = 'echo %s | tr -d "\n" | pbcopy' % oldView
      os.system(cmd)

      fb.printResult('\nI hope ' + oldView + ' was what you were looking for. I put it on your clipboard.', self.result)

      self.handler.stop()
    elif input == 'w':
      v = superviewOfView(self.currentView)
      if not v:
        fb.printResult('There is no superview. Where are you trying to go?!', self.result)
      self.setCurrentView(v)
    elif input == 's':
      v = firstSubviewOfView(self.currentView)
      if not v:
        fb.printResult('\nThe view has no subviews.\n', self.result)
      self.setCurrentView(v)
    elif input == 'd':
      v = nthSiblingOfView(self.currentView, -1)
      if v == oldView:
        fb.printResult('\nThere are no sibling views to this view.\n', self.result)
      self.setCurrentView(v)
    elif input == 'a':
      v = nthSiblingOfView(self.currentView, 1)
      if v == oldView:
        fb.printResult('\nThere are no sibling views to this view.\n', self.result)
      self.setCurrentView(v)
    elif input == 'p':
      lldb.debugger.HandleCommand('po [(id)' + oldView + ' recursiveDescription]')
    else:
      fb.printResult('\nI really have no idea what you meant by \'' + input + '\'... =\\\n', self.result)

    viewHelpers.setViewHidden(oldView, False)
Exemplo n.º 6
0
 def run(self, args, options):
     viewHelpers.setViewHidden(args[0], True)
Exemplo n.º 7
0
 def flicker(self):
     viewHelpers.setViewHidden(self.currentView, True)
     time.sleep(0.1)
     viewHelpers.setViewHidden(self.currentView, False)
     time.sleep(0.3)
Exemplo n.º 8
0
 def run(self, args, options):
   viewHelpers.setViewHidden(args[0], True)
Exemplo n.º 9
0
 def flicker(self):
     viewHelpers.setViewHidden(self.currentView, True)
     time.sleep(0.1)
     viewHelpers.setViewHidden(self.currentView, False)
     time.sleep(0.3)
Exemplo n.º 10
0
 def run(self, args, options, result):
   viewHelpers.setViewHidden(args[0], False)