Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6-beta-2
-
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
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.