public boolean checkModelsBeforeGenerationIfNeeded(
     Project p,
     IOperationContext operationContext,
     List<SModel> modelDescriptors,
     Runnable regenerationRunnable) {
   for (ModelValidator modelValidator : ModelValidator.EP_NAME.getExtensions()) {
     if (!modelValidator.check(p, operationContext, modelDescriptors, regenerationRunnable)) {
       return false;
     }
   }
   return true;
 }
 public boolean checkModelsBeforeGenerationIfNeeded(Project p, List<SModel> modelDescriptors) {
   final IModifiableGenerationSettings generationSettings =
       GenerationSettingsProvider.getInstance().getGenerationSettings();
   if (!generationSettings.isCheckModelsBeforeGeneration()) {
     return true;
   }
   for (ModelValidator modelValidator : ModelValidator.EP_NAME.getExtensions()) {
     if (!modelValidator.check(p, modelDescriptors)) {
       return false;
     }
   }
   return true;
 }