Re: [JBoss-dev] JBoss Code Style Guide

2002-02-13 Thread Marco Hunsicker

On 12 Feb 2002 15:24:31 -0800, Jason Dillon wrote:

>Has anyone played with a decent cross platform tool that can easily
>translate from style to style?  It seems that we will always have this
>problem, but if we could gave something translate a users style back
>into jboss style then we can end this thread once and for all.  Should
>also help improve diffs.

Well, there is currently one under development. It's called Jalopy and
has just reached beta status. I'm currently uploading the second beta
(called jalopy-1.0b1 ;-) and have to state that this code is not fully
tested (not an easy task) but does a fairly good job for me.

I've tested it with 
  - castor 0.9.3
  - Doug Lea's util.concurrent 1.3
  - jaxp 1.1
  - log4j 1.1.3
  - jboss 2.2.2
  - jedit 3.2.2
  - xalan 2.1.0
  - jgl 3.1.0

and after resolving the places where a developer used the keyword
"assert", it went without problems
(the used parser parses JDK 1.4 syntax, derived from a slightly
modified ANLTR java grammar). But of course, I'm eager to hear about
the experiences from others. 

Ah, if one may want to take a look, see
http://sourceforge.net/projects/jalopy

Cheers,

Marco



___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



RE: [JBoss-dev] JBoss Code Style Guide

2002-02-13 Thread Sacha Labourey

> Off topic, but were you able to get NetBeans to build JBoss using its
> ant fluff?

I've never tried in fact... I always compile ant from the command line.

One thing to add about netbeans: A problem with netbeans regarding JBoss
structure is that JBoss has its source folders disseminated in many
sub-folders of the jboss-all main folder. It is tiring because it means you
have to add many many sub-folders by hand through at least 5 clicks each
time. But I think there is a solution. If you look at the different plugins
available for netbeans, one is still in beta but allows you to just bind the
jboss-all folder once and then, right-click on the appropriate sub-folders
(xxx/src/main) to add them to the list of available classpath. It is really
easier, but still in beta.

Cheesr,



Sacha


___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JBoss Code Style Guide

2002-02-12 Thread Jason Dillon

It might be possible to *trick* cvs into doing this, but we may need to
have more access to the repository than we currently have with SF.

I wish I had time (and real motivation) to help out the CVS folks. 
Perhaps if they start writing in Java I will consider it.
 
--jason


On Tue, 2002-02-12 at 18:52, Scott M Stark wrote:
> 
> Join the cvs project and transform its repository to use a canonical
> representation in xml or something that is transformed to/from using
> a users xslt stylings. It should be the source code control system that
> handles this.
> 
> - Original Message - 
> From: "Jason Dillon" <[EMAIL PROTECTED]>
> To: "Luke Taylor" <[EMAIL PROTECTED]>
> Cc: "JBoss-dev" <[EMAIL PROTECTED]>
> Sent: Tuesday, February 12, 2002 3:24 PM
> Subject: Re: [JBoss-dev] JBoss Code Style Guide
> 
> 
> > Has anyone played with a decent cross platform tool that can easily
> > translate from style to style?  It seems that we will always have this
> > problem, but if we could gave something translate a users style back
> > into jboss style then we can end this thread once and for all.  Should
> > also help improve diffs.
> > 
> > --jason
> > 
> >  
> 
> 
> 
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development



___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JBoss Code Style Guide

2002-02-12 Thread Jason Dillon

I don't know what to do about this.  One issue is that we are using xml
entity bits to pull in standard configuration.  This helped shrink the
size and complexity of these files a lot.

The other is that we use custom tasks which are expected on the pri*
classloader.  If we revert to the previous style of hard-coded paths,
then we have to add that configuration maddness again (plus we can't use
the res:// protocol handler to import with.

I will try to get this resolved.  I may be switching to NetBeans, as I
am having too many stupid issues with XEmacs at the moment.

--jason


On Tue, 2002-02-12 at 18:50, Scott M Stark wrote:
> 
> Not since 3.0 and the move to buildmagic. At some point I want to
> address not being able to run directly from the build.xml files in
> environments that support Ant.
> 
> - Original Message -
> From: "Jason Dillon" <[EMAIL PROTECTED]>
> To: "Sacha Labourey" <[EMAIL PROTECTED]>
> Cc: "Dain Sundstrom" <[EMAIL PROTECTED]>; "JBoss-dev"
> <[EMAIL PROTECTED]>
> Sent: Tuesday, February 12, 2002 3:25 PM
> Subject: RE: [JBoss-dev] JBoss Code Style Guide
> 
> 
> > Off topic, but were you able to get NetBeans to build JBoss using its
> > ant fluff?
> >
> > --jason
> >
> >
> 
> 
> 
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development



___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JBoss Code Style Guide

2002-02-12 Thread Scott M Stark


Join the cvs project and transform its repository to use a canonical
representation in xml or something that is transformed to/from using
a users xslt stylings. It should be the source code control system that
handles this.

- Original Message - 
From: "Jason Dillon" <[EMAIL PROTECTED]>
To: "Luke Taylor" <[EMAIL PROTECTED]>
Cc: "JBoss-dev" <[EMAIL PROTECTED]>
Sent: Tuesday, February 12, 2002 3:24 PM
Subject: Re: [JBoss-dev] JBoss Code Style Guide


> Has anyone played with a decent cross platform tool that can easily
> translate from style to style?  It seems that we will always have this
> problem, but if we could gave something translate a users style back
> into jboss style then we can end this thread once and for all.  Should
> also help improve diffs.
> 
> --jason
> 
>  



___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JBoss Code Style Guide

2002-02-12 Thread Scott M Stark


Not since 3.0 and the move to buildmagic. At some point I want to
address not being able to run directly from the build.xml files in
environments that support Ant.

- Original Message -
From: "Jason Dillon" <[EMAIL PROTECTED]>
To: "Sacha Labourey" <[EMAIL PROTECTED]>
Cc: "Dain Sundstrom" <[EMAIL PROTECTED]>; "JBoss-dev"
<[EMAIL PROTECTED]>
Sent: Tuesday, February 12, 2002 3:25 PM
Subject: RE: [JBoss-dev] JBoss Code Style Guide


> Off topic, but were you able to get NetBeans to build JBoss using its
> ant fluff?
>
> --jason
>
>



___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



RE: [JBoss-dev] JBoss Code Style Guide

2002-02-12 Thread Jason Dillon

Off topic, but were you able to get NetBeans to build JBoss using its
ant fluff?

--jason


On Tue, 2002-02-12 at 08:59, Sacha Labourey wrote:
> Hello Dain,
> 
> If you use netbeans, just change the tab value to 3 chars and you are done.
> You then just need to hit "CTRL+SHIFT+F" and your code is automagically
> reformated.
> 
> Cheers,
> 
> 
>   Sacha
> 
> 
> > -Message d'origine-
> > De : [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]De la part de Dain
> > Sundstrom
> > Envoye : mardi, 12 fevrier 2002 17:49
> > A : JBoss-dev
> > Objet : [JBoss-dev] JBoss Code Style Guide
> >
> >
> > Hi all,
> >
> > I wrote the JBossCMP code before I was aware the JBoss Code Style Guide,
> > so I now I want to run a beautifier to correct my code.  Does any one
> > use a free beautifier that they have setup for JBoss?
> 
> 
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development



___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JBoss Code Style Guide

2002-02-12 Thread Jason Dillon

Has anyone played with a decent cross platform tool that can easily
translate from style to style?  It seems that we will always have this
problem, but if we could gave something translate a users style back
into jboss style then we can end this thread once and for all.  Should
also help improve diffs.

--jason

 
On Tue, 2002-02-12 at 09:21, Luke Taylor wrote:
> Together's code formatter can do it OK.
> 
> It can do all the indentation, brackets, javadoc formatting and removing 
> unwanted and unused imports OK.
> 
> On the if, for, catch ( blah ) parenthesis stuff it's not so flexible 
> though. Maybe this isn't too important anyway (there should probably be 
> some flexibility on the part of the reader too :).
> 
> Luke.
> 
> Dain Sundstrom wrote:
> > Hi all,
> > 
> > I wrote the JBossCMP code before I was aware the JBoss Code Style Guide, 
> > so I now I want to run a beautifier to correct my code.  Does any one 
> > use a free beautifier that they have setup for JBoss?
> > 
> > I found one called jacobe which seems to do the trick, but I have some 
> > questions about the style guide.
> > 
> > In class or interface declarations should I put a line terminator before 
> > extends and implements as in the example code?
> > 
> > Should I put a space between if and the open parenthesis? (There is not 
> > one in the sample.)
> > 
> > Should I put a space between catch and the open parenthesis? (There is 
> > one in the sample.)
> > 
> > Should I put a space between for and the open parenthesis? (There is one 
> > in the sample.)
> > 
> > 
> > I'm not going to update the code until after DR1 in case it introduces 
> > errors.
> > 
> > thanks
> > -dain
> > 
> > 
> 
> 
> 
> 
> -- 
>   Luke Taylor.  Monkey Machine Ltd.
>   PGP Key ID: 0x57E9523Chttp://www.mkeym.com
> 
> 
> 
> 
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development



___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JBoss Code Style Guide

2002-02-12 Thread Jason Dillon

It does *mostly*.  If we can turn off the bits where it bastardizes
javadocs then I would be agreeable to using it again.  [X]Emacs still
does not like how it indents too much though =(

--jason


On Tue, 2002-02-12 at 09:22, David Jencks wrote:
> On 2002.02.12 11:48:33 -0500 Dain Sundstrom wrote:
> > Hi all,
> > 
> > I wrote the JBossCMP code before I was aware the JBoss Code Style Guide, 
> > so I now I want to run a beautifier to correct my code.  Does any one 
> > use a free beautifier that they have setup for JBoss?
> > 
> > I found one called jacobe which seems to do the trick, but I have some 
> > questions about the style guide.
> > 
> > In class or interface declarations should I put a line terminator before 
> > extends and implements as in the example code?
> > 
> > Should I put a space between if and the open parenthesis? (There is not 
> > one in the sample.)
> > 
> > Should I put a space between catch and the open parenthesis? (There is 
> > one in the sample.)
> > 
> > Should I put a space between for and the open parenthesis? (There is one 
> > in the sample.)
> > 
> > 
> > I'm not going to update the code until after DR1 in case it introduces 
> > errors.
> > 
> > thanks
> > -dain
> > 
> > 
> 
> In cvs there is JavaStyle, and in build/etc/.refactory there is a template
> for it.  I think this formats according to jboss style.
> 
> I've put a task for this into several build.xml files but others keep
> taking it out.  Here's an example
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> This is from jbosscx/connector build.xml version 1.7
> 
> david jencks
> > ___
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> > 
> > 
> 
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development



___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JBoss Code Style Guide

2002-02-12 Thread Scott M Stark

The biggest issues are consistent use of 3 spaces instead of tabs and
lining up braces in the same column. The use of a space before an
open paren in each of the contexts below is optional.

> In class or interface declarations should I put a line terminator before 
> extends and implements as in the example code?
> 
> Should I put a space between if and the open parenthesis? (There is not 
> one in the sample.)
> 
> Should I put a space between catch and the open parenthesis? (There is 
> one in the sample.)
> 
> Should I put a space between for and the open parenthesis? (There is one 
> in the sample.)



___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JBoss Code Style Guide

2002-02-12 Thread David Jencks

On 2002.02.12 11:48:33 -0500 Dain Sundstrom wrote:
> Hi all,
> 
> I wrote the JBossCMP code before I was aware the JBoss Code Style Guide, 
> so I now I want to run a beautifier to correct my code.  Does any one 
> use a free beautifier that they have setup for JBoss?
> 
> I found one called jacobe which seems to do the trick, but I have some 
> questions about the style guide.
> 
> In class or interface declarations should I put a line terminator before 
> extends and implements as in the example code?
> 
> Should I put a space between if and the open parenthesis? (There is not 
> one in the sample.)
> 
> Should I put a space between catch and the open parenthesis? (There is 
> one in the sample.)
> 
> Should I put a space between for and the open parenthesis? (There is one 
> in the sample.)
> 
> 
> I'm not going to update the code until after DR1 in case it introduces 
> errors.
> 
> thanks
> -dain
> 
> 

In cvs there is JavaStyle, and in build/etc/.refactory there is a template
for it.  I think this formats according to jboss style.

I've put a task for this into several build.xml files but others keep
taking it out.  Here's an example

 















This is from jbosscx/connector build.xml version 1.7

david jencks
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 
> 

___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JBoss Code Style Guide

2002-02-12 Thread Luke Taylor

Together's code formatter can do it OK.

It can do all the indentation, brackets, javadoc formatting and removing 
unwanted and unused imports OK.

On the if, for, catch ( blah ) parenthesis stuff it's not so flexible 
though. Maybe this isn't too important anyway (there should probably be 
some flexibility on the part of the reader too :).

Luke.

Dain Sundstrom wrote:
> Hi all,
> 
> I wrote the JBossCMP code before I was aware the JBoss Code Style Guide, 
> so I now I want to run a beautifier to correct my code.  Does any one 
> use a free beautifier that they have setup for JBoss?
> 
> I found one called jacobe which seems to do the trick, but I have some 
> questions about the style guide.
> 
> In class or interface declarations should I put a line terminator before 
> extends and implements as in the example code?
> 
> Should I put a space between if and the open parenthesis? (There is not 
> one in the sample.)
> 
> Should I put a space between catch and the open parenthesis? (There is 
> one in the sample.)
> 
> Should I put a space between for and the open parenthesis? (There is one 
> in the sample.)
> 
> 
> I'm not going to update the code until after DR1 in case it introduces 
> errors.
> 
> thanks
> -dain
> 
> 




-- 
  Luke Taylor.  Monkey Machine Ltd.
  PGP Key ID: 0x57E9523Chttp://www.mkeym.com




___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JBoss Code Style Guide

2002-02-12 Thread Dain Sundstrom

I have the 3 space tabs, what I don't have is the curly bracket on a new 
line.  Will it correct the curlies.

Sacha Labourey wrote:

> Hello Dain,
> 
> If you use netbeans, just change the tab value to 3 chars and you are done.
> You then just need to hit "CTRL+SHIFT+F" and your code is automagically
> reformated.
> 
> Cheers,
> 
> 
>   Sacha
> 
> 
> 
>>-Message d'origine-
>>De : [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED]]De la part de Dain
>>Sundstrom
>>Envoye : mardi, 12 fevrier 2002 17:49
>>A : JBoss-dev
>>Objet : [JBoss-dev] JBoss Code Style Guide
>>
>>
>>Hi all,
>>
>>I wrote the JBossCMP code before I was aware the JBoss Code Style Guide,
>>so I now I want to run a beautifier to correct my code.  Does any one
>>use a free beautifier that they have setup for JBoss?
>>



___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



RE: [JBoss-dev] JBoss Code Style Guide

2002-02-12 Thread Sacha Labourey

Hello Dain,

If you use netbeans, just change the tab value to 3 chars and you are done.
You then just need to hit "CTRL+SHIFT+F" and your code is automagically
reformated.

Cheers,


Sacha


> -Message d'origine-
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]De la part de Dain
> Sundstrom
> Envoye : mardi, 12 fevrier 2002 17:49
> A : JBoss-dev
> Objet : [JBoss-dev] JBoss Code Style Guide
>
>
> Hi all,
>
> I wrote the JBossCMP code before I was aware the JBoss Code Style Guide,
> so I now I want to run a beautifier to correct my code.  Does any one
> use a free beautifier that they have setup for JBoss?


___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development