@Override
      public void documentChanged(@NotNull DocumentEvent e) {
        Document document = e.getDocument();
        VirtualFile file = getFileDocumentManager().getFile(document);
        if (file != null &&
            !(file instanceof LightVirtualFile) &&
            !ApplicationManager.getApplication().hasWriteAction(ExternalChangeAction.class)) {
          ThreadingAssertions.assertEventDispatchThread();
          currentCommandHasChanges = true;
          myChangedFilesInCurrentCommand.add(file);
        }
      }
@Override
      public void documentChanged(@NotNull DocumentEvent e)