void (@NotNull ContentManager contentManager, @Nullable ServiceViewModel modelToSelect) { if (modelToSelect != null) { for (Content content : contentManager.getContents()) { ServiceView serviceView = getServiceView(content); if (serviceView != null && serviceView.getModel() == modelToSelect) { contentManager.setSelectedContent(content); break; } } } else { Content content = getMainContent(contentManager); if (content != null) { contentManager.setSelectedContent(content); } } }