Russel Winder | 1 Nov 2009 08:53
Gravatar

[groovy-dev] Re: [groovy-scm] [18176] trunk/groovy/groovy-core/src/main/groovy/ui: GROOVY-3765: additional tweak to get line number fonts correct on Windows

Paul,

I though coding policy was not to use * imports.  Listing all the
imports explicitly is good documentation.  Using * pollutes the
namespace in the code. 

On Sun, 2009-11-01 at 01:44 -0600, paulk@... wrote:
[ . . . ]
> 
> --- trunk/groovy/groovy-core/src/main/groovy/ui/ConsoleTextEditor.java	2009-10-31 18:39:48
UTC (rev 18175)
> +++ trunk/groovy/groovy-core/src/main/groovy/ui/ConsoleTextEditor.java	2009-11-01 07:44:53
UTC (rev 18176)
>  <at>  <at>  -23,14 +23,7  <at>  <at> 
>  import groovy.ui.text.TextEditor;
>  import groovy.ui.text.TextUndoManager;
>  
> -import javax.swing.AbstractAction;
> -import javax.swing.Action;
> -import javax.swing.ActionMap;
> -import javax.swing.InputMap;
> -import javax.swing.JComponent;
> -import javax.swing.JPanel;
> -import javax.swing.JScrollPane;
> -import javax.swing.KeyStroke;
> +import javax.swing.*;
>  import javax.swing.event.DocumentEvent;
>  import javax.swing.event.DocumentListener;
>  import javax.swing.text.BadLocationException;

(Continue reading)

Paul King | 1 Nov 2009 09:19
Picon
Favicon
Gravatar

Re: [groovy-dev] Re: [groovy-scm] [18176] trunk/groovy/groovy-core/src/main/groovy/ui: GROOVY-3765: additional tweak to get line number fonts correct on Windows


I'll fix that. I bumped my IntelliJ auto star setting to 8.
First time it caught me out. Maybe I should disable it! ;-)

I guess we should document such settings too - in checkstyle
and/or on the wiki.

Paul.

Russel Winder wrote:
> Paul,
> 
> I though coding policy was not to use * imports.  Listing all the
> imports explicitly is good documentation.  Using * pollutes the
> namespace in the code. 
> 
> On Sun, 2009-11-01 at 01:44 -0600, paulk@... wrote:
> [ . . . ]
>> --- trunk/groovy/groovy-core/src/main/groovy/ui/ConsoleTextEditor.java	2009-10-31 18:39:48
UTC (rev 18175)
>> +++ trunk/groovy/groovy-core/src/main/groovy/ui/ConsoleTextEditor.java	2009-11-01 07:44:53
UTC (rev 18176)
>>  <at>  <at>  -23,14 +23,7  <at>  <at> 
>>  import groovy.ui.text.TextEditor;
>>  import groovy.ui.text.TextUndoManager;
>>  
>> -import javax.swing.AbstractAction;
>> -import javax.swing.Action;
>> -import javax.swing.ActionMap;
>> -import javax.swing.InputMap;
(Continue reading)

Russel Winder | 1 Nov 2009 10:29
Gravatar

Re: [groovy-dev] Re: [groovy-scm] [18176] trunk/groovy/groovy-core/src/main/groovy/ui: GROOVY-3765: additional tweak to get line number fonts correct on Windows

On Sun, 2009-11-01 at 18:19 +1000, Paul King wrote:
> I'll fix that. I bumped my IntelliJ auto star setting to 8.
> First time it caught me out. Maybe I should disable it! ;-)

Thanks.  Sorry for being a pain by mentioning it, but I really hate the
* imports and I think IntelliJ IDEA should ban them permanently.
Likewise Eclipse, NetBeans and Emacs.

> I guess we should document such settings too - in checkstyle
> and/or on the wiki.

I guess we should start a checkstyle for the Groovy code -- and treat
violations as errors in unit testing!  I should add it to Gant as an
experiment to see if I understand how to set it up.

--

-- 
Russel.
=============================================================================
Dr Russel Winder      Partner
                                            xmpp: russel@...
Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:russel.winder <at> ekiga.net
London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder
Paul King | 1 Nov 2009 11:25
Picon
Favicon
Gravatar

Re: [groovy-dev] Re: [groovy-scm] [18176] trunk/groovy/groovy-core/src/main/groovy/ui: GROOVY-3765: additional tweak to get line number fonts correct on Windows


CheckStyle is already there for Groovy, we just don't enforce it
nor do we have the star import check enabled. For some examples,
see:

http://build.canoo.com/groovy/artifacts/20091029121859/reports/checkstyle/index.html

You will see RedundantImportCheck and UnusedImportsCheck for instance.
We really should fix these!

Paul.

Russel Winder wrote:
> On Sun, 2009-11-01 at 18:19 +1000, Paul King wrote:
>> I'll fix that. I bumped my IntelliJ auto star setting to 8.
>> First time it caught me out. Maybe I should disable it! ;-)
> 
> Thanks.  Sorry for being a pain by mentioning it, but I really hate the
> * imports and I think IntelliJ IDEA should ban them permanently.
> Likewise Eclipse, NetBeans and Emacs.
> 
>> I guess we should document such settings too - in checkstyle
>> and/or on the wiki.
> 
> I guess we should start a checkstyle for the Groovy code -- and treat
> violations as errors in unit testing!  I should add it to Gant as an
> experiment to see if I understand how to set it up.
> 

---------------------------------------------------------------------
(Continue reading)


Gmane