def analyze_for_configure(self): '''solves the problem of the editor not being smart about toggles by using text to see which toggles are active''' '''regex toggle check''' Key("escape").execute() # get out of Find result = CONTEXT.read_nmax_tries(10) if result == self.analysis_chars: self.regex = False Key("backspace").execute() elif result == self.analysis_chars[1]: self.regex = True Key("delete, backspace").execute() else: print("Eclipse configuration failed (%s)" % result)
def analyze_for_configure(self): '''solves the problem of the editor not being smart about toggles by using text to see which toggles are active''' '''regex toggle check''' Key("escape").execute() # get out of Find result = CONTEXT.read_nmax_tries(10) if result == self.analysis_chars: self.regex = False Key("backspace").execute() elif result == self.analysis_chars[1]: self.regex = True Key("delete, backspace").execute() else: print("Eclipse configuration failed (%s)" % result)
def lines_relative(self, back, n): if back: #backward try: num = CONTEXT.read_nmax_tries(10) txt = str(int(num) - int(n) + 1) # +1 to include current line Text(txt).execute() except ValueError: utilities.simple_log() return Key("enter").execute() else: #forward Key("escape, end, home, home").execute( ) # end-home-home to include all of current line # forward or backward Key("s-down:" + str(int(n)) + "/5, s-left").execute()
def lines_relative(self, back, n): if back: #backward try: num = CONTEXT.read_nmax_tries(10) txt = str(int(num) - int(n) + 1) # +1 to include current line Text(txt).execute() except ValueError: utilities.simple_log() return Key("enter").execute() else: #forward Key("escape, end, home, home").execute( ) # end-home-home to include all of current line # forward or backward Key("s-down:" + str(int(n)) + "/5, s-left").execute()