private void saveContent(
     PackageFragment dest, String destName, TextEdit edits, String sourceEncoding, IFile destFile)
     throws JavaModelException {
   try {
     // TODO (frederic) remove when bug 67606 will be fixed (bug 67823)
     // fix bug 66898
     if (sourceEncoding != null) destFile.setCharset(sourceEncoding, this.progressMonitor);
     // end todo
   } catch (CoreException ce) {
     // use no encoding
   }
   // when the file was copied, its read-only flag was preserved -> temporary set it to false
   // note this doesn't interfere with repository providers as this is a new resource that cannot
   // be under
   // version control yet
   Util.setReadOnly(destFile, false);
   ICompilationUnit destCU = dest.getCompilationUnit(destName);
   applyTextEdit(destCU, edits);
   destCU.save(getSubProgressMonitor(1), this.force);
 }