WEB-33908 JSON Schema completion: show types in completion item descriptions when no description is avaiable

This commit is contained in:
Anton Lobov
2018-07-17 10:59:30 +02:00
parent 677cbced82
commit f5d61a6d16
@@ -308,6 +308,12 @@ public class JsonSchemaCompletionContributor extends CompletionContributor {
if (!StringUtil.isEmptyOrSpaces(typeText)) {
builder = builder.withTypeText(StringUtil.removeHtmlTags(typeText), true);
}
else {
JsonSchemaType type = jsonSchemaObject.getType();
if (type != null) {
builder = builder.withTypeText(type.getDescription(), true);
}
}
builder = builder.withIcon(getIcon(jsonSchemaObject.getType()));