private void switchEditor() {
    LOG.debug("Switching editor...");
    AppUIExecutor.onUiThread().expireWith(myProject).submit(() -> {
      TextEditor textEditor = (TextEditor)TextEditorProvider.getInstance().createEditor(myProject, myVirtualFile);
      textEditor.addPropertyChangeListener(myPropertyChangeListener);
      myEditorPanel.removeAll();
      myEditorPanel.add(textEditor.getComponent(), BorderLayout.CENTER);
      myFileEditor = textEditor;
      showCard(EDITOR_CARD);
      LOG.debug("Editor for downloaded file opened.");
    });
  }
private void switchEditor()