4

Within Eclipse, is it possible to avoid line breaks for better jmockit readability without turning off the code formatter ?

Wanted:

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

  invoke(_measureModuleInstall, "registerNodeModeFactory");
}

Currently:

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

  invoke(_measureModuleInstall, "registerNodeModeFactory");
}
Deduplicator
  • 44,692
  • 7
  • 66
  • 118
  • 2
    Have you looked at turning off the formatter around those areas of code? http://stackoverflow.com/questions/1820908/how-to-turn-off-the-eclipse-code-formatter-for-certain-sections-of-java-code – Dan W Jan 21 '13 at 19:12
  • Yes, but I wanted something 'cleaner' ... –  Jan 21 '13 at 19:51
  • I have the same problem in IntelliJ IDEA that I have not been able to resolve, either. – Jeff Olson Jan 22 '13 at 16:54

1 Answers1

0

Disable code formatter for some parts of code:

// @formatter:off
RepositoryManager.getInstance(); times = CALLED;
// @formatter:on
Andrey Vetlugin
  • 960
  • 10
  • 17