[xwiki-devs] [VOTE] Apply code style to imports
Hi Devs, Currently we do not have any code style specification for imports. To improve clarity of our commits, I propose that we decide once for all how we would like to have imports. Of course, normalisation of existing code will come with normal commit, I do not intend to update it only for that. Currently, Eclipse does java.*, org.*, com.* separated by blank lines IntelliJ IDEA does com.*,org.* together, than a blank line and java.* Old existing code has there own ordering... I propose the following style: import java.* import org.* import com.* import <anything else> import org.xwiki.* import com.xpn.* import static <any> If we agree on this, necessary IDE setup for both Eclipse and IntelliJ should be prepare/updated. I will take IntelliJ in charge, a volunteer for Eclipse is welcome (Thomas?) WDYT ? Denis -- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO
On Mon, Jun 21, 2010 at 12:55, Denis Gervalle <[email protected]> wrote:
Hi Devs,
Currently we do not have any code style specification for imports. To improve clarity of our commits, I propose that we decide once for all how we would like to have imports. Of course, normalisation of existing code will come with normal commit, I do not intend to update it only for that.
Currently,
Eclipse does java.*, org.*, com.* separated by blank lines IntelliJ IDEA does com.*,org.* together, than a blank line and java.* Old existing code has there own ordering...
I propose the following style:
import java.*
import org.* import com.* import <anything else>
import org.xwiki.* import com.xpn.*
import static <any>
If we agree on this, necessary IDE setup for both Eclipse and IntelliJ should be prepare/updated. I will take IntelliJ in charge, a volunteer for Eclipse is welcome (Thomas?)
Impossible to choose where to put blank lines with Eclipse AFAIK so to follow your proposal that would be import java.* import org.* import com.* import <anything else> import org.xwiki.* import com.xpn.* import static <any> Also there should be javax.* after java.* I think.
WDYT ?
Denis
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
Hi Denis, On 06/21/2010 01:55 PM, Denis Gervalle wrote:
Hi Devs,
Currently we do not have any code style specification for imports. To improve clarity of our commits, I propose that we decide once for all how we would like to have imports. Of course, normalisation of existing code will come with normal commit, I do not intend to update it only for that.
Are you saying that http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-tools/trunk/xwiki-verifica... doesn't include information about import styles?
Currently,
Eclipse does java.*, org.*, com.* separated by blank lines IntelliJ IDEA does com.*,org.* together, than a blank line and java.*
So you're saying that codestyle-eclipse.xml and codestyle-idea.xml are not consistent?
Old existing code has there own ordering...
I propose the following style:
import java.*
import org.* import com.* import<anything else>
import org.xwiki.* import com.xpn.*
import static<any>
If we agree on this, necessary IDE setup for both Eclipse and IntelliJ should be prepare/updated. I will take IntelliJ in charge, a volunteer for Eclipse is welcome (Thomas?)
You mean update codestyle-eclipse.xml and codestyle-idea.xml ? Thanks, Marius
WDYT ?
Denis
On Mon, Jun 21, 2010 at 13:24, Marius Dumitru Florea < [email protected]> wrote:
Hi Denis,
On 06/21/2010 01:55 PM, Denis Gervalle wrote:
Hi Devs,
Currently we do not have any code style specification for imports. To improve clarity of our commits, I propose that we decide once for all how we would like to have imports. Of course, normalisation of existing code will come with normal commit, I do not intend to update it only for that.
Are you saying that
http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-tools/trunk/xwiki-verifica... doesn't include information about import styles?
Sorry, I do not have Eclipse, maybe Thomas could precise this point. What I am saying is that we do not have any written code style for that, and we use the default of the IDE.
Currently,
Eclipse does java.*, org.*, com.* separated by blank lines IntelliJ IDEA does com.*,org.* together, than a blank line and java.*
So you're saying that codestyle-eclipse.xml and codestyle-idea.xml are not consistent?
There are not, probably because we have never look at it and their defaults differ.
Old existing code has there own ordering...
I propose the following style:
import java.*
import org.* import com.* import<anything else>
import org.xwiki.* import com.xpn.*
import static<any>
If we agree on this, necessary IDE setup for both Eclipse and IntelliJ should be prepare/updated. I will take IntelliJ in charge, a volunteer for Eclipse is welcome (Thomas?)
You mean update codestyle-eclipse.xml and codestyle-idea.xml ?
Yes, and if this is not part of codestyle-eclipse, provide what is required to have both IDE in sync. Denis
Thanks, Marius
WDYT ?
Denis
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO
On 06/21/2010 02:36 PM, Denis Gervalle wrote:
On Mon, Jun 21, 2010 at 13:24, Marius Dumitru Florea< [email protected]> wrote:
Hi Denis,
On 06/21/2010 01:55 PM, Denis Gervalle wrote:
Hi Devs,
Currently we do not have any code style specification for imports. To improve clarity of our commits, I propose that we decide once for all how we would like to have imports. Of course, normalisation of existing code will come with normal commit, I do not intend to update it only for that.
Are you saying that
http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-tools/trunk/xwiki-verifica... doesn't include information about import styles?
Sorry, I do not have Eclipse, maybe Thomas could precise this point. What I am saying is that we do not have any written code style for that, and we use the default of the IDE.
Currently,
Eclipse does java.*, org.*, com.* separated by blank lines IntelliJ IDEA does com.*,org.* together, than a blank line and java.*
So you're saying that codestyle-eclipse.xml and codestyle-idea.xml are not consistent?
There are not, probably because we have never look at it and their defaults differ.
I see. It's clear now.
Old existing code has there own ordering...
I propose the following style:
import java.*
import org.* import com.* import<anything else>
import org.xwiki.* import com.xpn.*
I don't think separating this imports from org.* and com.* makes them much more visible. Also, for classes that don't depend on the old core (com.xpn.*) moving org.xwiki.* out of org.* breaks the order. Since we'll eventually drop the com.xpn.* package in favor of org.xwiki.* I think we should keep XWiki's imports under org.* and com.* . I'm +1 for enforcing a style for imports. I'm -0 for separating org.xwiki.* and com.xpn.* from org.* and com.* respectively. Thanks, Marius
import static<any>
If we agree on this, necessary IDE setup for both Eclipse and IntelliJ should be prepare/updated. I will take IntelliJ in charge, a volunteer
for
Eclipse is welcome (Thomas?)
You mean update codestyle-eclipse.xml and codestyle-idea.xml ?
Yes, and if this is not part of codestyle-eclipse, provide what is required to have both IDE in sync.
Denis
Thanks, Marius
WDYT ?
Denis
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On 06/21/2010 04:04 PM, Marius Dumitru Florea wrote:
On 06/21/2010 02:36 PM, Denis Gervalle wrote:
On Mon, Jun 21, 2010 at 13:24, Marius Dumitru Florea< [email protected]> wrote:
Hi Denis,
On 06/21/2010 01:55 PM, Denis Gervalle wrote:
Hi Devs,
Currently we do not have any code style specification for imports. To improve clarity of our commits, I propose that we decide once for all how we would like to have imports. Of course, normalisation of existing code will come with normal commit, I do not intend to update it only for that.
Are you saying that
http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-tools/trunk/xwiki-verifica... doesn't include information about import styles?
Sorry, I do not have Eclipse, maybe Thomas could precise this point. What I am saying is that we do not have any written code style for that, and we use the default of the IDE.
Currently,
Eclipse does java.*, org.*, com.* separated by blank lines IntelliJ IDEA does com.*,org.* together, than a blank line and java.*
So you're saying that codestyle-eclipse.xml and codestyle-idea.xml are not consistent?
There are not, probably because we have never look at it and their defaults differ.
I see. It's clear now.
Old existing code has there own ordering...
I propose the following style:
import java.*
import org.* import com.* import<anything else>
import org.xwiki.* import com.xpn.*
I don't think separating this imports from org.* and com.* makes them much more visible. Also, for classes that don't depend on the old core (com.xpn.*) moving org.xwiki.* out of org.* breaks the order. Since we'll eventually drop the com.xpn.* package in favor of org.xwiki.* I think we should keep XWiki's imports under org.* and com.* .
I'm +1 for enforcing a style for imports. I'm -0 for separating org.xwiki.* and com.xpn.* from org.* and com.* respectively.
Same as Marius.
import static<any>
If we agree on this, necessary IDE setup for both Eclipse and IntelliJ should be prepare/updated. I will take IntelliJ in charge, a volunteer
for
Eclipse is welcome (Thomas?)
You mean update codestyle-eclipse.xml and codestyle-idea.xml ?
Yes, and if this is not part of codestyle-eclipse, provide what is required to have both IDE in sync.
Denis
Thanks, Marius
WDYT ?
Denis
-- Sergiu Dumitriu http://purl.org/net/sergiu/
Well, Based on your feedback, the easiest and probably best solution is to keep the default for Eclipse (so, no need for a special config file) and to configure IntelliJ code style (it is the same file for all) to do the same as Eclipse, which will avoid confusion: import java.* import javax.* import org.* import com.* This choice already have a +1 from Marius, a +1 from Sergiu and here is my +1. I do not think we need long discussion on this, just an agreement, please could you cast your vote on this. Denis On Mon, Jun 21, 2010 at 16:13, Sergiu Dumitriu <[email protected]> wrote:
On 06/21/2010 04:04 PM, Marius Dumitru Florea wrote:
On 06/21/2010 02:36 PM, Denis Gervalle wrote:
On Mon, Jun 21, 2010 at 13:24, Marius Dumitru Florea< [email protected]> wrote:
Hi Denis,
On 06/21/2010 01:55 PM, Denis Gervalle wrote:
Hi Devs,
Currently we do not have any code style specification for imports. To improve clarity of our commits, I propose that we decide once for all how we would like to have imports. Of course, normalisation of existing code will come with normal commit, I do not intend to update it only for that.
Are you saying that
http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-tools/trunk/xwiki-verifica...
doesn't include information about import styles?
Sorry, I do not have Eclipse, maybe Thomas could precise this point. What I am saying is that we do not have any written code style for that, and we use the default of the IDE.
Currently,
Eclipse does java.*, org.*, com.* separated by blank lines IntelliJ IDEA does com.*,org.* together, than a blank line and java.*
So you're saying that codestyle-eclipse.xml and codestyle-idea.xml are not consistent?
There are not, probably because we have never look at it and their defaults differ.
I see. It's clear now.
Old existing code has there own ordering...
I propose the following style:
import java.*
import org.* import com.* import<anything else>
import org.xwiki.* import com.xpn.*
I don't think separating this imports from org.* and com.* makes them much more visible. Also, for classes that don't depend on the old core (com.xpn.*) moving org.xwiki.* out of org.* breaks the order. Since we'll eventually drop the com.xpn.* package in favor of org.xwiki.* I think we should keep XWiki's imports under org.* and com.* .
I'm +1 for enforcing a style for imports. I'm -0 for separating org.xwiki.* and com.xpn.* from org.* and com.* respectively.
Same as Marius.
import static<any>
If we agree on this, necessary IDE setup for both Eclipse and IntelliJ should be prepare/updated. I will take IntelliJ in charge, a volunteer
for
Eclipse is welcome (Thomas?)
You mean update codestyle-eclipse.xml and codestyle-idea.xml ?
Yes, and if this is not part of codestyle-eclipse, provide what is
required
to have both IDE in sync.
Denis
Thanks, Marius
WDYT ?
Denis
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO
On Tue, Jun 22, 2010 at 09:17, Denis Gervalle <[email protected]> wrote:
Well,
Based on your feedback, the easiest and probably best solution is to keep the default for Eclipse (so, no need for a special config file) and to configure IntelliJ code style (it is the same file for all) to do the same as Eclipse, which will avoid confusion:
import java.*
import javax.*
import org.*
import com.*
+1
This choice already have a +1 from Marius, a +1 from Sergiu and here is my +1. I do not think we need long discussion on this, just an agreement, please could you cast your vote on this.
Denis
On Mon, Jun 21, 2010 at 16:13, Sergiu Dumitriu <[email protected]> wrote:
On 06/21/2010 04:04 PM, Marius Dumitru Florea wrote:
On 06/21/2010 02:36 PM, Denis Gervalle wrote:
On Mon, Jun 21, 2010 at 13:24, Marius Dumitru Florea< [email protected]> wrote:
Hi Denis,
On 06/21/2010 01:55 PM, Denis Gervalle wrote:
Hi Devs,
Currently we do not have any code style specification for imports. To improve clarity of our commits, I propose that we decide once for all how we would like to have imports. Of course, normalisation of existing code will come with normal commit, I do not intend to update it only for that.
Are you saying that
http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-tools/trunk/xwiki-verifica...
doesn't include information about import styles?
Sorry, I do not have Eclipse, maybe Thomas could precise this point. What I am saying is that we do not have any written code style for that, and we use the default of the IDE.
Currently,
Eclipse does java.*, org.*, com.* separated by blank lines IntelliJ IDEA does com.*,org.* together, than a blank line and java.*
So you're saying that codestyle-eclipse.xml and codestyle-idea.xml are not consistent?
There are not, probably because we have never look at it and their defaults differ.
I see. It's clear now.
Old existing code has there own ordering...
I propose the following style:
import java.*
import org.* import com.* import<anything else>
import org.xwiki.* import com.xpn.*
I don't think separating this imports from org.* and com.* makes them much more visible. Also, for classes that don't depend on the old core (com.xpn.*) moving org.xwiki.* out of org.* breaks the order. Since we'll eventually drop the com.xpn.* package in favor of org.xwiki.* I think we should keep XWiki's imports under org.* and com.* .
I'm +1 for enforcing a style for imports. I'm -0 for separating org.xwiki.* and com.xpn.* from org.* and com.* respectively.
Same as Marius.
import static<any>
If we agree on this, necessary IDE setup for both Eclipse and IntelliJ should be prepare/updated. I will take IntelliJ in charge, a volunteer
for
Eclipse is welcome (Thomas?)
You mean update codestyle-eclipse.xml and codestyle-idea.xml ?
Yes, and if this is not part of codestyle-eclipse, provide what is
required
to have both IDE in sync.
Denis
Thanks, Marius
WDYT ?
Denis
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
+0 Thanks -Vincent On Jun 22, 2010, at 9:17 AM, Denis Gervalle wrote:
Well,
Based on your feedback, the easiest and probably best solution is to keep the default for Eclipse (so, no need for a special config file) and to configure IntelliJ code style (it is the same file for all) to do the same as Eclipse, which will avoid confusion:
import java.*
import javax.*
import org.*
import com.*
This choice already have a +1 from Marius, a +1 from Sergiu and here is my +1. I do not think we need long discussion on this, just an agreement, please could you cast your vote on this.
Denis
On Mon, Jun 21, 2010 at 16:13, Sergiu Dumitriu <[email protected]> wrote:
On 06/21/2010 04:04 PM, Marius Dumitru Florea wrote:
On 06/21/2010 02:36 PM, Denis Gervalle wrote:
On Mon, Jun 21, 2010 at 13:24, Marius Dumitru Florea< [email protected]> wrote:
Hi Denis,
On 06/21/2010 01:55 PM, Denis Gervalle wrote:
Hi Devs,
Currently we do not have any code style specification for imports. To improve clarity of our commits, I propose that we decide once for all how we would like to have imports. Of course, normalisation of existing code will come with normal commit, I do not intend to update it only for that.
Are you saying that
http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-tools/trunk/xwiki-verifica...
doesn't include information about import styles?
Sorry, I do not have Eclipse, maybe Thomas could precise this point. What I am saying is that we do not have any written code style for that, and we use the default of the IDE.
Currently,
Eclipse does java.*, org.*, com.* separated by blank lines IntelliJ IDEA does com.*,org.* together, than a blank line and java.*
So you're saying that codestyle-eclipse.xml and codestyle-idea.xml are not consistent?
There are not, probably because we have never look at it and their defaults differ.
I see. It's clear now.
Old existing code has there own ordering...
I propose the following style:
import java.*
import org.* import com.* import<anything else>
import org.xwiki.* import com.xpn.*
I don't think separating this imports from org.* and com.* makes them much more visible. Also, for classes that don't depend on the old core (com.xpn.*) moving org.xwiki.* out of org.* breaks the order. Since we'll eventually drop the com.xpn.* package in favor of org.xwiki.* I think we should keep XWiki's imports under org.* and com.* .
I'm +1 for enforcing a style for imports. I'm -0 for separating org.xwiki.* and com.xpn.* from org.* and com.* respectively.
Same as Marius.
import static<any>
If we agree on this, necessary IDE setup for both Eclipse and IntelliJ should be prepare/updated. I will take IntelliJ in charge, a volunteer
for
Eclipse is welcome (Thomas?)
You mean update codestyle-eclipse.xml and codestyle-idea.xml ?
Yes, and if this is not part of codestyle-eclipse, provide what is
required
to have both IDE in sync.
Denis
Thanks, Marius
WDYT ?
Denis
On Mon, Jun 21, 2010 at 13:24, Marius Dumitru Florea <[email protected]> wrote:
Hi Denis,
On 06/21/2010 01:55 PM, Denis Gervalle wrote:
Hi Devs,
Currently we do not have any code style specification for imports. To improve clarity of our commits, I propose that we decide once for all how we would like to have imports. Of course, normalisation of existing code will come with normal commit, I do not intend to update it only for that.
Are you saying that http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-tools/trunk/xwiki-verifica... doesn't include information about import styles?
Yes in Eclipse import configuration is not part of codestyle Formatter configuration, it's another file/configuration.
Currently,
Eclipse does java.*, org.*, com.* separated by blank lines IntelliJ IDEA does com.*,org.* together, than a blank line and java.*
So you're saying that codestyle-eclipse.xml and codestyle-idea.xml are not consistent?
Import has never been configured in IDEA and it's not part of that file in Eclipse so that's not really the issue here.
Old existing code has there own ordering...
I propose the following style:
import java.*
import org.* import com.* import<anything else>
import org.xwiki.* import com.xpn.*
import static<any>
If we agree on this, necessary IDE setup for both Eclipse and IntelliJ should be prepare/updated. I will take IntelliJ in charge, a volunteer for Eclipse is welcome (Thomas?)
You mean update codestyle-eclipse.xml and codestyle-idea.xml ?
Thanks, Marius
WDYT ?
Denis
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
Hi everyone, On 06/21/2010 12:55 PM, Denis Gervalle wrote:
Hi Devs,
Currently we do not have any code style specification for imports. To improve clarity of our commits, I propose that we decide once for all how we would like to have imports. Of course, normalisation of existing code will come with normal commit, I do not intend to update it only for that.
Currently,
Eclipse does java.*, org.*, com.* separated by blank lines IntelliJ IDEA does com.*,org.* together, than a blank line and java.* Old existing code has there own ordering...
I propose the following style:
import java.*
How about import junit.* somewhere here? Regards, Alex
import org.* import com.* import <anything else>
import org.xwiki.* import com.xpn.*
import static <any>
If we agree on this, necessary IDE setup for both Eclipse and IntelliJ should be prepare/updated. I will take IntelliJ in charge, a volunteer for Eclipse is welcome (Thomas?)
WDYT ?
Denis
participants (6)
-
Alex Busenius -
Denis Gervalle -
Marius Dumitru Florea -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol