}
if (functionName.equals("Message")) {
final Set<LookupElement> usages = new com.intellij.util.containers.hash.HashSet<LookupElement>();
MathematicaRecursiveVisitor visitor = new MathematicaRecursiveVisitor() {
@Override
public void visitMessageName(final MessageName messageName) {
usages.add(
LookupElementBuilder.create(messageName.getText()).
withIcon(MathematicaIcons.MESSAGES_ICON).
withCaseSensitivity(false)); // make it case insensitive so you can type argx in Sym::argx to
// find the correct completion
}
};
visitor.visitFile(parameters.getOriginalFile());
result.addAllElements(usages);
}
}
}