Question

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

Was it helpful?

Solution

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.

OTHER TIPS

The commercial Jalopy supports this.

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

Insert throws parentheses

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top