AbstractScopeNode<?> scope = info.getScopeAdapter();
ITextSelection selection = info.getUserSelection();
SimpleNode node = scope.getASTNode();
LocalVariablesVisitor visitor = new LocalVariablesVisitor();
try {
node.accept(visitor);
} catch (Exception e) {
throw new RuntimeException(e);
}
List<Name> variables = visitor.getVariables();
Name selectedVariable = findSelectedVariable(selection, variables);
if (selectedVariable == null) {
status.addFatalError(Messages.validationNoNameSelected);