docs: public void writeResources()
      {
          StreamOut out = null;
          Record registration = this.getMainRecord();
          Resource resource = (Resource)this.getRecord(Resource.RESOURCE_FILE);
          
          String strCurrentFileName = "none";
          String strCurrentLanguage = "none";
          String strCurrentLocale = "none";
          try   {
              registration.setKeyArea(Registration.RESOURCE_ID_KEY);
              registration.close();
              boolean bFirstTime = true;
              boolean bResourceListBundle = true;
              while (registration.hasNext())
              {
                  registration.next();
          
                  String strFileName = resource.getField(Resource.CODE).toString();
                  String strLanguage = registration.getField(Registration.LANGUAGE).toString();
                  String strLocale = registration.getField(Registration.LOCALE).toString();
                  
                  if ((!strCurrentFileName.equals(strFileName))
                      || (!strCurrentLanguage.equals(strLanguage))
                      || (!strCurrentLocale.equals(strLocale)))
                  { // New file
                      if (out != null)
                          this.printEndFile(out, strCurrentFileName, bResourceListBundle);   // End file stuff
                      out = null;
          
                      if (ResourceTypeField.PROPERTIES.equals(resource.getField(Resource.TYPE).getString()))
                          bResourceListBundle = false;
                      else
                          bResourceListBundle = true;
          
                          // Start new file
                      strCurrentFileName = strFileName;
                      strCurrentLanguage = strLanguage;
                      strCurrentLocale = strLocale;
                      String packageName = resource.getField(Resource.LOCATION).toString();
                      strFileName += "Resources";
                      if (strLanguage != null)
                          if (strLanguage.length() > 0)
                              strFileName += "_" + strLanguage;
                      if (strLocale != null)
                          if (strLocale.length() > 0)
                              strFileName += "_" + strLocale;
                      ClassProject recClassProject = (ClassProject)((ReferenceField)resource.getField(Resource.CLASS_PROJECT_ID)).getReference();
                      strFileName = strFileName.replace('.', '/');
                      String basePackageName = packageName;
                      if (basePackageName.startsWith("." + DBConstants.RES_SUBPACKAGE.substring(0, DBConstants.RES_SUBPACKAGE.length() - 1)))
                          basePackageName = basePackageName.substring(DBConstants.RES_SUBPACKAGE.length()); // Get rid of ".res".. it will be added back later
                      String strFullFileName = recClassProject.getFileName(strFileName, basePackageName, bResourceListBundle ? ClassProject.CodeType.RESOURCE_CODE : ClassProject.CodeType.RESOURCE_PROPERTIES, true, true);
                      packageName = recClassProject.getFullPackage(bResourceListBundle ? ClassProject.CodeType.RESOURCE_CODE : ClassProject.CodeType.RESOURCE_PROPERTIES, packageName);
                      out = this.createFile(strFullFileName);
                      out.writeit(this.getStartSourceCode(packageName, strFileName, resource.getField(Resource.DESCRIPTION).toString(), bResourceListBundle));
                      if (bResourceListBundle)
                      {
                          out.writeit("   static final Object[][] contents = {\n");
                          out.writeit("     // LOCALIZE THIS\n");
                      }
                      bFirstTime = true;
                  }
                  if (!bFirstTime)
                  {
                      if (bResourceListBundle)
                          out.writeit(",\n");
                      else
                          out.writeit("\n");
                  }
                  bFirstTime = false;
                  this.writeDetailLine(registration, out, bResourceListBundle);
              }
              if (out != null)
                  this.printEndFile(out, strCurrentFileName, bResourceListBundle);   // End file stuff
              out = null;
          } catch (DBException ex)    {
              ex.printStackTrace();
          }
      }