Re: [proposal] import guidelines

2014-05-20 Thread Matt Sicker
t;>>>>>>>>>>> garydgreg...@gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> So do static imports ALL come before normal imports or are >>>>>>>>>>>&g

Re: [proposal] import guidelines

2014-05-20 Thread Gary Gregory
t;>> >>>>>>>>>>>> Like this: >>>>>>>>>>>> >>>>>>>>>>>> import static org.junit.Assert.assertNotNull; >>>>>>>>>>>> import static org.juni

Re: [proposal] import guidelines

2014-05-20 Thread Remko Popma
t;>>>>>>>> import static org.junit.Assert.assertTrue; >>>>>>>>>>> >>>>>>>>>>> import java.util.List; >>>>>>>>>>> import java.util.Map; >>>>>>>>

Re: [proposal] import guidelines

2014-05-20 Thread Remko Popma
ption; >>>>>>>>>> >>>>>>>>>> or like that: >>>>>>>>>> >>>>>>>>>> import java.util.List; >>>>>>>>>> import java.util.Map; >>>>>>>>

Re: [proposal] import guidelines

2014-05-20 Thread Remko Popma
.Assert.assertTrue; >>>>>>>>> >>>>>>>>> import org.apache.logging.log4j.LogManager; >>>>>>>>> import org.apache.logging.log4j.Logger; >>>>>>>>> import org.apache.logging.log4j.LoggingE

Re: [proposal] import guidelines

2014-05-20 Thread Paul Benedict
og4j.Logger; >>>>>>>> import org.apache.logging.log4j.LoggingException; >>>>>>>> >>>>>>>> Gary >>>>>>>> >>>>>>>> >>>>>>>> On Sat, May 17, 2014 at 5:15 AM, Remko Popma >&g

Re: [proposal] import guidelines

2014-05-20 Thread Gary Gregory
t;>>>>>>> import org.apache.logging.log4j.LoggingException; >>>>>>>> >>>>>>>> Gary >>>>>>>> >>>>>>>> >>>>>>>> On Sat, May 17, 2014 at 5:15 AM, Remko Popma >>>

Re: [proposal] import guidelines

2014-05-20 Thread Remko Popma
y use them in test classes >>>>>>>> 2) always use wildcard static imports >>>>>>>> >>>>>>>> That would match our current usage almost perfectly. We now have a >>>>>>>> total of 431 static imports in the project. >

Re: [proposal] import guidelines

2014-05-20 Thread Gary Gregory
> >>>>>>> // NON-TEST class: remove static import & use qualified name here? >>>>>>> PluginProcessor: >>>>>>> 41: import static javax.tools.Diagnostic.Kind.ERROR; >>>>>>> 42: import static javax.tools.StandardLocation.CLASS_OUTPUT; >

Re: [proposal] import guidelines

2014-05-19 Thread Ralph Goers
essor: >>>>> 41: import static javax.tools.Diagnostic.Kind.ERROR; >>>>> 42: import static javax.tools.StandardLocation.CLASS_OUTPUT; >>>>> >>>>> // all other static imports are in test classes: >>>>> >>>>>

Re: [proposal] import guidelines

2014-05-19 Thread Gary Gregory
t;>>>>> org.junit.Assert.* >>>>>> org.hamcrest.CoreMatchers.* // fluent interface would no longer be >>>>>> fluent without static imports >>>>>> org.easymock.EasyMock.* // similar to org.junit.Assert.* IMHO >>>

Re: [proposal] import guidelines

2014-05-19 Thread Ralph Goers
ld no longer be fluent >>>> without static imports >>>> org.easymock.EasyMock.* // similar to org.junit.Assert.* IMHO >>>> >>>> in LevelTest: >>>> import static org.apache.logging.log4j.Level.*; // I would keep this >>>> stat

Re: [proposal] import guidelines

2014-05-19 Thread Paul Benedict
g.junit.Assert.* >>>>>> org.hamcrest.CoreMatchers.* // fluent interface would no longer be >>>>>> fluent without static imports >>>>>> org.easymock.EasyMock.* // similar to org.junit.Assert.* IMHO >>>>>> >>>>>> i

Re: [proposal] import guidelines

2014-05-19 Thread Gary Gregory
t;>> org.easymock.EasyMock.* // similar to org.junit.Assert.* IMHO >>>>> >>>>> in LevelTest: >>>>> import static org.apache.logging.log4j.Level.*; // I would keep this >>>>> static import: >>>>> The test wants to do th

Re: [proposal] import guidelines

2014-05-19 Thread Ralph Goers
>>>> in LevelTest: >>>> import static org.apache.logging.log4j.Level.*; // I would keep this >>>> static import: >>>> The test wants to do things like "Level[] levels = new Level[] { TRACE, >>>> DEBUG, INFO, WARN, ERROR, FATAL };"

Re: [proposal] import guidelines

2014-05-19 Thread Gary Gregory
t; >>>>>> // all other static imports are in test classes: >>>>>> >>>>>> org.junit.Assert.* >>>>>> org.hamcrest.CoreMatchers.* // fluent interface would no longer be >>>>>> fluent without static imports >>>>>> org.easymock.E

Re: [proposal] import guidelines

2014-05-19 Thread Gary Gregory
rt static org.apache.logging.log4j.Level.*; // I would keep this >>>>> static import: >>>>> The test wants to do things like "Level[] levels = new Level[] { >>>>> TRACE, DEBUG, INFO, WARN, ERROR, FATAL };" >>>>>

Re: [proposal] import guidelines

2014-05-19 Thread Bruce Brouwer
log4j.Level.*; // I would keep this >>>>> static import: >>>>> The test wants to do things like "Level[] levels = new Level[] { >>>>> TRACE, DEBUG, INFO, WARN, ERROR, FATAL };" >>>>> this is short and clean. I don't see a

Re: [proposal] import guidelines

2014-05-19 Thread Remko Popma
ean. I don't see a need to remove the static >>>> import, especially in the context of this being a test class for Levels. >>>> >>>> >>>> >>>> On Sat, May 17, 2014 at 1:46 PM, Ralph Goers < >>>> ralph.go...@dslextreme.com> wrote

Re: [proposal] import guidelines

2014-05-18 Thread Remko Popma
t;> org.easymock.EasyMock.* // similar to org.junit.Assert.* IMHO >>>>>> >>>>>> in LevelTest: >>>>>> import static org.apache.logging.log4j.Level.*; // I would keep this >>>>>> static import: >>>>>> The test wants to do t

Re: [proposal] import guidelines

2014-05-18 Thread Ralph Goers
of this being a test class for Levels. >> >> >> >> On Sat, May 17, 2014 at 1:46 PM, Ralph Goers >> wrote: >> Here is what I have in Intellij - http://imgur.com/wU4Y3wO. I agree with >> Remko that we should make an exception for org.junit.Assert.*

Re: [proposal] import guidelines

2014-05-18 Thread Ralph Goers
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 >

Re: [proposal] import guidelines

2014-05-18 Thread Remko Popma
};" >>>> this is short and clean. I don't see a need to remove the static import, >>>> especially in the context of this being a test class for Levels. >>>> >>>> >>>> >>>>> On Sat, May 17, 2014 at 1:46 PM, Ral

Re: [proposal] import guidelines

2014-05-18 Thread Matt Sicker
make an exception for org.junit.Assert.* >>>> >>>> Ralph >>>> >>>> On May 16, 2014, at 2:53 PM, Gary Gregory >>>> wrote: >>>> >>>> I import most general (java, javax) to most specific (com) with org in >>>> bet

Re: [proposal] import guidelines

2014-05-18 Thread Gary Gregory
ote: >>> >>>> Here is what I have in Intellij - http://imgur.com/wU4Y3wO. I agree >>>> with Remko that we should make an exception for org.junit.Assert.* >>>> >>>> Ralph >>>> >>>> On May 16, 2014, at 2:53 PM, Gary Gregory

Re: [proposal] import guidelines

2014-05-18 Thread Gary Gregory
> > wrote: >>> >>>> Here is what I have in Intellij - http://imgur.com/wU4Y3wO. I agree >>>> with Remko that we should make an exception for org.junit.Assert.* >>>> >>>> Ralph >>>> >>>> On May 16, 2014, at 2:53 PM,

Re: [proposal] import guidelines

2014-05-18 Thread Ralph Goers
at 2:53 PM, Gary Gregory 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

Re: [proposal] import guidelines

2014-05-18 Thread Ralph Goers
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 >&g

Re: [proposal] import guidelines

2014-05-18 Thread Remko Popma
regory >>> 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

Re: [proposal] import guidelines

2014-05-18 Thread Matt Sicker
t; Ralph >>> >>> On May 16, 2014, at 2:53 PM, Gary Gregory >>> 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

Re: [proposal] import guidelines

2014-05-18 Thread Gary Gregory
gt; 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 D

Re: [proposal] import guidelines

2014-05-17 Thread Matt Sicker
;>> 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/

Re: [proposal] import guidelines

2014-05-17 Thread Bruce Brouwer
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 f

Re: [proposal] import guidelines

2014-05-17 Thread Matt Sicker
Original message ---- >> From: Remko Popma >> Date:05/17/2014 05:15 (GMT-05:00) >> To: Log4J Developers List >> Subject: Re: [proposal] import guidelines >> >> Regarding static imports, I propose that we: >> 1) only use them in test classes >>

Re: [proposal] import guidelines

2014-05-17 Thread Ralph Goers
ort stars in some > source files and not others? > > Gary > > > Original message > From: Remko Popma > Date:05/17/2014 05:15 (GMT-05:00) > To: Log4J Developers List > Subject: Re: [proposal] import guidelines > > Regarding static impor

Re: [proposal] import guidelines

2014-05-17 Thread Remko Popma
formatter to only use static import stars in some > source files and not others? > > Gary > > > Original message > From: Remko Popma > Date:05/17/2014 05:15 (GMT-05:00) > To: Log4J Developers List > Subject: Re: [proposal] import guidelines > >

Re: [proposal] import guidelines

2014-05-17 Thread Gary Gregory
How do you tell your IDE formatter to only use static import stars in some source files and not others? Gary Original message From: Remko Popma Date:05/17/2014 05:15 (GMT-05:00) To: Log4J Developers List Subject: Re: [proposal] import guidelines Regarding static imports

Re: [proposal] import guidelines

2014-05-17 Thread Remko Popma
ly. 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 o

Re: [proposal] import guidelines

2014-05-16 Thread Ralph Goers
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 muc

Re: [proposal] import guidelines

2014-05-16 Thread Paul Benedict
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] i

Re: [proposal] import guidelines

2014-05-16 Thread Remko Popma
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". Wh

Re: [proposal] import guidelines

2014-05-16 Thread Gary Gregory
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".

Re: [proposal] import guidelines

2014-05-16 Thread Paul Benedict
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

[proposal] import guidelines

2014-05-16 Thread Gary Gregory
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 .