void (@Nullable VirtualFile virtualFileOrDir, @Nullable Charset charset) { Project project = guessProject(virtualFileOrDir); if (project != null) { EncodingProjectManager.getInstance(project).setEncoding(virtualFileOrDir, charset); } }