PsiType (PsiElement element) { PsiFile psiFile = element.getContainingFile(); if (psiFile == null) return null; VirtualFile file = psiFile.getVirtualFile(); if (file == null || !myScope.contains(file)) { return TypeMigrationLabeler.getElementType(element); } for (Map.Entry<TypeMigrationUsageInfo, LinkedList<PsiType>> entry : myTypeMap.entrySet()) { if (Comparing.equal(element, entry.getKey().getElement())) { return entry.getValue().getFirst(); } } if (element.getTextRange() == null) return null; return getType(new TypeMigrationUsageInfo(element)); }