protected void generateAdapter(){
  String holderClassName=Utils.getViewHolderClassName();
  StringBuilder holderBuilder=new StringBuilder();
  StringBuilder generator=new StringBuilder();
  generator.append("public " + holderClassName + "(android.view.View rootView) {\n");
  String rootViewName="rootView";
  holderBuilder.append("public " + "android.view.View " + rootViewName + ";\n");
  generator.append("this." + rootViewName + " = "+ rootViewName+ ";\n");
  for (  Element element : mElements) {
    if (!element.used) {
      continue;
    }
    holderBuilder.append("public " + element.name + " "+ element.getFieldName()+ ";\n");
    generator.append("this." + element.getFieldName() + " = ("+ element.name+ ") "+ rootViewName+ ".findViewById("+ element.getFullID()+ ");\n");
  }
  generator.append("}\n");
  holderBuilder.append(generator.toString());
  PsiClass viewHolder=mFactory.createClassFromText(holderBuilder.toString(),mClass);
  viewHolder.setName(holderClassName);
  mClass.add(viewHolder);
  mClass.addBefore(mFactory.createKeyword("public",mClass),mClass.findInnerClassByName(holderClassName,true));
  mClass.addBefore(mFactory.createKeyword("static",mClass),mClass.findInnerClassByName(holderClassName,true));
}

protected void generateAdapter ( ) { String holderClassName = Utils . getViewHolderClassName ( ) ; StringBuilder holderBuilder = new StringBuilder ( ) ; StringBuilder generator = new StringBuilder ( ) ; generator . append ( "public " + holderClassName + "(android.view.View rootView) {\n" ) ; String rootViewName = "rootView" ; holderBuilder . append ( "public " + "android.view.View " + rootViewName + ";\n" ) ; generator . append ( "this." + rootViewName + " = " + rootViewName + ";\n" ) ; for ( Element element : mElements ) { if ( ! element . used ) { continue ; } holderBuilder . append ( "public " + element . name + " " + element . getFieldName ( ) + ";\n" ) ; generator . append ( "this." + element . getFieldName ( ) + " = (" + element . name + ") " + rootViewName + ".findViewById(" + element . getFullID ( ) + ");\n" ) ; } generator . append ( "}\n" ) ; holderBuilder . append ( generator . toString ( ) ) ; PsiClass viewHolder = mFactory . createClassFromText ( holderBuilder . toString ( ) , mClass ) ; viewHolder . setName ( holderClassName ) ; mClass . add ( viewHolder ) ; mClass . addBefore ( mFactory . createKeyword ( "public" , mClass ) , mClass . findInnerClassByName ( holderClassName , true ) ) ; mClass . addBefore ( mFactory . createKeyword ( "static" , mClass ) , mClass . findInnerClassByName ( holderClassName , true ) ) ; }
create viewholder for adapters with injections
