@VisibleForTesting void computeUniqueProjectLocation(){
  String projectLocation=myTemplateState.hasAttr(ATTR_PROJECT_LOCATION) ? myTemplateState.getString(ATTR_PROJECT_LOCATION) : computeProjectLocation();
  if (!projectLocation.isEmpty() && (myProject == null || !myProject.isInitialized())) {
    File file=new File(projectLocation);
    if (file.exists()) {
      String appName=myTemplateState.getString(ATTR_APP_TITLE);
      int i=2;
      while (file.exists()) {
        myTemplateState.put(ATTR_APP_TITLE,String.format(Locale.getDefault(),"%s %d",appName,i));
        file=new File(computeProjectLocation());
        i++;
      }
      deriveValues();
    }
  }
}

@ VisibleForTesting void computeUniqueProjectLocation ( ) { String projectLocation = myTemplateState . hasAttr ( ATTR_PROJECT_LOCATION ) ? myTemplateState . getString ( ATTR_PROJECT_LOCATION ) : computeProjectLocation ( ) ; if ( ! projectLocation . isEmpty ( ) && ( myProject == null || ! myProject . isInitialized ( ) ) ) { File file = new File ( projectLocation ) ; if ( file . exists ( ) ) { String appName = myTemplateState . getString ( ATTR_APP_TITLE ) ; int i = 2 ; while ( file . exists ( ) ) { myTemplateState . put ( ATTR_APP_TITLE , String . format ( Locale . getDefault ( ) , "%s %d" , appName , i ) ) ; file = new File ( computeProjectLocation ( ) ) ; i ++ ; } deriveValues ( ) ; } } }
find a unique filename to avoid conflicts .
