void flushPreferences(Preferences projectPrefs, boolean shouldDisableCharsetDeltaJob)
     throws BackingStoreException {
   if (projectPrefs != null) {
     try {
       if (shouldDisableCharsetDeltaJob) charsetListener.setDisabled(true);
       projectPrefs.flush();
     } finally {
       if (shouldDisableCharsetDeltaJob) charsetListener.setDisabled(false);
     }
   }
 }