PsiElement[] (LinkedHashSet<? super String> classes, DataContext dataContext) { final Location<?>[] locations = Location.DATA_KEYS.getData(dataContext); if (locations != null) { List<PsiElement> elements = new ArrayList<>(); for (Location<?> location : locations) { final PsiElement psiElement = location.getPsiElement(); if (psiElement instanceof PsiNamedElement) { String qName = getQName(psiElement, location); if (qName != null) { classes.add(qName); elements.add(psiElement); } } } return elements.toArray(PsiElement.EMPTY_ARRAY); } return null; }