use of com.redhat.qute.ls.commons.client.CommandKindCapabilities in project quarkus-ls by redhat-developer.
the class QuteAssert method testCodeLensFor.
private static void testCodeLensFor(String value, String fileUri, String templateId, String projectUri, String templateBaseDir, CodeLens... expected) throws Exception {
QuteProjectRegistry projectRegistry = new MockQuteProjectRegistry();
Template template = createTemplate(value, fileUri, projectUri, templateBaseDir, projectRegistry);
template.setTemplateId(templateId);
QuteLanguageService languageService = new QuteLanguageService(new JavaDataModelCache(projectRegistry));
SharedSettings sharedSettings = new SharedSettings();
CommandCapabilities commandCapabilities = new CommandCapabilities();
CommandKindCapabilities kinds = new CommandKindCapabilities(Arrays.asList(QuteClientCommandConstants.COMMAND_JAVA_DEFINITION));
commandCapabilities.setCommandKind(kinds);
sharedSettings.getCommandCapabilities().setCapabilities(commandCapabilities);
List<? extends CodeLens> actual = languageService.getCodeLens(template, sharedSettings, () -> {
}).get();
assertCodeLens(actual, expected);
}
use of com.redhat.qute.ls.commons.client.CommandKindCapabilities in project quarkus-ls by redhat-developer.
the class QuteCodeActionWithSettingsTest method createSharedSettings.
private static SharedSettings createSharedSettings(String... commandIds) {
SharedSettings settings = new SharedSettings();
CommandCapabilities commandCapabilities = new CommandCapabilities();
CommandKindCapabilities kinds = new CommandKindCapabilities(commandIds != null ? Arrays.asList(commandIds) : Collections.emptyList());
commandCapabilities.setCommandKind(kinds);
settings.getCommandCapabilities().setCapabilities(commandCapabilities);
return settings;
}
Aggregations