I wrote the original style guide, and we never even mentioned import order (mostly because we didn't care).
However, all of the original code used the eclipse defaults (alphabetical, with java and javax at the bottom) with org.apache.shindig always at the top. This was consistent because there were only 3 people committing at the time. The original code was packaged as com.google.opensocial, but John and I renamed all of those to org.apache.shindig when we made the original code grant. At some point in time, some google employees started committing and using the import order in the second grouping, which is obviously wrong. I don't care that much about whether or not the org.apache.shindig imports get special treatment, but com.google, org.abdera absolutely should not. My personal preference would be that we used a simple alpha order (using the full package name). It's almost impossible to get wrong. On Tue, Apr 21, 2009 at 3:49 PM, Adam Winer <[email protected]> wrote: > All, > > I've been using the following order for imports (from first to last): > > org > java > javax > com > > Ian told me today this is wrong, and it should be (from first to last): > > com.google > com > junit > net > org.apache.shindig > org.apache.abdera (not used in Shindig anymore) > org > java > javax > > This is in > http://svn.apache.org/repos/asf/incubator/shindig/trunk/etc/eclipse/shindig.importorder > , > but isn't explicitly described anywhere. > > I've no strong opinions, and just want to get the right answer > documented in the style guide at: > > http://incubator.apache.org/shindig/community/conventions/code.html > > The only changes I'd like to see is removing the special-case for > com.google, and deleting the abdera reference (we don't use it > anymore). > > -- Adam >

