void (RunContentDescriptor contentDescriptor, SimpleToolWindowPanel panel, Content content) { RunContentDescriptor oldDescriptor = content.getDisposer() instanceof RunContentDescriptor ? (RunContentDescriptor)content.getDisposer() : null; if (oldDescriptor != null) Disposer.dispose(oldDescriptor); panel.setContent(contentDescriptor.getComponent()); content.setComponent(panel); content.setDisposer(contentDescriptor); content.setPreferredFocusableComponent(contentDescriptor.getComponent()); content.setPreferredFocusedComponent(contentDescriptor.getPreferredFocusComputable()); content.putUserData(CONTENT_DESCRIPTOR, contentDescriptor); }