I propose that we use wildcart imports for static imports. (I believe that's 
why this thread was started in the first place.)

As Gary pointed out, often it is better to avoid static imports, but there are 
places where it is just too convenient. 
JUnit tests is one of those places. 
I really don't want to write Assert.assertEquals everywhere, just assertEquals 
is fine and pretty standard for JUnit tests. 

However, without wildcart static imports this becomes painful again: if one 
assertSomething method is explicitly imported, autocomplete will only show that 
one method. 

Until recently, the de facto standard was wildcart static imports in JUnit 
tests. I'd like to revert back to that. 

Remko
 

Sent from my iPhone

> On 2014/05/17, at 6:53, Gary Gregory <garydgreg...@gmail.com> wrote:
> 
> I import most general (java, javax) to most specific (com) with org in 
> between. I think this is the eclipse default. 
> 
> I want guidelines that eclipse can sort automatically.  This way there is no 
> time wasting with manual fiddling. 
> 
> Gary
> 
> 
> -------- Original message --------
> From: Paul Benedict
> Date:05/16/2014 15:12 (GMT-05:00) 
> To: Log4J Developers List
> Subject: Re: [proposal] import guidelines
> 
> I'd like to throw out something I've grown fond of, which is making one's 
> home project the top import priority. For you guys, it would be 
> "org.apache.logging.log4j". What I like so much about this choice is that it 
> makes eye-balling the use of your own classes very apparent.
> 
> Paul
> 
> 
> Cheers,
> Paul
> 
> 
>> On Thu, May 15, 2014 at 12:44 PM, Gary Gregory <garydgreg...@gmail.com> 
>> wrote:
>> I propose we use the following guidelines for import statements:
>> 
>> https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/src/ide/eclipse/4.3.2/organize-imports.importorder
>> 
>> which in Eclipse looks like this:
>> 
>> https://i.imgur.com/04C84XY.png
>> 
>> Note that default settings are not reflected in the .importorder file.
>> 
>> Gary
>> 
>> -- 
>> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org 
>> Java Persistence with Hibernate, Second Edition
>> JUnit in Action, Second Edition
>> Spring Batch in Action
>> Blog: http://garygregory.wordpress.com 
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
> 

Reply via email to