void (@NotNull Project project, @NotNull CommonProblemDescriptor descriptor) { VirtualFile file = null; if (entity != null && entity.isValid() && entity instanceof RefElement) { file = ((RefElement)entity).getPointer().getVirtualFile(); } PsiFile psiFile = null; if (file != null) { psiFile = PsiManager.getInstance(project).findFile(file); } RunInspectionAction.runInspection(project, wrapper.getShortName(), file, null, psiFile); }