private void replaceEditor(Project project, VirtualFile vFile, ImplementationViewDocumentFactory documentFactory, Document document) {
    myViewingPanel.remove(myEditor.getComponent());
    factory.releaseEditor(myEditor);
    myEditor = (EditorEx)factory.createEditor(document, project, EditorKind.PREVIEW);
    tuneEditor(vFile);
    documentFactory.tuneEditorBeforeShow(myEditor);
    myViewingPanel.add(myEditor.getComponent(), TEXT_PAGE_KEY);
    myBinarySwitch.show(myViewingPanel, TEXT_PAGE_KEY);
    documentFactory.tuneEditorAfterShow(myEditor);
  }
private void replaceEditor(Project project, VirtualFile vFile, ImplementationViewDocumentFactory documentFactory, Document document)