use of org.eclipse.lsp4j.CompletionItemKind in project xtext-core by eclipse.
the class ContentAssistService method translateKind.
protected CompletionItemKind translateKind(final ContentAssistEntry entry) {
CompletionItemKind _switchResult = null;
String _kind = entry.getKind();
if (_kind != null) {
switch(_kind) {
case ContentAssistEntry.KIND_CLASS:
_switchResult = CompletionItemKind.Class;
break;
case ContentAssistEntry.KIND_COLOR:
_switchResult = CompletionItemKind.Color;
break;
case ContentAssistEntry.KIND_CONSTRUCTOR:
_switchResult = CompletionItemKind.Constructor;
break;
case ContentAssistEntry.KIND_ENUM:
_switchResult = CompletionItemKind.Enum;
break;
case ContentAssistEntry.KIND_FIELD:
_switchResult = CompletionItemKind.Field;
break;
case ContentAssistEntry.KIND_FILE:
_switchResult = CompletionItemKind.File;
break;
case ContentAssistEntry.KIND_FUNCTION:
_switchResult = CompletionItemKind.Function;
break;
case ContentAssistEntry.KIND_INTERFACE:
_switchResult = CompletionItemKind.Interface;
break;
case ContentAssistEntry.KIND_KEYWORD:
_switchResult = CompletionItemKind.Keyword;
break;
case ContentAssistEntry.KIND_METHOD:
_switchResult = CompletionItemKind.Method;
break;
case ContentAssistEntry.KIND_MODULE:
_switchResult = CompletionItemKind.Module;
break;
case ContentAssistEntry.KIND_PROPERTY:
_switchResult = CompletionItemKind.Property;
break;
case ContentAssistEntry.KIND_REFERENCE:
_switchResult = CompletionItemKind.Reference;
break;
case ContentAssistEntry.KIND_SNIPPET:
_switchResult = CompletionItemKind.Snippet;
break;
case ContentAssistEntry.KIND_TEXT:
_switchResult = CompletionItemKind.Text;
break;
case ContentAssistEntry.KIND_UNIT:
_switchResult = CompletionItemKind.Unit;
break;
case ContentAssistEntry.KIND_VALUE:
_switchResult = CompletionItemKind.Value;
break;
case ContentAssistEntry.KIND_VARIABLE:
_switchResult = CompletionItemKind.Variable;
break;
default:
_switchResult = CompletionItemKind.Value;
break;
}
} else {
_switchResult = CompletionItemKind.Value;
}
return _switchResult;
}
Aggregations