}
private LookupElementBuilder getNodeAttributeLookupElement(Node node, Map<String, String> nodeVars, boolean isShortcut) {
String nodeName = getNodeName(node);
LookupElementBuilder lookupElementBuilder = LookupElementBuilder.create(nodeName).withIcon(Symfony2Icons.CONFIG_VALUE);
String textContent = node.getTextContent();
if(StringUtils.isNotBlank(textContent)) {
lookupElementBuilder = lookupElementBuilder.withTailText("(" + textContent + ")", true);
}
if(nodeVars.containsKey(nodeName)) {
lookupElementBuilder = lookupElementBuilder.withTypeText(StringUtil.shortenTextWithEllipsis(nodeVars.get(nodeName), 100, 0), true);
}
if(isShortcut) {
lookupElementBuilder = lookupElementBuilder.withIcon(Symfony2Icons.CONFIG_VALUE_SHORTCUT);
}
return lookupElementBuilder;
}