void (ContentManager contentManager, ServiceViewModel viewModel, ServiceViewState viewState, boolean select) { ServiceView serviceView = ServiceView.createView(myProject, viewModel, prepareViewState(viewState)); ItemPresentation presentation = getContentPresentation(myProject, viewModel, viewState); if (presentation == null) return; Content content = addServiceContent(contentManager, serviceView, presentation, select); if (viewModel instanceof GroupModel) { extractGroup((GroupModel)viewModel, content); } else if (viewModel instanceof SingeServiceModel) { extractService((SingeServiceModel)viewModel, content); } else if (viewModel instanceof ServiceListModel) { extractList((ServiceListModel)viewModel, content); } }