void (@NotNull ContentManager contentManager, @NotNull ServiceViewContributor<?> contributor) { Content mainContent = null; for (Content content : contentManager.getContents()) { ServiceView serviceView = getServiceView(content); if (serviceView != null) { if (serviceView.getModel() instanceof ContributorModel && contributor.equals(((ContributorModel)serviceView.getModel()).getContributor())) { contentManager.setSelectedContent(content, true); return; } if (isMainView(serviceView)) { mainContent = content; } } } if (mainContent != null) { contentManager.setSelectedContent(mainContent, true); } }