views:

57

answers:

3

Hi all,

I would like Jalopy to format my return and throw statements such that they look like a method call since they are:

return(true);

throw(new IllegalArgumentException("You can't do that, what we you thinking?"));

I have the rest of the code formatted exactly the way I want so this is the icing on the cake.

Also as an aside, I work on a project with a few team members and each have our own preference for looking at code, has anyone setup Jalopy in conjuction with a successful build as well as checkout?

So, when I checkout code, it gets formatted to my liking, and then each time I get a successful build, it gets formatted according to the Java/Sun Standard and then checked in?

Walter

A: 

I would like Jalopy to format my return and throw statements such that they look like a method call

I didn't find anything about this in Jalopy's Manual and think this would require extending Jalopy.

(...) when I checkout code, it gets formatted to my liking, and then each time I get a successful build, it gets formatted according to the Java/Sun Standard and then checked in?

If you are using subversion, maybe you could use a client-side hook on checkout and a pre-commit hook on commit.

Pascal Thivent
Thanks Pascal, I double-checked the manual as well and didn't see any options there for that. I figured I would ask out here as someone is bound to know.The hooks sound good, but I will have to see what other issues that may bring up.
A: 

The commercial Jalopy supports this.

Here are the links for the corresponding user's guide sections:

Insert throws parentheses

Marco Hunsicker
A: 

Insert return parentheses

Marco Hunsicker
Thanks, I really like Jalopy and think it is a great product. $40 seems like a fair price for what it does. Thanks for your suggestion.