}
final Module module = ModuleUtilCore.findModuleForPsiElement(file);
if (module == null) return ProblemDescriptor.EMPTY_ARRAY;
final DartSdk sdk = DartSdk.getGlobalDartSdk();
if (sdk == null) {
return createProblemDescriptors(file, manager, DartBundle.message("dart.sdk.is.not.configured"),
new OpenDartSettingsQuickFix(DartBundle.message("setup.dart.sdk")));
}
if (!DartSdkGlobalLibUtil.isDartSdkGlobalLibAttached(module, sdk.getGlobalLibName())) {
final String message = DartSdkGlobalLibUtil.isIdeWithMultipleModuleSupport()
? DartBundle.message("dart.support.is.not.enabled.for.module.0", module.getName())
: DartBundle.message("dart.support.is.not.enabled.for.project");
return createProblemDescriptors(file, manager, message,
new EnableDartSupportQuickFix(module, sdk.getGlobalLibName()),
new OpenDartSettingsQuickFix(DartBundle.message("open.dart.settings")));
}
return ProblemDescriptor.EMPTY_ARRAY;
}