void (Object component) { ToolWindowImpl window; if (component instanceof StripeButton stripeButton) { // old UI window = stripeButton.getToolWindow$intellij_platform_ide_impl(); } else if (component instanceof SquareStripeButton stripeButton) { // new UI window = stripeButton.getToolWindow(); } else { return; } myProperties.add(new PropertyBean("Tool Window ID", window.getId(), true)); myProperties.add(new PropertyBean("Tool Window Icon", window.getIcon())); ToolWindowFactory contentFactory = ReflectionUtil.getField(ToolWindowImpl.class, window, ToolWindowFactory.class, "contentFactory"); if (contentFactory != null) { myProperties.add(new PropertyBean("Tool Window Factory", contentFactory)); } else { ToolWindowEP ep = ToolWindowEP.EP_NAME.findFirstSafe(it -> Objects.equals(it.id, window.getId())); if (ep != null && ep.factoryClass != null) { myProperties.add(new PropertyBean("Tool Window Factory", ep.factoryClass)); } } }