class CaseManagementDiagramEditor extends AbstractProjectDiagramEditor<CaseManagementDiagramResourceType> {

    protected void onSwitch(final Diagram diagram, final String defSetId, final String shapeDefId) {
        this.showLoadingViews();

        caseManagementSwitchViewService.call(new RemoteCallback<Optional<ProjectDiagram>>() {
            @Override
            public void callback(Optional<ProjectDiagram> diagram) {
                diagram.ifPresent(d -> {
                    CaseManagementDiagramEditor.this.reopenSession(d);
                    CaseManagementDiagramEditor.this.hideLoadingViews();
                });
            }
        }).switchView(diagram, defSetId, shapeDefId);
    }

    @Inject public  CaseManagementDiagramEditor(final AbstractProjectDiagramEditor.View view,
                                       final TextEditorView xmlEditorView,
                                       final ManagedInstance<SessionEditorPresenter<EditorSession>> editorSessionPresenterInstances,
                                       final ManagedInstance<SessionViewerPresenter<ViewerSession>> viewerSessionPresenterInstances,
                                       final Event<OnDiagramFocusEvent> onDiagramFocusEvent,
                                       final Event<OnDiagramLoseFocusEvent> onDiagramLostFocusEvent,
                                       final Event<NotificationEvent> notificationEvent,
                                       final ErrorPopupPresenter errorPopupPresenter,
                                       final DiagramClientErrorHandler diagramClientErrorHandler,
                                       final DocumentationView documentationView,
                                       final CaseManagementDiagramResourceType resourceType,
                                       final CaseManagementProjectEditorMenuSessionItems menuSessionItems,
                                       final ProjectMessagesListener projectMessagesListener,
                                       final ClientTranslationService translationService,
                                       final ClientProjectDiagramService projectDiagramServices,
                                       final Caller<ProjectDiagramResourceService> projectDiagramResourceServiceCaller,
                                       final Caller<CaseManagementSwitchViewService> caseManagementSwitchViewService,
                                       final UberfireDocks uberfireDocks,
                                       final StunnerDocksHandler stunnerDocksHandler);

}