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

Allow config file to overide defaults for groovy console font size and console height and width

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6-beta-2
    • 1.7-beta-1
    • Groovy Console
    • None
    • all
    • Patch

    Description

      A patch is attached that applies the enhancement described below.

      The groovy (and grails) consoles currently have a hard coded font size of 12 pixels. It also has a hard coded width of approximately 80 characters and a height of about 24 lines of text (12 for the input area and 12 for the output area).

      There are shortcuts to increase the font size (cmd-shift-L on the mac), and it is also possible to drag the swing window to cover a large area, but these steps need to be repeated every time a new console window is opened.

      The default font sizes and area covered by the console is quite small when viewed on modern monitor resolutions of 1920x1200 and greater. I know that for myself and another coworker, this is something we do many times a day (and it gets old .

      The attached patch allows for a configuration file (in GroovyConfig format) to be created in the users home directory, under (~/.groovy/ConsoleConfig.groovy by default on mac/unix systems).

      If this file exists, the user can override the font size of the input area and the output area and can also specify the height and width of both areas independently.

      Here is a sample config file created at (~/.groovy/ConsoleConfig.groovy):

      console {
      inputArea

      { fontSize=18 width=1440 height=800 }

      outputArea

      { fontSize=16 width=1440 height=200 }

      }

      This creates a large input area with big font, and a smaller output area with a slightly smaller font.

      If the ConsoleConfig.groovy file is not present, the current default are used.

      Attachments

        Activity

          People

            guillaume Guillaume Sauthier
            tnaleid Ted Naleid
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: