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

GroovyConsole: Configurable output area size

    Details

      Description

      I am prototyping some code with GroovyConsole and I find it convenient to use "println" to the output area and copy/paste the result into another file. The output now is too big for the default size of the output, is there a way to increase it with an option?

      Also from Jim White:

      In addition to making that setting configurable, a log-to-file option would be nice.

      Note: I have moved the log to file request to another issue: GROOVY-8180

      Ideally the output size could be set (probably under the View menu) but if nothing else a system property would be an improvement.

        Issue Links

          Activity

          Hide
          jwagenleitner John Wagenleitner added a comment -

          Thanks for the suggested improvement, proposed PR was merged.

          Show
          jwagenleitner John Wagenleitner added a comment - Thanks for the suggested improvement, proposed PR was merged.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/groovy/pull/548

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/548
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user emilianbold opened a pull request:

          https://github.com/apache/groovy/pull/548

          GROOVY-3270: GroovyConsole: Configurable output area size

          Based on the solution started byJohn Wagenleitner.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/emilianbold/groovy console-configurable-output-3270

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/groovy/pull/548.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #548


          commit 6d0e4fa95190580d49e225b47158c79c42fa68f6
          Author: Emilian Bold <emi@apache.org>
          Date: 2017-05-21T20:18:39Z

          GROOVY-3270: GroovyConsole: Configurable output area size


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user emilianbold opened a pull request: https://github.com/apache/groovy/pull/548 GROOVY-3270 : GroovyConsole: Configurable output area size Based on the solution started byJohn Wagenleitner. You can merge this pull request into a Git repository by running: $ git pull https://github.com/emilianbold/groovy console-configurable-output-3270 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/groovy/pull/548.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #548 commit 6d0e4fa95190580d49e225b47158c79c42fa68f6 Author: Emilian Bold <emi@apache.org> Date: 2017-05-21T20:18:39Z GROOVY-3270 : GroovyConsole: Configurable output area size
          Hide
          jwagenleitner John Wagenleitner added a comment -

          I think it would be handy to have a new Preferences dialog for general settings such as this. Most current prefs are toggled from the Edit and Script menus. Having a dialog behind a new menu item such as Edit > Preferences could have an edit box for inputting/displaying the output limit which is backed by a preference. This could also be where the log to file option could be place (another request).

          In case some bits of it may be helpful, I had started working on this a long time ago but never finished, https://github.com/jwagenleitner/groovy/commit/f0181f1564fdb0357b3852d15b0730582cc468ce.

          Show
          jwagenleitner John Wagenleitner added a comment - I think it would be handy to have a new Preferences dialog for general settings such as this. Most current prefs are toggled from the Edit and Script menus. Having a dialog behind a new menu item such as Edit > Preferences could have an edit box for inputting/displaying the output limit which is backed by a preference. This could also be where the log to file option could be place (another request). In case some bits of it may be helpful, I had started working on this a long time ago but never finished, https://github.com/jwagenleitner/groovy/commit/f0181f1564fdb0357b3852d15b0730582cc468ce .
          Hide
          emi Emilian Bold added a comment -

          This bug is listed on helpwanted.apache.org

          I would like to take a crack at it.

          Show
          emi Emilian Bold added a comment - This bug is listed on helpwanted.apache.org I would like to take a crack at it.
          Hide
          fjanon Fred Janon added a comment -

          >groovy.ui.Console.consoleControllers[0].@maxOutputChars=1000000

          Thanks for the trick!

          Show
          fjanon Fred Janon added a comment - >groovy.ui.Console.consoleControllers [0] .@maxOutputChars=1000000 Thanks for the trick!
          Hide
          dariusan dariusan added a comment -

          In the meanwhile as a workaround you could use:

           groovy.ui.Console.consoleControllers[0].@maxOutputChars=1000000
          
          
          Show
          dariusan dariusan added a comment - In the meanwhile as a workaround you could use: groovy.ui.Console.consoleControllers[0].@maxOutputChars=1000000
          Hide
          robertoschwald Robert Oschwald added a comment -

          The output buffer is quite small, so output is truncated. Only solution I know of is to log into a file. It would be great if you're able to set the output buffer size yourself.

          Show
          robertoschwald Robert Oschwald added a comment - The output buffer is quite small, so output is truncated. Only solution I know of is to log into a file. It would be great if you're able to set the output buffer size yourself.
          Hide
          hamletdrc Hamlet D'Arcy added a comment -

          what do you mean the output is too big? Does the output window limit the amount of characters printed at some point?

          Show
          hamletdrc Hamlet D'Arcy added a comment - what do you mean the output is too big? Does the output window limit the amount of characters printed at some point?

            People

            • Assignee:
              jwagenleitner John Wagenleitner
              Reporter:
              fjanon Fred Janon
            • Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development