[Biojava-dev] Feature Templates

Russell Smithies russell.smithies at xtra.co.nz
Mon Sep 8 23:17:17 EDT 2003


How about writing a Java template for "tidy"  http://tidy.sourgeforge.net/
It's built in with most UNIX/Linux systems and may save a bit of work?
It's designed for HTML, XHTML and XML but might be worth a go?

There's also jtidy, the Java port of tidy that may be tweakable.
http://lempinen.net/sami/jtidy/


Russell


> Message: 7
> Date: 08 Sep 2003 11:31:05 +0100
> From: Keith James <kdj at sanger.ac.uk>
> Subject: Re: [Biojava-dev] Feature Templates
> To: Matthew Pocock <matthew_pocock at yahoo.co.uk>
> Cc: biojava-dev at biojava.org
> Message-ID: <sc4znhfk1w6.fsf at hgs2a.internal.sanger.ac.uk>
> Content-Type: text/plain; charset=us-ascii
> 
> >>>>> "Matthew" == Matthew Pocock <matthew_pocock at yahoo.co.uk> writes:
> 
> [...]
> 
>     Matthew> The one thing that mucks things up is mixing in tabs with
>     Matthew> spaces. I know things like emacs like to put them in, but
>     Matthew> they cause the most formatting hastle of all.
> 
> Only if you tell it to use tabs, though (mine uses spaces).
> 
>     Matthew> I tend to use 2 char indent, spaces after casts & commas,
>     Matthew> [] after type and before variable, one declaration per
>     Matthew> line, things that get broken across lines get lined up on
>     Matthew> +1 or +2 indents or alignmed with '(' - depending, and
>     Matthew> attempt to wrap at 80 char.  In truth, I hit the 'format
>     Matthew> this code' button in my IDE when files look too uglee,
>     Matthew> and accept that (but then I've had a bit of a discussion
>     Matthew> with my IDE over what is and isn't acceptable).
> 
>     Matthew> If coding style is an issue, could we get all checkins
>     Matthew> pretified by cvs prior to commit? Not sure if CVS can do
>     Matthew> this kind of thing.
> 
> I've been doing a survey of available Java formatters because I'm
> setting up a new codebase here, from scratch. Useful features would be
> 
> 1. Platform independent
> 2. Standalone version available (& maybe an Ant task)
> 3. IDE plugin versions available
> 4. Extendable/fixable (preferably open source)
> 
> None that I can find fit all of these criteria. Those that can be
> re-distributed:
> 
> Jalopy: 1, 2, 3, 4 (but a fairly buggy beta, no longer supported by
>                     the developer - I wouldn't use it myself)
> 
> astyle: 2, 4 (limited features, in C++, but the jedit plugin is Java
>               so it may go cross-platform without requiring a compiler)
> 
> Anyone know of others? There are several commercial or otherwise
> non-distributable packages e.g. jindent, jacobe, jpretty, trita.
> 
> Keith
> 




More information about the biojava-dev mailing list