if (vFile == null || vFile.getFileType() != ErlangFileType.MODULE) return null;
String canonicalPath = vFile.getCanonicalPath();
if (canonicalPath == null) return null;
Module module = ModuleUtilCore.findModuleForPsiElement(file);
if (module == null) return null;
Sdk sdk = ModuleRootManager.getInstance(module).getSdk();
if (sdk == null) return null;
String homePath = sdk.getHomePath();
if (homePath == null) return null;
InspectionProfile profile = InspectionProjectProfileManager.getInstance(file.getProject()).getInspectionProfile();
HighlightDisplayKey key = HighlightDisplayKey.find(ErlangDialyzerInspection.INSPECTION_SHORT_NAME);
if (!profile.isToolEnabled(key)) return null;