display package name in XML java type content assist

This commit is contained in:
Martin Lippert
2019-04-09 10:10:15 +02:00
parent 1281abbf92
commit 4847fbee50

View File

@@ -70,9 +70,13 @@ public class TypeCompletionProposalProvider implements XMLCompletionProvider {
private ICompletionProposal createProposal(Tuple2<IType, Double> t, TextDocument doc, int offset, int tokenStart, int tokenEnd) {
IType type = t.getT1();
String label = type.getElementName();
CompletionItemKind kind;
String label = type.getFullyQualifiedName();
int packageIndex = label.lastIndexOf(".");
if (packageIndex > 0) {
label = label.substring(packageIndex + 1) + " - " + label.substring(0, packageIndex);
}
CompletionItemKind kind;
if (type.isClass()) {
kind = CompletionItemKind.Class;
}