protected void generateFields(){
  for (Iterator<Element> iterator=mElements.iterator(); iterator.hasNext(); ) {
    Element element=iterator.next();
    if (!element.used) {
      iterator.remove();
      continue;
    }
    PsiField[] fields=mClass.getFields();
    boolean duplicateField=false;
    for (    PsiField field : fields) {
      String name=field.getName();
      if (name != null && name.equals(element.getFieldName())) {
        duplicateField=true;
        break;
      }
    }
    if (duplicateField) {
      iterator.remove();
      continue;
    }
    mClass.add(mFactory.createFieldFromText("private " + element.name + " "+ element.getFieldName()+ ";",mClass));
  }
}

protected void generateFields ( ) { for ( Iterator < Element > iterator = mElements . iterator ( ) ; iterator . hasNext ( ) ; ) { Element element = iterator . next ( ) ; if ( ! element . used ) { iterator . remove ( ) ; continue ; } PsiField [ ] fields = mClass . getFields ( ) ; boolean duplicateField = false ; for ( PsiField field : fields ) { String name = field . getName ( ) ; if ( name != null && name . equals ( element . getFieldName ( ) ) ) { duplicateField = true ; break ; } } if ( duplicateField ) { iterator . remove ( ) ; continue ; } mClass . add ( mFactory . createFieldFromText ( "private " + element . name + " " + element . getFieldName ( ) + ";" , mClass ) ) ; } }
create fields for injections inside main class
