Jalopy 格式化 return/throw 语句

发布于 2024-08-15 13:39:13 字数 375 浏览 6 评论 0原文

我希望 Jalopy 格式化我的 return 和 throw 语句,使它们看起来像一个方法调用,因为它们是:

return(true);

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

我将其余代码的格式完全按照我想要的方式设置,所以这是锦上添花。

另外,我和几个团队成员一起从事一个项目,每个人都有自己查看代码的偏好,有人设置 Jalopy 并成功构建和结账吗?

那么,当我签出代码时,它会根据我的喜好进行格式化,然后每次我成功构建时,它都会根据 Java/Sun 标准进行格式化,然后签入?

瓦尔特

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

早茶月光 2024-08-22 13:39:13

我希望 Jalopy 格式化我的 return 和 throw 语句,使它们看起来像方法调用

我在 Jalopy 的 手动并认为这需要扩展 Jalopy。

(...) 当我签出代码时,它会根据我的喜好进行格式化,然后每次我成功构建时,它都会根据 Java/Sun 标准进行格式化,然后签入?

如果您使用的是 subversion,也许您可​​以使用 客户端挂钩< /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.

时光暖心i 2024-08-22 13:39:13

商业 Jalopy 支持这一点。

以下是相应用户指南部分的链接:

插入抛出括号

The commercial Jalopy supports this.

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

Insert throws parentheses

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文