private static boolean validateGenOptions(Project project,GenerationOptionsImpl genOptions){
  final Collection<String> EMPTY=Collections.emptyList();
  Collection<String> conflicts=EMPTY;
  for (  ModuleChunk chunk : genOptions.getModuleChunks()) {
    final ChunkCustomCompilerExtension[] customeCompilers=chunk.getCustomCompilers();
    if (customeCompilers.length > 1) {
      if (conflicts == EMPTY) {
        conflicts=new LinkedList<String>();
      }
      conflicts.add(chunk.getName());
    }
  }
  if (!conflicts.isEmpty()) {
    StringBuilder msg=new StringBuilder();
    for (    String conflictingChunk : conflicts) {
      msg.append(CompilerBundle.message("generate.ant.build.custom.compiler.conflict.message.row",conflictingChunk));
    }
    int rc=Messages.showOkCancelDialog(project,CompilerBundle.message("generate.ant.build.custom.compiler.conflict.message",msg.toString()),CompilerBundle.message("generate.ant.build.custom.compiler.conflict.title"),Messages.getErrorIcon());
    if (rc != Messages.OK) {
      return false;
    }
  }
  return true;
}

private static boolean validateGenOptions ( Project project , GenerationOptionsImpl genOptions ) { final Collection < String > EMPTY = Collections . emptyList ( ) ; Collection < String > conflicts = EMPTY ; for ( ModuleChunk chunk : genOptions . getModuleChunks ( ) ) { final ChunkCustomCompilerExtension [ ] customeCompilers = chunk . getCustomCompilers ( ) ; if ( customeCompilers . length > 1 ) { if ( conflicts == EMPTY ) { conflicts = new LinkedList < String > ( ) ; } conflicts . add ( chunk . getName ( ) ) ; } } if ( ! conflicts . isEmpty ( ) ) { StringBuilder msg = new StringBuilder ( ) ; for ( String conflictingChunk : conflicts ) { msg . append ( CompilerBundle . message ( "generate.ant.build.custom.compiler.conflict.message.row" , conflictingChunk ) ) ; } int rc = Messages . showOkCancelDialog ( project , CompilerBundle . message ( "generate.ant.build.custom.compiler.conflict.message" , msg . toString ( ) ) , CompilerBundle . message ( "generate.ant.build.custom.compiler.conflict.title" ) , Messages . getErrorIcon ( ) ) ; if ( rc != Messages . OK ) { return false ; } } return true ; }
validate generation options and notify user about possible problems
