@Test public void testOnOpen() { Collection<UberfireDock> stunnerDocks = new ArrayList<>(); stunnerDocks.add(propertiesDock); stunnerDocks.add(explorerDock); String perspectiveIdentifier = "Test Perspective ID"; when(perspectiveManagerMock.getCurrentPerspective()).thenReturn(currentPerspective); when(currentPerspective.getIdentifier()).thenReturn(perspectiveIdentifier); when(stunnerDocksHandler.provideDocks(perspectiveIdentifier)).thenReturn(stunnerDocks); when(propertiesDock.getPlaceRequest()).thenReturn(propertiesPlace); when(propertiesPlace.getIdentifier()).thenReturn(DiagramEditorPropertiesScreen.SCREEN_ID); when(explorerDock.getPlaceRequest()).thenReturn(explorerPlace); when(explorerPlace.getIdentifier()).thenReturn(DiagramEditorExplorerScreen.SCREEN_ID); diagramEditor.onOpen(); verify(uberfireDocks, times(1)).open(propertiesDock); }
@OnOpen public void onOpen() { openPropertiesDocks(); super.doOpen(); }
BPMNDiagramEditor extends AbstractProjectDiagramEditor<BPMNDiagramResourceType> { @OnOpen public void onOpen() { openPropertiesDocks(); super.doOpen(); } }
BPMNDiagramEditor extends AbstractProjectDiagramEditor<BPMNDiagramResourceType> { @OnOpen public void onOpen() { openPropertiesDocks(); super.doOpen(); } @Inject  BPMNDiagramEditor(final View view,
                             final TextEditorView xmlEditorView,
                             final ManagedInstance<SessionEditorPresenter<EditorSession>> editorPresenter,
                             final ManagedInstance<SessionViewerPresenter<ViewerSession>> viewerPresenter,
                             final Event<OnDiagramFocusEvent> onDiagramFocusEvent,
                             final Event<OnDiagramLoseFocusEvent> onDiagramLostFocusEvent,
                             final Event<NotificationEvent> notificationEvent,
                             final ErrorPopupPresenter errorPopupPresenter,
                             final DiagramClientErrorHandler diagramClientErrorHandler,
                             final @BPMN DocumentationView documentationView,
                             final BPMNDiagramResourceType resourceType,
                             final BPMNProjectEditorMenuSessionItems menuSessionItems,
                             final ProjectMessagesListener projectMessagesListener,
                             final ClientTranslationService translationService,
                             final ClientProjectDiagramService projectDiagramServices,
                             final Caller<ProjectDiagramResourceService> projectDiagramResourceServiceCaller,
                             final UberfireDocks uberfireDocks,
                             final StunnerDocksHandler stunnerDocksHandler); }
BPMNDiagramEditor extends AbstractProjectDiagramEditor<BPMNDiagramResourceType> { @OnOpen public void onOpen() { openPropertiesDocks(); super.doOpen(); } @Inject  BPMNDiagramEditor(final View view,
                             final TextEditorView xmlEditorView,
                             final ManagedInstance<SessionEditorPresenter<EditorSession>> editorPresenter,
                             final ManagedInstance<SessionViewerPresenter<ViewerSession>> viewerPresenter,
                             final Event<OnDiagramFocusEvent> onDiagramFocusEvent,
                             final Event<OnDiagramLoseFocusEvent> onDiagramLostFocusEvent,
                             final Event<NotificationEvent> notificationEvent,
                             final ErrorPopupPresenter errorPopupPresenter,
                             final DiagramClientErrorHandler diagramClientErrorHandler,
                             final @BPMN DocumentationView documentationView,
                             final BPMNDiagramResourceType resourceType,
                             final BPMNProjectEditorMenuSessionItems menuSessionItems,
                             final ProjectMessagesListener projectMessagesListener,
                             final ClientTranslationService translationService,
                             final ClientProjectDiagramService projectDiagramServices,
                             final Caller<ProjectDiagramResourceService> projectDiagramResourceServiceCaller,
                             final UberfireDocks uberfireDocks,
                             final StunnerDocksHandler stunnerDocksHandler); @OnStartup void onStartup(final ObservablePath path,
                          final PlaceRequest place); @Override String getEditorIdentifier(); @OnOpen void onOpen(); void openPropertiesDocks(); void closePropertiesDocks(); void openExplorerDocks(); void closeExplorerDocks(); void onScreenMaximizedEvent(@Observes ScreenMaximizedEvent event); void onScreenPreMaximizedStateEvent(final @Observes ScreenPreMaximizedStateEvent event); void onScreenMinimizedEvent(@Observes ScreenMinimizedEvent event); @OnClose @Override void onClose(); @OnFocus void onFocus(); @OnLostFocus void onLostFocus(); @Override @WorkbenchPartTitleDecoration IsWidget getTitle(); @Override @WorkbenchPartTitle String getTitleText(); @Override @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); @Override @WorkbenchPartView IsWidget getWidget(); @OnMayClose boolean onMayClose(); @Override void onSaveError(ClientRuntimeError error); }
BPMNDiagramEditor extends AbstractProjectDiagramEditor<BPMNDiagramResourceType> { @OnOpen public void onOpen() { openPropertiesDocks(); super.doOpen(); } @Inject  BPMNDiagramEditor(final View view,
                             final TextEditorView xmlEditorView,
                             final ManagedInstance<SessionEditorPresenter<EditorSession>> editorPresenter,
                             final ManagedInstance<SessionViewerPresenter<ViewerSession>> viewerPresenter,
                             final Event<OnDiagramFocusEvent> onDiagramFocusEvent,
                             final Event<OnDiagramLoseFocusEvent> onDiagramLostFocusEvent,
                             final Event<NotificationEvent> notificationEvent,
                             final ErrorPopupPresenter errorPopupPresenter,
                             final DiagramClientErrorHandler diagramClientErrorHandler,
                             final @BPMN DocumentationView documentationView,
                             final BPMNDiagramResourceType resourceType,
                             final BPMNProjectEditorMenuSessionItems menuSessionItems,
                             final ProjectMessagesListener projectMessagesListener,
                             final ClientTranslationService translationService,
                             final ClientProjectDiagramService projectDiagramServices,
                             final Caller<ProjectDiagramResourceService> projectDiagramResourceServiceCaller,
                             final UberfireDocks uberfireDocks,
                             final StunnerDocksHandler stunnerDocksHandler); @OnStartup void onStartup(final ObservablePath path,
                          final PlaceRequest place); @Override String getEditorIdentifier(); @OnOpen void onOpen(); void openPropertiesDocks(); void closePropertiesDocks(); void openExplorerDocks(); void closeExplorerDocks(); void onScreenMaximizedEvent(@Observes ScreenMaximizedEvent event); void onScreenPreMaximizedStateEvent(final @Observes ScreenPreMaximizedStateEvent event); void onScreenMinimizedEvent(@Observes ScreenMinimizedEvent event); @OnClose @Override void onClose(); @OnFocus void onFocus(); @OnLostFocus void onLostFocus(); @Override @WorkbenchPartTitleDecoration IsWidget getTitle(); @Override @WorkbenchPartTitle String getTitleText(); @Override @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); @Override @WorkbenchPartView IsWidget getWidget(); @OnMayClose boolean onMayClose(); @Override void onSaveError(ClientRuntimeError error); static final String EDITOR_ID; }