Set<PsiVariable> (PsiElement context) { if (context == null) { return Collections.emptySet(); } final VariableCollectingVisitor visitor = new VariableCollectingVisitor(); context.accept(visitor); return visitor.getUsedVariables(); }