String (PsiFile file) { if (file instanceof PsiClassOwner) { for (final PsiClass psiClass : ((PsiClassOwner)file).getClasses()) { if (!isSynthetic(psiClass)) { return file.getViewProvider().getVirtualFile().getExtension(); } } } return ""; }