def regenerateSourceFromOutput(outFile, pathComponents)
      #puts "regenerateSourceFromOutput, outFile = #{outFile}, pathComponents = #{pathComponents.inspect}"
      subPath = pathComponents.join("/")
      srcFile = File.join(@sourceTypeDirs[:source], subPath)
      #puts "  srcFile = #{srcFile}"
      ensureDirectoryExists(File.dirname(srcFile))
      extension = File.extname(outFile).downcase
      #puts "  extension = #{extension}"
      if REGENERATE_EXTENSIONS.include? extension
        raise "Regeneration from output not yet implemented."
      else
        okToCopyBack = true
        if SOURCE_EXTENSIONS.has_key? extension
          srcExtensions = SOURCE_EXTENSIONS[extension]
          srcNameWithoutExtension = srcFile.chomp(extension)
          possibleSrcFiles = srcExtensions.map{|srcExtension| srcNameWithoutExtension + srcExtension}
          for possibleSrcFile in possibleSrcFiles
            if File.exist? possibleSrcFile
              puts "NOT COPYING #{outFile} back to source because source file #{possibleSrcFile} exists"
              okToCopyBack = false
            end
          end
        end
        if okToCopyBack
          copySrcToOutputFile(outFile, srcFile, true)
        end
      end
    end
def regenerateSourceFromOutput(outFile, pathComponents)
      #puts "regenerateSourceFromOutput, outFile = #{outFile}, pathComponents = #{pathComponents.inspect}"
      subPath = pathComponents.join("/")
      srcFile = File.join(@sourceTypeDirs[:source], subPath)
      #puts "  srcFile = #{srcFile}"
      ensureDirectoryExists(File.dirname(srcFile))
      extension = File.extname(outFile).downcase
      #puts "  extension = #{extension}"
      if REGENERATE_EXTENSIONS.include? extension
        raise "Regeneration from output not yet implemented."
      else
        okToCopyBack = true
        if SOURCE_EXTENSIONS.has_key? extension
          srcExtensions = SOURCE_EXTENSIONS[extension]
          srcNameWithoutExtension = srcFile.chomp(extension)
          possibleSrcFiles = srcExtensions.map{|srcExtension| srcNameWithoutExtension + srcExtension}
          for possibleSrcFile in possibleSrcFiles
            if File.exist? possibleSrcFile
              puts "NOT COPYING #{outFile} back to source because source file #{possibleSrcFile} exists"
              okToCopyBack = false
            end
          end
        end
        if okToCopyBack
          copySrcToOutputFile(outFile, srcFile, true)
        end
      end
    end
Generate a source file from an output file (if that can be done)