}
@Override
public void invoke(@NotNull final Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
if (file instanceof YAMLFile && file.isValid()) {
final YAMLFile yamlFile = (YAMLFile) file;
ApplicationManager.getApplication().runWriteAction(new Runnable() {
@Override
public void run() {
PsiDocumentManager manager = PsiDocumentManager.getInstance(project);
Document document = manager.getDocument(yamlFile);