3

我希望能够自定义 Eclipse 的格式化程序,以便(在必要时)被括号包裹的块可以被格式化,使得左括号和右括号都在自己的行上。(类似于 Allman 样式,但使用括号而不是大括号)

@Annotation
(
  value1 = true,
  value2 = "this one is a string"
)
public void MyMethod
(
  int param1,
  String param2,
  double param3
)
{
  //do something
}

我能得到的最好的:

@Annotation(
  value1 = true,
  value2 = "this one is a string")
public void MyMethod(
  int param1,
  String param2,
  double param3)
{
  //do something
}
4

0 回答 0