You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Ryan Shaw <ry...@silveregg.co.jp> on 2002/03/01 01:38:49 UTC

Re: Conversion to Avalon style script?

Peter wrote:

||| On Thu, 28 Feb 2002 22:10, Ryan Shaw wrote:
||| > Eung-ju wrote:
||| > ||| > I seem to remember a while back someone mentioning
||| > ||| > they had a Python script that would convert source
||| > ||| > to Avalon style (brackets and whitespace and such).
||| > ||| >
||| > ||| > Does this script still exist and if so could I get
||| > ||| > a copy of it?
||| > |||
||| > ||| I don't remember that kind of script.
||| > ||| But here is another solution. Use IDEA's "Layout Code" funcationality.
||| > ||| check http://www.intellij.com
||| > ||| Or other kind of source reformatter.
||| >
||| > I use emacs for formatting my code as I write it.

I've got an avalon style defined in emacs, I just
wanted something to convert old code in a different
style without opening every file in emacs.

I'm sure there is some obscure emacs function that
would reformat directories recursively but I'm too
lazy to figure that out. :^)

||| Checkout jrefactory.sourceforge.net and look for PrettyPrinter.

This looks like it might be what I need.

Thanks,

Ryan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Conversion to Avalon style script?

Posted by Berin Loritsch <bl...@apache.org>.
Ryan Shaw wrote:
> Peter wrote:
> 
> ||| On Thu, 28 Feb 2002 22:10, Ryan Shaw wrote:
> ||| > Eung-ju wrote:
> ||| > ||| > I seem to remember a while back someone mentioning
> ||| > ||| > they had a Python script that would convert source
> ||| > ||| > to Avalon style (brackets and whitespace and such).
> ||| > ||| >
> ||| > ||| > Does this script still exist and if so could I get
> ||| > ||| > a copy of it?
> ||| > |||
> ||| > ||| I don't remember that kind of script.
> ||| > ||| But here is another solution. Use IDEA's "Layout Code" funcationality.
> ||| > ||| check http://www.intellij.com
> ||| > ||| Or other kind of source reformatter.
> ||| >
> ||| > I use emacs for formatting my code as I write it.
> 
> I've got an avalon style defined in emacs, I just
> wanted something to convert old code in a different
> style without opening every file in emacs.

There was a python script to fix the import statements of older
projects (it should still be in  framework CVS under the tools
directory).  Beyond that, there was no script to reformat the
source code to the avalon style that I am aware of.

Keep in mind that there are some tools like AStyle that can process
a whole group of source files at once.  They get you real close.



-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Conversion to Avalon style script?

Posted by Paul Tetley <pa...@bdg.com.au>.
Ryan Shaw wrote:
> Peter wrote:
> 
> ||| On Thu, 28 Feb 2002 22:10, Ryan Shaw wrote:
> ||| > Eung-ju wrote:
> ||| > ||| > I seem to remember a while back someone mentioning
> ||| > ||| > they had a Python script that would convert source
> ||| > ||| > to Avalon style (brackets and whitespace and such).
> ||| > ||| >
> ||| > ||| > Does this script still exist and if so could I get
> ||| > ||| > a copy of it?


IIRC, there's an external module listed in the Ant1.4 docs which is a 
Java source formatter.  I know nothing about it (yet) but would presume 
it  is configerable, and being an Ant task, should do just what you want...

PT


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>