public @Nullable String getEncoding(@Nullable File file) {
    while (file != null) {
      final String charset = lookupCharsetMap(file);
      if (charset != null) {
        return charset;
      }
      file = FileUtilRt.getParentFile(file);
    }
    return myProjectCharset;
  }
public @Nullable String getEncoding(@Nullable File file)