void () { PsiPackage aPackage = myJavaFacade.findPackage("java.io"); for (PsiClass aClass : aPackage.getClasses()) { PsiDocumentManager documentManager = PsiDocumentManager.getInstance(myProject); PsiFile file = aClass.getContainingFile(); Document document = documentManager.getCachedDocument(file); if (document == null) { //ignore already loaded documents createPointer(aClass); assertNull(documentManager.getCachedDocument(file)); //System.out.println("file = " + file); } else { LOG.debug("already loaded file = " + file); } } }