@Test public void testIsFormattingDynamicRegistrationSupported() throws Exception { assertFalse(prefs.isFormattingDynamicRegistrationSupported()); when(text.getFormatting()).thenReturn(new FormattingCapabilities()); assertFalse(prefs.isFormattingDynamicRegistrationSupported()); when(text.getFormatting()).thenReturn(new FormattingCapabilities(true)); assertTrue(prefs.isFormattingDynamicRegistrationSupported()); }
/** * Capabilities specific to the `textDocument/formatting` */ @Pure public FormattingCapabilities getFormatting() { return this.formatting; }
/** * Capabilities specific to the `textDocument/formatting` */ public void setFormatting(final FormattingCapabilities formatting) { this.formatting = formatting; }