Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Using JDT code formatting from an ant script
Using JDT code formatting from an ant script [message #128539] Thu, 18 December 2003 11:00 Go to next message
Eclipse UserFriend
Originally posted by: jwisard.yahoo.com

I was wondering if anybody has ever attempted to adapt the JDT code
formatting tools to use from within an ANT build script....such as what
you can do with Jalopy. Since Jalopy is seemingly not actively being
maintained, it would be very useful on a team project where a specific
code format is enforced, to be able to format ALL source code during an
ANT build with the JDT formatter.

Can anyone give me some guidelines on how I might go about doing this?

Thanks!
Re: Using JDT code formatting from an ant script [message #128959 is a reply to message #128539] Sat, 20 December 2003 16:52 Go to previous messageGo to next message
Eclipse UserFriend
On Thu, 18 Dec 2003 16:00:23 +0000, Jeff Wisard wrote:

> I was wondering if anybody has ever attempted to adapt the JDT code
> formatting tools to use from within an ANT build script....such as what
> you can do with Jalopy. Since Jalopy is seemingly not actively being
> maintained, it would be very useful on a team project where a specific
> code format is enforced, to be able to format ALL source code during an
> ANT build with the JDT formatter.
>
> Can anyone give me some guidelines on how I might go about doing this?


forgive any ignorance in this post. i'm pretty new to all this (both java
and eclipse).

i don't know what's required for running things from ANT build scripts,
but i wrote a command line utility this morning that will run the new code
formatter (along with an eclipse-generated formatting profile file (in
XML)) against a .java file. it works quite well.

one thing that confused me was that i ended up parsing the XML myself.
there's a rich interface for reading/writing the XML files and managing
the profiles in org.eclipse.jdt.ui, but importing that stuff involved
headaches i didn't know how to handle (e.g. the initialization of
JavaPlugin).

that said, i'd be happy to post what i have somewhere if there's interest.

nall.
Re: Using JDT code formatting from an ant script [message #129110 is a reply to message #128959] Mon, 22 December 2003 09:18 Go to previous message
Eclipse UserFriend
Originally posted by: jwisard.yahoo.com

I'd be very interested in what you have done! Please post and reply.

Thanks!

"Jon Nall" <nall@themountaingoats.net> wrote in message
news:pan.2003.12.20.21.52.04.572415@themountaingoats.net...
>
> On Thu, 18 Dec 2003 16:00:23 +0000, Jeff Wisard wrote:
>
> > I was wondering if anybody has ever attempted to adapt the JDT code
> > formatting tools to use from within an ANT build script....such as what
> > you can do with Jalopy. Since Jalopy is seemingly not actively being
> > maintained, it would be very useful on a team project where a specific
> > code format is enforced, to be able to format ALL source code during an
> > ANT build with the JDT formatter.
> >
> > Can anyone give me some guidelines on how I might go about doing this?
>
>
> forgive any ignorance in this post. i'm pretty new to all this (both java
> and eclipse).
>
> i don't know what's required for running things from ANT build scripts,
> but i wrote a command line utility this morning that will run the new code
> formatter (along with an eclipse-generated formatting profile file (in
> XML)) against a .java file. it works quite well.
>
> one thing that confused me was that i ended up parsing the XML myself.
> there's a rich interface for reading/writing the XML files and managing
> the profiles in org.eclipse.jdt.ui, but importing that stuff involved
> headaches i didn't know how to handle (e.g. the initialization of
> JavaPlugin).
>
> that said, i'd be happy to post what i have somewhere if there's interest.
>
> nall.
>
Previous Topic:M6 - unable to open Java perspective
Next Topic:Defaults for Run As Java Application?
Goto Forum:
  


Current Time: Wed Jul 23 18:06:57 EDT 2025

Powered by FUDForum. Page generated in 0.03443 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top