ServiceViewToolWindowDescriptor (ServiceViewContributor<?> rootContributor) { ServiceViewDescriptor descriptor = rootContributor.getViewDescriptor(myProject); if (descriptor instanceof ServiceViewToolWindowDescriptor) { return (ServiceViewToolWindowDescriptor)descriptor; } @NlsSafe String toolWindowId = descriptor.getId(); return new ServiceViewToolWindowDescriptor() { @Override public @NotNull String getToolWindowId() { return toolWindowId; } @Override public @NotNull Icon getToolWindowIcon() { return AllIcons.Toolwindows.ToolWindowServices; } @Override public @NotNull String getStripeTitle() { return toolWindowId; } }; }