public static Set<HaxeComponentName> findVariables(@Nullable PsiElement at) {
if (at == null) {
return Collections.emptySet();
}
final Set<HaxeComponentName> result = new THashSet<HaxeComponentName>();
PsiTreeUtil.treeWalkUp(new PsiScopeProcessor() {
@Override
public boolean execute(@NotNull PsiElement element, ResolveState state) {
if (element instanceof HaxeNamedComponent) {
final HaxeNamedComponent haxeNamedComponent = (HaxeNamedComponent)element;
if (haxeNamedComponent.getComponentName() != null && HaxeComponentType.isVariable(HaxeComponentType.typeOf(haxeNamedComponent))) {