ATEToken token = delegate.getCurrentToken();
if(token == null)
return;
Usages usage = new Usages(delegate, token);
delegate.addUsagesTab(usage);
for (ATEToken ateToken : delegate.getTokens()) {
if (ateToken.getAttribute().equals(token.getAttribute())) {
ElementRule matchedRule = delegate.getEditorRules().getEnclosingRuleAtPosition(ateToken.getStartIndex());
if (matchedRule != null)
usage.addMatch(matchedRule, ateToken);
}
}
}