Open 'go to line' dialog
544858
def go_to_line(self, line=None):
        """"""
        editorstack = self.get_current_editorstack()
        if editorstack is not None:
            editorstack.go_to_line(line)
500551
def go(argv, opts, config)
      opts.banner = "Usage: #{syntax}"
      process_options(opts, config)
      add_default_options(opts)

      if argv[0] && cmd = commands[argv[0].to_sym]
        logger.debug "Found subcommand '#{cmd.name}'"
        argv.shift
        cmd.go(argv, opts, config)
      else
        logger.debug "No additional command found, time to exec"
        self
      end
    end
55514
def precmd(self, line):
        """"""
        if line.startswith('help'):
            if not q("`help in key`.q"):
                try:
                    q("\\l help.q")
                except kerr:
                    return '-1"no help available - install help.q"'
        if line == 'help':
            line += "`"
        return line
499638
def scroll_to(self, line):
        
        self._buffer.scroll(line - self._start_line)
        self._start_line = line
602081
function(content, opts, onOk, oncancel) {
        Dialog.setup('prompt', content, opts, onOk, oncancel);
      }
387630
def go_to_new_line(self):
        """"""
        self.stdkey_end(False, False)
        self.insert_text(self.get_line_separator())
868888
def touch(option={})
      mode = option[:mode] || 0600
      path = create(option)
      path.open("w", mode)
      return path
    end
46483
def open_file_dialog(self):
        
        dialog = QtGui.QFileDialog
        filename = dialog.getExistingDirectory(self, 'Select a file:', self.data_filepath.text())
        if str(filename)!='':
            self.data_filepath.setText(filename)
258800
def openColorDialog(self):
        
        try:
            currentColor = self.getData()
        except InvalidInputError:
            currentColor = self.cti.data

        qColor = QtWidgets.QColorDialog.getColor(currentColor, self)

        if qColor.isValid():
            self.setData(qColor)
            self.commitAndClose()
588506
def interactive_prompt(message, parameters, default_opts):
    

    # pretty-print the message
    lines = message.split('\n')
    max_line_len = max([len(l) for l in lines])

    print('-' * max_line_len)
    print(message)
    print('-' * max_line_len)

    ret = {}
    for param in parameters:
        formatted_param = param
        prompt_str = '{}: '.format(formatted_param)
        if param in default_opts:
            prompt_str = '{} (default: "{}"): '.format(formatted_param, default_opts[param])

        try:
            value = raw_input(prompt_str)
        except KeyboardInterrupt:
            log.debug('Exiting on keyboard interrupt')
            sys.exit(0)

        if len(value) > 0:
            ret[param] = value
        elif param in default_opts:
            ret[param] = default_opts[param]
        else:
            ret[param] = None

    return ret
614486
protected void enterOrtho() {
		GL11.glMatrixMode(GL11.GL_PROJECTION);
		GL11.glLoadIdentity();
		GL11.glOrtho(0, screenWidth, 0, screenHeight, 1, -1);
		GL11.glMatrixMode(GL11.GL_MODELVIEW);
	}
931302
def OnCut(self, event):
        """"""

        entry_line = \
            self.main_window.entry_line_panel.entry_line_panel.entry_line

        if wx.Window.FindFocus() != entry_line:
            selection = self.main_window.grid.selection

            with undo.group(_("Cut")):
                data = self.main_window.actions.cut(selection)

            self.main_window.clipboard.set_clipboard(data)

            self.main_window.grid.ForceRefresh()

        else:
            entry_line.Cut()

        event.Skip()
533364
function(location, line, description, enabled) {
        this.location = location;
        this.line = line;
        this.description = description;
        this.enabled = enabled;
    }
783818
def default(self, line):
        '''
        '''
        cmdargs = line.split()
        remain = ' '.join(cmdargs[1:])
        if 'show'.startswith(cmdargs[0]):
            self.do_show(remain)
        elif 'set'.startswith(cmdargs[0]):
            self.do_set(remain)
        elif 'sendeth'.startswith(cmdargs[0]):
            self.do_sendeth(remain)
        elif 'load'.startswith(cmdargs[0]):
            self.do_load(remain)
        elif 'save'.startswith(cmdargs[0]):
            self.do_save(remain)
        elif 'monitor'.startswith(cmdargs[0]):
            self.do_monitor(remain)
        elif 'unmonitor'.startswith(cmdargs[0]):
            self.do_unmonitor(remain)
        elif 'exec'.startswith(cmdargs[0]):
            self.do_exec(remain)
        elif 'add'.startswith(cmdargs[0]):
            self.do_add(remain)
        elif 'remove'.startswith(cmdargs[0]):
            self.do_remove(remain)
        elif 'replay'.startswith(cmdargs[0]):
            self.do_replay(remain)
        else:
            print ("Unrecognized command '{}'".format(line))
346909
def prompt_terminal(path):
    """"""

    def rlinput(prompt_msg, prefill=''):
        """
        One line is read from standard input. Display `prompt_msg` on
        standard error. `prefill` is placed into the editing buffer
        before editing begins.
        """
        import readline
        readline.set_startup_hook(lambda: readline.insert_text(prefill))
        try:
            return input(prompt_msg)
        finally:
            readline.set_startup_hook()

    filepath, extension = os.path.splitext(path)
    basename = os.path.basename(filepath)
    dirname = os.path.dirname(filepath)

    # display filename prompt
    new_basename = rlinput('Filename: ', basename)

    # retry prompt if new filename already exists
    while os.path.exists(os.path.join(dirname, new_basename + extension)) and \
            new_basename != basename:
        new_basename = rlinput('Sorry, please try again... Filename: ',
                               basename)

    if new_basename == '':
        new_basename = basename

    return os.path.join(dirname, new_basename + extension)
1341046
@Override
    public void go() {
        logger.info("Waiting for select {}...", element);
        Select select = new Select(findElementOrFail(getWebDriver(), element));
        if (OptionSelectorType.INDEX.equals(optionSelectorType)) {
            logger.info("Selecting index {}...", optionSelector);
            select.selectByIndex((Integer) optionSelector);
        } else if (OptionSelectorType.VALUE.equals(optionSelectorType)) {
            logger.info("Selecting value {}...", optionSelector);
            select.selectByValue((String) optionSelector);
        } else if (OptionSelectorType.TEXT.equals(optionSelectorType)) {
            logger.info("Selecting text {}...", optionSelector);
            select.selectByVisibleText((String) optionSelector);
        }
    }
1005244
def inline_query(self):
        """"""
        if isinstance(self.button, types.KeyboardButtonSwitchInline):
            return self.button.query