List<AnalysedIdentifier> selectedIdentifiers = new ArrayList<AnalysedIdentifier>();
if (identifier.getCategory() == SourceIdentifier.Category.LOCAL_VARIABLE) {
// This is a local variable, retrieve its definition
AnalysedIdentifier definitionIdentifier = identifier.getDefinitionIdentifier();
if (!selectAllRelated) {
// Highlight just its definition
selectedIdentifiers.add(definitionIdentifier);