You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Richard S. Hall" <he...@ungoverned.org> on 2007/12/17 16:50:22 UTC
Re: svn commit: r604816 -
/felix/trunk/main/src/main/java/org/apache/felix/main/Main.java
On Mon, 17 Dec 2007 10:30:09 -0000
cziegeler@apache.org wrote:
Our coding style guide says that we do not list all imported packages after exceeding a "readability limit"...I am not sure what the readability limit is, but for me in Eclipse I set it to 3 references beforing going to "*"...does anyone know if it is possible to set this limit in NetBeans?
At any rate, do we need to be more specific in our coding style guide?
-> richard
> Author: cziegeler
> Date: Mon Dec 17 02:30:08 2007
> New Revision: 604816
>
> URL: http://svn.apache.org/viewvc?rev=604816&view=rev
> Log:
> Organize imports.
>
> Modified:
> felix/trunk/main/src/main/java/org/apache/felix/main/Main.java
>
> Modified: felix/trunk/main/src/main/java/org/apache/felix/main/Main.java
> URL: http://svn.apache.org/viewvc/felix/trunk/main/src/main/java/org/apache/felix/main/Main.java?rev=604816&r1=604815&r2=604816&view=diff
> ==============================================================================
> --- felix/trunk/main/src/main/java/org/apache/felix/main/Main.java (original)
> +++ felix/trunk/main/src/main/java/org/apache/felix/main/Main.java Mon Dec 17 02:30:08 2007
> @@ -18,14 +18,25 @@
> */
> package org.apache.felix.main;
>
> -import java.io.*;
> +import java.io.BufferedReader;
> +import java.io.File;
> +import java.io.FileNotFoundException;
> +import java.io.IOException;
> +import java.io.InputStream;
> +import java.io.InputStreamReader;
> import java.net.MalformedURLException;
> import java.net.URL;
> -import java.util.*;
> +import java.util.ArrayList;
> +import java.util.Enumeration;
> +import java.util.HashMap;
> +import java.util.Iterator;
> +import java.util.List;
> +import java.util.Map;
> +import java.util.Properties;
> +import java.util.StringTokenizer;
>
> import org.apache.felix.framework.Felix;
> import org.apache.felix.framework.cache.BundleCache;
> -import org.apache.felix.framework.util.FelixConstants;
> import org.apache.felix.framework.util.StringMap;
> import org.osgi.framework.Bundle;
> import org.osgi.framework.BundleActivator;
>
>
Re: svn commit: r604816 - /felix/trunk/main/src/main/java/org/apache/felix/main/Main.java
Posted by Stuart McCulloch <st...@jayway.net>.
On 18/12/2007, Carsten Ziegeler <cz...@apache.org> wrote:
>
> Richard S. Hall wrote:
> > I prefer to not list them all and I do regularly open in vi for quick
> edits. However, I am willing to go with consensus opinion, but my vote would
> be "-1".
> >
> Hehe, and I would likewise vote "-1" for your prefered solution :)
>
> Ok, I think we have more important stuff to do. I changed my Eclipse
> settings and reverted the changes (except that I removed the unused
> import)
my 2 sen:
I usually list all imports because I've seen problems before where the same
class name
exists in more than one package, and using a wildcard import often means you
need to
use the fully qualified name - even if you only actually use one of the
actual classes...
but I can live with either solution :)
Carsten
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
--
Cheers, Stuart
Re: svn commit: r604816 - /felix/trunk/main/src/main/java/org/apache/felix/main/Main.java
Posted by Carsten Ziegeler <cz...@apache.org>.
Richard S. Hall wrote:
> I prefer to not list them all and I do regularly open in vi for quick edits. However, I am willing to go with consensus opinion, but my vote would be "-1".
>
Hehe, and I would likewise vote "-1" for your prefered solution :)
Ok, I think we have more important stuff to do. I changed my Eclipse
settings and reverted the changes (except that I removed the unused import)
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: svn commit: r604816 -
/felix/trunk/main/src/main/java/org/apache/felix/main/Main.java
Posted by "Richard S. Hall" <he...@ungoverned.org>.
On Mon, 17 Dec 2007 17:44:48 +0100
Carsten Ziegeler <cz...@apache.org> wrote:
> Richard S. Hall wrote:
> > On Mon, 17 Dec 2007 10:30:09 -0000
> > cziegeler@apache.org wrote:
> >
> > Our coding style guide says that we do not list all imported packages after exceeding a "readability limit"...I am not sure what the readability limit is, but for me in Eclipse I set it to 3 references beforing going to "*"...does anyone know if it is possible to set this limit in NetBeans?
> >
> > At any rate, do we need to be more specific in our coding style guide?
> >
> Yes :) This is something I wanted to address but totally forgot about
> it. Sorry for first committing.
>
> I think we should always list all imports - the readability limit is in
> most cases more or less useless. If you import from a lot of packages it
> doesn't help anyway (now we could argue if importing from a dozen
> packages is a good thing, but thats a different story). And if you want
> to see what a class is exactly using, a complete list of all imports is
> much more helpful.
>
> Modern ides can hide all imports in the editor anyway.
I prefer to not list them all and I do regularly open in vi for quick edits. However, I am willing to go with consensus opinion, but my vote would be "-1".
-> richard
>
> Carsten
>
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
Re: svn commit: r604816 - /felix/trunk/main/src/main/java/org/apache/felix/main/Main.java
Posted by Carsten Ziegeler <cz...@apache.org>.
Richard S. Hall wrote:
> On Mon, 17 Dec 2007 10:30:09 -0000
> cziegeler@apache.org wrote:
>
> Our coding style guide says that we do not list all imported packages after exceeding a "readability limit"...I am not sure what the readability limit is, but for me in Eclipse I set it to 3 references beforing going to "*"...does anyone know if it is possible to set this limit in NetBeans?
>
> At any rate, do we need to be more specific in our coding style guide?
>
Yes :) This is something I wanted to address but totally forgot about
it. Sorry for first committing.
I think we should always list all imports - the readability limit is in
most cases more or less useless. If you import from a lot of packages it
doesn't help anyway (now we could argue if importing from a dozen
packages is a good thing, but thats a different story). And if you want
to see what a class is exactly using, a complete list of all imports is
much more helpful.
Modern ides can hide all imports in the editor anyway.
Carsten
--
Carsten Ziegeler
cziegeler@apache.org