public boolean isReferenceTo(PsiElement element) {
return element instanceof JFlexMacroDefinition && ((JFlexMacroDefinition) element).getName().equals(getText());
}
public Object[] getVariants() {
Query query = ReferencesSearch.search(this);
return query.findAll().toArray();
}