Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2791

Please add a loadFile method to groovy.ui.Console for ease of use.

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.6-beta-1
    • None
    • None

    Description

      Currently, fileOpen handles the task of loading the file and initializing the text area.

      Please add a method

      void loadScriptFile(File scriptFile) {
      inputArea.text = scriptFile.readLines().join('\n')
      setDirty(false)
      inputArea.caretPosition = 0
      }

      and change fileOpen accordingly to

      void fileOpen(EventObject evt = null) {
      scriptFile = selectFilename()
      if (scriptFile != null)

      { loadScriptFile(scriptFile); }

      }

      The loadScriptFile method isn't strictly necessary but eases the use of Console in an embedded environment.

      Attachments

        Activity

          People

            shemnon Daniel Ferrin
            huxi Joern Huxhorn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: