public void showPreview(ExtractMethodProcessor processor) {
    PsiFile psiFile = processor.getElements()[0].getContainingFile();
    String title = (psiFile != null ? psiFile.getName() + ": " : "") + processor.getMethodName() + "()";
    PreviewPanel panel = new PreviewPanel(processor);
    Content content = myContentManager.getFactory().createContent(panel, title, true);
    myContentManager.addContent(content);
    myContentManager.setSelectedContent(content);
    panel.setContent(content);

    ToolWindowManager.getInstance(myProject).getToolWindow(ToolWindowId.EXTRACT_METHOD).activate(panel::initLater);
  }
public void showPreview(ExtractMethodProcessor processor)