示例#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)
示例#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)
示例#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)
示例#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)
示例#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)
示例#6
0
 def run(self, args, options):
     viewHelpers.setViewHidden(args[0], True)
示例#7
0
 def flicker(self):
     viewHelpers.setViewHidden(self.currentView, True)
     time.sleep(0.1)
     viewHelpers.setViewHidden(self.currentView, False)
     time.sleep(0.3)
示例#8
0
 def run(self, args, options):
   viewHelpers.setViewHidden(args[0], True)
示例#9
0
 def flicker(self):
     viewHelpers.setViewHidden(self.currentView, True)
     time.sleep(0.1)
     viewHelpers.setViewHidden(self.currentView, False)
     time.sleep(0.3)
示例#10
0
 def run(self, args, options, result):
   viewHelpers.setViewHidden(args[0], False)