Eclipse避免了jmockit的换行

时间:2013-01-21 18:57:27

标签: java eclipse code-formatting jmockit

在Eclipse中,是否可以避免换行以获得更好的jmockit可读性而无需关闭代码格式化程序?

通缉:

@Test
public void testRegisterNodeModelFactory() {
  new Expectations() {{
    RepositoryManager.getInstance(); times = CALLED;
  }};

  invoke(_measureModuleInstall, "registerNodeModeFactory");
}

目前:

@Test
public void testRegisterNodeModelFactory() {
  new Expectations() {{
    RepositoryManager.getInstance();
    times = CALLED;
  }};

  invoke(_measureModuleInstall, "registerNodeModeFactory");
}

1 个答案:

答案 0 :(得分:0)

禁用代码部分代码的代码格式化程序:

// @formatter:off
RepositoryManager.getInstance(); times = CALLED;
// @formatter:on