[QFJ-192] Format generated message source code to adhere to Java indentation standards Created: 06/Jun/07  Updated: 04/Jul/07  Resolved: 11/Jun/07

Status: Closed
Project: QuickFIX/J
Component/s: Build
Affects Version/s: 1.1.0
Fix Version/s: 1.2.0

Type: Improvement Priority: Default
Reporter: Toli Kuznets Assignee: Toli Kuznets
Resolution: Fixed Votes: 0
Labels: None


 Description   

Currently, the XSLT generating the quickfix.fix4x messages doesn't distinguish between inner classes and regular "outer" class when generating the getter/setter methods.

as a result, they are all indented the same way, making it harder to distinguish where a particular method lives.
See the thread for more info: http://www.nabble.com/QuoteRequest.set%28QuoteRequestType%29-and-various-other-set-methods-missing--tf3876614.html

Since the same XSLT template is used to generate getter/setter methods for outer and nested classes, it's not that easy to fix this in XSLT itself.

May be easier to fix it in the build directly, via a post-generation ANT task (something like Jalopy: http://jalopy.sourceforge.net/existing/plugin-ant.html).

Let me know if you know of any other code-formatting tools we can use instead, or if there may be a better way to achieve this, and i'll implement this in the build file.



 Comments   
Comment by Steve Bate [ 09/Jun/07 ]

Jalopy sounds like a good choice to me. I haven't used it myself but the documentation looks good.

Comment by Toli Kuznets [ 11/Jun/07 ]

Jalopy requires its own jar to do the ant task.
is there a particular place in the source tree where we can put it, or do we need to define that as an external dependency for the build to work? Not sure if you already have a special directory for jars that are needed for the build only, but not for QFJ operation itself.

Comment by Toli Kuznets [ 11/Jun/07 ]

Fix checked in revision 674.
added Jalopy formatting to the src-code generation phase
Upgraded the log4j from 1.2.4 to 1.2.14 (needed by Jalopy)
Added a src/main/lib/build subfolder for build-related libs
Currently, the Jalopy task is very minimal - we accept all defaults so we are
only getting basic formatting done.

Comment by Toli Kuznets [ 30/Jun/07 ]

Steve,

I am thinking we should do some more work on this. this step takes about 4-5 minutes, so i wonder if it'd be better if we added a flag to this that disables it.

or make it be run only when you do the "final final" release build. that way it wouldn't slow down the "ant clean test" cycles as much as it does now.

what do you think?

Generated at Sat Nov 23 07:46:07 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.