groovy
  1. groovy
  2. GROOVY-3969

Groovy Console forgets size of input area

    Details

    • Number of attachments :
      2

      Description

      When I start Groovy Console, the input area is sometimes only one line high (rest of the window is occupied by output area). See screenshot.
      After adjusting the size of the input area, it is remembered for a while (across restarts of Groovy Console), until it goes back to one line high after yet another restart. Happens at least once a day. Can't reproduce by quitting and immediately restarting Groovy Console, even if I try several times in a row.

      1. 958da2d-3bc1437.diff
        1 kB
        Tai Siew Joon
      1. GroovyConsole.png
        33 kB

        Activity

        Hide
        Guillaume Laforge added a comment -

        Do you have a dual monitor setup?
        I noticed the settings aren't always properly remembered all the time, and I thought it was in the case of a dual monitor setup.
        Is it your case too?

        Show
        Guillaume Laforge added a comment - Do you have a dual monitor setup? I noticed the settings aren't always properly remembered all the time, and I thought it was in the case of a dual monitor setup. Is it your case too?
        Hide
        Peter Niederwieser added a comment -

        No, I'm currently away from home and working on my laptop.

        Show
        Peter Niederwieser added a comment - No, I'm currently away from home and working on my laptop.
        Hide
        Paul King added a comment -

        Are you by any chance rebuilding Groovy between invocations of the console?

        Show
        Paul King added a comment - Are you by any chance rebuilding Groovy between invocations of the console?
        Hide
        Peter Niederwieser added a comment -

        No, this happens with the downloaded distribution (1.7.0, 1.7.1) and without building manually between invocations. Haven't checked if it's still there in 1.7.2 and trunk.

        Show
        Peter Niederwieser added a comment - No, this happens with the downloaded distribution (1.7.0, 1.7.1) and without building manually between invocations. Haven't checked if it's still there in 1.7.2 and trunk.
        Hide
        Hamlet D'Arcy added a comment -

        does this happen any more on the head? I changed some of the preferences code a few weeks ago and I believe I fixed this. I have tested on Ubuntu and it is fixed.

        Show
        Hamlet D'Arcy added a comment - does this happen any more on the head? I changed some of the preferences code a few weeks ago and I believe I fixed this. I have tested on Ubuntu and it is fixed.
        Hide
        Paul King added a comment -

        I still have wierd resize issues with trunk on Windows when using dual screens - so I suspect that not everything is fixed.

        Show
        Paul King added a comment - I still have wierd resize issues with trunk on Windows when using dual screens - so I suspect that not everything is fixed.
        Hide
        Aaron Zirbes added a comment - - edited

        The settings get saved to the following file on my Ubuntu machine:

        ~/.java/.userPrefs/groovy/ui/prefs.xml

        And when the sizes get too big (4500x2200 +), the application won't un-minimize.

        My temporary work-around is to create a 'groovyCon' script that deletes this file before launching the groovyConsole.
        I also have dual-monitors if that helps diagnose the problem. My actual desktop workspace size is 3360x1050.

        Show
        Aaron Zirbes added a comment - - edited The settings get saved to the following file on my Ubuntu machine: ~/.java/.userPrefs/groovy/ui/prefs.xml And when the sizes get too big (4500x2200 +), the application won't un-minimize. My temporary work-around is to create a 'groovyCon' script that deletes this file before launching the groovyConsole. I also have dual-monitors if that helps diagnose the problem. My actual desktop workspace size is 3360x1050.
        Hide
        Tai Siew Joon added a comment -

        I've attached a patch which should fix the size problem. The patch has been tested on 2.1.7.

        Show
        Tai Siew Joon added a comment - I've attached a patch which should fix the size problem. The patch has been tested on 2.1.7.
        Hide
        Pascal Schumacher added a comment -

        Hello Tai Siew Joon,

        thanks for the patch.

        I converted it to a pull request to make the review a bit easier.

        Sadly I can not review it myself as I know next to nothing about Swing, but I hope another member of the Groovy team will soon review your patch.

        Show
        Pascal Schumacher added a comment - Hello Tai Siew Joon, thanks for the patch. I converted it to a pull request to make the review a bit easier. Sadly I can not review it myself as I know next to nothing about Swing, but I hope another member of the Groovy team will soon review your patch.
        Hide
        Pascal Schumacher added a comment -

        Patch applied. Thanks for providing it.

        Show
        Pascal Schumacher added a comment - Patch applied. Thanks for providing it.

          People

          • Assignee:
            Pascal Schumacher
            Reporter:
            Peter Niederwieser
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: