@Test public void testIsRangeFormattingDynamicRegistrationSupported() throws Exception { assertFalse(prefs.isRangeFormattingDynamicRegistrationSupported()); when(text.getRangeFormatting()).thenReturn(new RangeFormattingCapabilities()); assertFalse(prefs.isRangeFormattingDynamicRegistrationSupported()); when(text.getRangeFormatting()).thenReturn(new RangeFormattingCapabilities(true)); assertTrue(prefs.isRangeFormattingDynamicRegistrationSupported()); }
/** * Capabilities specific to the `textDocument/rangeFormatting` */ @Pure public RangeFormattingCapabilities getRangeFormatting() { return this.rangeFormatting; }
/** * Capabilities specific to the `textDocument/rangeFormatting` */ public void setRangeFormatting(final RangeFormattingCapabilities rangeFormatting) { this.rangeFormatting = rangeFormatting; }