Quantcast

Help with task: GroovyConsole improvement: configurable output area size

Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Help with task: GroovyConsole improvement: configurable output area size

Emilian Bold
Hello,

I would like to help out with the task listed at https://helpwanted.apache.org/task.html?72ff9c55

Console.groovy maxOutputChars already has a System.property so I'm not certain what's required for #GROOVY-3270, perhaps something like:

-    int maxOutputChars = System.getProperty('groovy.console.output.limit','20000') as int
+    int maxOutputChars = prefs.getInt("outputLimit", 20000)

--emi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with task: GroovyConsole improvement: configurable output area size

jwagenleitner
Hi Emilian,

I added a comment on that issue, I think it would also be handy to have a new Preferences dialog for general settings such as this. Having a dialog behind a new menu item such as Edit > Preferences could have an edit box for inputting/displaying the output limit that is backed by a preference. This could also be where the log to file option could be place (another request [1]).  In case some bits may be helpful, I started to play with this a while back just to get more familiar with Swing/Groovy but never finished [2].

Glad to hear you found this issue on the help wanted site.

John


On Fri, May 19, 2017 at 7:31 AM, Emilian Bold <[hidden email]> wrote:
Hello,

I would like to help out with the task listed at https://helpwanted.apache.org/task.html?72ff9c55

Console.groovy maxOutputChars already has a System.property so I'm not certain what's required for #GROOVY-3270, perhaps something like:

-    int maxOutputChars = System.getProperty('groovy.console.output.limit','20000') as int
+    int maxOutputChars = prefs.getInt("outputLimit", 20000)

--emi

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with task: GroovyConsole improvement: configurable output area size

Emilian Bold
You initial dialog is a good start, but what should it hold: all the pref keys from Console? Or just start with maxOutputChars? 

The log file UI should be added once #8180 is done.

I never touched GroovyConsole before, but it seems interesting. Reminds me of ANTLRWorks which I just used the other week for some small parser.

Also, this console would also make a fine IDE plugin. Any particular reason GroovyConsole has to be standalone?



--emi

On Fri, May 19, 2017 at 6:01 PM, John Wagenleitner <[hidden email]> wrote:
Hi Emilian,

I added a comment on that issue, I think it would also be handy to have a new Preferences dialog for general settings such as this. Having a dialog behind a new menu item such as Edit > Preferences could have an edit box for inputting/displaying the output limit that is backed by a preference. This could also be where the log to file option could be place (another request [1]).  In case some bits may be helpful, I started to play with this a while back just to get more familiar with Swing/Groovy but never finished [2].

Glad to hear you found this issue on the help wanted site.

John


On Fri, May 19, 2017 at 7:31 AM, Emilian Bold <[hidden email]> wrote:
Hello,

I would like to help out with the task listed at https://helpwanted.apache.org/task.html?72ff9c55

Console.groovy maxOutputChars already has a System.property so I'm not certain what's required for #GROOVY-3270, perhaps something like:

-    int maxOutputChars = System.getProperty('groovy.console.output.limit','20000') as int
+    int maxOutputChars = prefs.getInt("outputLimit", 20000)

--emi


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with task: GroovyConsole improvement: configurable output area size

jwagenleitner
Hi Emilian,

On Sat, May 20, 2017 at 7:35 AM, Emilian Bold <[hidden email]> wrote:
You initial dialog is a good start, but what should it hold: all the pref keys from Console? Or just start with maxOutputChars? 


I don't think it would be necessary to add all the options already available to the dialog, so initially I'd just see it having the maxOutputChars setting.  Another option would be to add the setting under the "View" menu and have it pop up a specialized dialog used to just capture the maxOutputChars.  Not sure which is better, just sort of feels like the existing menu is getting kind of crowded so that's why I was initially thinking a general "Settings" dialog would a way to go.
 
The log file UI should be added once #8180 is done.

I never touched GroovyConsole before, but it seems interesting. Reminds me of ANTLRWorks which I just used the other week for some small parser.

Also, this console would also make a fine IDE plugin. Any particular reason GroovyConsole has to be standalone?


I know IDEA provides a GroovyConsole and GroovyShell under the Tools menu when Groovy is part of the project.
 


--emi

On Fri, May 19, 2017 at 6:01 PM, John Wagenleitner <[hidden email]> wrote:
Hi Emilian,

I added a comment on that issue, I think it would also be handy to have a new Preferences dialog for general settings such as this. Having a dialog behind a new menu item such as Edit > Preferences could have an edit box for inputting/displaying the output limit that is backed by a preference. This could also be where the log to file option could be place (another request [1]).  In case some bits may be helpful, I started to play with this a while back just to get more familiar with Swing/Groovy but never finished [2].

Glad to hear you found this issue on the help wanted site.

John


On Fri, May 19, 2017 at 7:31 AM, Emilian Bold <[hidden email]> wrote:
Hello,

I would like to help out with the task listed at https://helpwanted.apache.org/task.html?72ff9c55

Console.groovy maxOutputChars already has a System.property so I'm not certain what's required for #GROOVY-3270, perhaps something like:

-    int maxOutputChars = System.getProperty('groovy.console.output.limit','20000') as int
+    int maxOutputChars = prefs.getInt("outputLimit", 20000)

--emi



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with task: GroovyConsole improvement: configurable output area size

Emilian Bold
See https://github.com/emilianbold/groovy/commit/6d0e4fa95190580d49e225b47158c79c42fa68f6

I've started from your solution and made some changes:

* Console.groovy also needs to load maxOutputChars from the prefs
* ConsolePreferences.groovy fixes only this issue, without the log file. The layout is also simpler and with less hardcoded dimensions
* MacOSXMenuBar.groovy moves the action into the standard App | Preferences menu


--emi

On Sat, May 20, 2017 at 6:16 PM, John Wagenleitner <[hidden email]> wrote:
Hi Emilian,

On Sat, May 20, 2017 at 7:35 AM, Emilian Bold <[hidden email]> wrote:
You initial dialog is a good start, but what should it hold: all the pref keys from Console? Or just start with maxOutputChars? 


I don't think it would be necessary to add all the options already available to the dialog, so initially I'd just see it having the maxOutputChars setting.  Another option would be to add the setting under the "View" menu and have it pop up a specialized dialog used to just capture the maxOutputChars.  Not sure which is better, just sort of feels like the existing menu is getting kind of crowded so that's why I was initially thinking a general "Settings" dialog would a way to go.
 
The log file UI should be added once #8180 is done.

I never touched GroovyConsole before, but it seems interesting. Reminds me of ANTLRWorks which I just used the other week for some small parser.

Also, this console would also make a fine IDE plugin. Any particular reason GroovyConsole has to be standalone?


I know IDEA provides a GroovyConsole and GroovyShell under the Tools menu when Groovy is part of the project.
 


--emi

On Fri, May 19, 2017 at 6:01 PM, John Wagenleitner <[hidden email]> wrote:
Hi Emilian,

I added a comment on that issue, I think it would also be handy to have a new Preferences dialog for general settings such as this. Having a dialog behind a new menu item such as Edit > Preferences could have an edit box for inputting/displaying the output limit that is backed by a preference. This could also be where the log to file option could be place (another request [1]).  In case some bits may be helpful, I started to play with this a while back just to get more familiar with Swing/Groovy but never finished [2].

Glad to hear you found this issue on the help wanted site.

John


On Fri, May 19, 2017 at 7:31 AM, Emilian Bold <[hidden email]> wrote:
Hello,

I would like to help out with the task listed at https://helpwanted.apache.org/task.html?72ff9c55

Console.groovy maxOutputChars already has a System.property so I'm not certain what's required for #GROOVY-3270, perhaps something like:

-    int maxOutputChars = System.getProperty('groovy.console.output.limit','20000') as int
+    int maxOutputChars = prefs.getInt("outputLimit", 20000)

--emi




Loading...