下面列出了怎么用org.eclipse.lsp4j.CodeLensCapabilities的API类实例代码及写法,或者点击链接到github查看源代码。
@Test
public void testIsCodeLensDynamicRegistrationSupported() throws Exception {
assertFalse(prefs.isCodeLensDynamicRegistrationSupported());
when(text.getCodeLens()).thenReturn(new CodeLensCapabilities());
assertFalse(prefs.isCodeLensDynamicRegistrationSupported());
when(text.getCodeLens()).thenReturn(new CodeLensCapabilities(true));
assertTrue(prefs.isCodeLensDynamicRegistrationSupported());
}
/**
* Capabilities specific to the `textDocument/codeLens`
*/
@Pure
public CodeLensCapabilities getCodeLens() {
return this.codeLens;
}
/**
* Capabilities specific to the `textDocument/codeLens`
*/
public void setCodeLens(final CodeLensCapabilities codeLens) {
this.codeLens = codeLens;
}