@Override public Boolean caseContent(Content content) { EList<Tag> tags = content.getTags(); Map<String, String> userData = newHashMapWithExpectedSize(1); List<String> tagData = newArrayListWithExpectedSize(tags.size()); for (Tag tag : tags) { createContentDescription(tag); tagData.add(tag.getName()); } userData.put(Descriptions.TAG_KEY, on(Descriptions.SEPARATOR).join(tagData)); IEObjectDescription description = create(nameOf(content), content, userData); acceptor.accept(description); return Boolean.TRUE; }
protected void createProposal( EObject model, ContentAssistContext context, ICompletionProposalAcceptor acceptor, Tag tag) { String prefix = context.getPrefix(); if (prefix.trim().startsWith("-") && !prefix.contains("@" + tag.getName())) { acceptor.accept( createCompletionProposal( prefix + tag, getStyledDisplayString(model, tag.getName(), tag.getName()), getLabelProvider().getImage(tag), 0, "", context)); } }