void (@NotNull PsiSnippetAttributeValue attributeValue) { PsiReference ref = attributeValue.getReference(); if (ref instanceof PsiFileReference fileRef) { PsiElement resolved = fileRef.resolve(); if (resolved == null) { CreateFilePathFix fix = null; String path = fileRef.getCanonicalText(); PsiDirectory parent = comment.getContainingFile().getParent(); if (parent != null) { String[] components = path.split("/"); if (components.length > 0) { TargetDirectory directory = new TargetDirectory(parent, Arrays.copyOf(components, components.length - 1)); NewFileLocation location = new NewFileLocation(Collections.singletonList(directory), components[components.length - 1]); fix = new CreateFilePathFix(attributeValue, location); } } holder.registerProblem(attributeValue, JavaBundle.message("inspection.message.snippet.file.not.found", path), LocalQuickFix.notNullElements(fix)); } } PsiSymbolReference symRef = ContainerUtil.getOnlyItem(attributeValue.getOwnReferences()); if (symRef != null) { Collection<? extends Symbol> target = symRef.resolveReference(); if (target.isEmpty()) { holder.registerProblem(attributeValue, JavaBundle.message("inspection.message.snippet.region.not.found")); } } }