开发者

Jalopy to format return/throw statements

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 Standar开发者_StackOverflowd and then checked in?

Walter


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.


The commercial Jalopy supports this.

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

Insert throws parentheses

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜