@Test public void testInit() { Metadata metadata = mock(Metadata.class); Command command = mock(Command.class); tested.init(metadata, command); verify(managedSession, times(1)).registerCanvasControl(eq(MediatorsControl.class)); verify(managedSession, times(1)).registerCanvasHandlerControl(eq(SelectionControl.class), eq(MultipleSelection.class)); verify(managedSession, times(1)).registerCanvasHandlerControl(eq(ResizeControl.class)); verify(managedSession, times(1)).registerCanvasHandlerControl(eq(ConnectionAcceptorControl.class)); verify(managedSession, times(1)).registerCanvasHandlerControl(eq(ContainmentAcceptorControl.class)); verify(managedSession, times(1)).registerCanvasHandlerControl(eq(DockingAcceptorControl.class)); verify(managedSession, times(1)).registerCanvasHandlerControl(eq(CanvasInlineTextEditorControl.class)); verify(managedSession, times(1)).registerCanvasHandlerControl(eq(LocationControl.class)); verify(managedSession, times(1)).registerCanvasHandlerControl(eq(ToolboxControl.class)); verify(managedSession, times(1)).registerCanvasHandlerControl(eq(ElementBuilderControl.class), eq(Observer.class)); verify(managedSession, times(1)).registerCanvasHandlerControl(eq(NodeBuilderControl.class)); verify(managedSession, times(1)).registerCanvasHandlerControl(eq(EdgeBuilderControl.class)); verify(managedSession, times(1)).registerCanvasControl(eq(KeyboardControl.class)); verify(managedSession, times(1)).registerCanvasControl(eq(ClipboardControl.class)); verify(managedSession, times(1)).registerCanvasHandlerControl(eq(ControlPointControl.class)); verify(managedSession, times(1)).init(eq(metadata), eq(command)); }
@Override public void init(final Metadata metadata, final Command callback) { init(s -> s.registerCanvasControl(MediatorsControl.class) .registerCanvasHandlerControl(SelectionControl.class, MultipleSelection.class) .registerCanvasHandlerControl(ResizeControl.class) .registerCanvasHandlerControl(ConnectionAcceptorControl.class) .registerCanvasHandlerControl(ContainmentAcceptorControl.class) .registerCanvasHandlerControl(DockingAcceptorControl.class) .registerCanvasHandlerControl(CanvasInlineTextEditorControl.class) .registerCanvasHandlerControl(LocationControl.class) .registerCanvasHandlerControl(ToolboxControl.class) .registerCanvasHandlerControl(ElementBuilderControl.class, Observer.class) .registerCanvasHandlerControl(NodeBuilderControl.class) .registerCanvasHandlerControl(EdgeBuilderControl.class) .registerCanvasHandlerControl(AbstractCanvasShortcutsControlImpl.class) .registerCanvasControl(KeyboardControl.class) .registerCanvasControl(ClipboardControl.class) .registerCanvasHandlerControl(ControlPointControl.class), metadata, callback); }
DefaultEditorSession extends EditorSession { @Override public void init(final Metadata metadata, final Command callback) { init(s -> s.registerCanvasControl(MediatorsControl.class) .registerCanvasHandlerControl(SelectionControl.class, MultipleSelection.class) .registerCanvasHandlerControl(ResizeControl.class) .registerCanvasHandlerControl(ConnectionAcceptorControl.class) .registerCanvasHandlerControl(ContainmentAcceptorControl.class) .registerCanvasHandlerControl(DockingAcceptorControl.class) .registerCanvasHandlerControl(CanvasInlineTextEditorControl.class) .registerCanvasHandlerControl(LocationControl.class) .registerCanvasHandlerControl(ToolboxControl.class) .registerCanvasHandlerControl(ElementBuilderControl.class, Observer.class) .registerCanvasHandlerControl(NodeBuilderControl.class) .registerCanvasHandlerControl(EdgeBuilderControl.class) .registerCanvasHandlerControl(AbstractCanvasShortcutsControlImpl.class) .registerCanvasControl(KeyboardControl.class) .registerCanvasControl(ClipboardControl.class) .registerCanvasHandlerControl(ControlPointControl.class), metadata, callback); } }
DefaultEditorSession extends EditorSession { @Override public void init(final Metadata metadata, final Command callback) { init(s -> s.registerCanvasControl(MediatorsControl.class) .registerCanvasHandlerControl(SelectionControl.class, MultipleSelection.class) .registerCanvasHandlerControl(ResizeControl.class) .registerCanvasHandlerControl(ConnectionAcceptorControl.class) .registerCanvasHandlerControl(ContainmentAcceptorControl.class) .registerCanvasHandlerControl(DockingAcceptorControl.class) .registerCanvasHandlerControl(CanvasInlineTextEditorControl.class) .registerCanvasHandlerControl(LocationControl.class) .registerCanvasHandlerControl(ToolboxControl.class) .registerCanvasHandlerControl(ElementBuilderControl.class, Observer.class) .registerCanvasHandlerControl(NodeBuilderControl.class) .registerCanvasHandlerControl(EdgeBuilderControl.class) .registerCanvasHandlerControl(AbstractCanvasShortcutsControlImpl.class) .registerCanvasControl(KeyboardControl.class) .registerCanvasControl(ClipboardControl.class) .registerCanvasHandlerControl(ControlPointControl.class), metadata, callback); } @Inject  DefaultEditorSession(final ManagedSession session,
                                final CanvasCommandManager<AbstractCanvasHandler> canvasCommandManager,
                                final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                                final Registry<org.kie.workbench.common.stunner.core.command.Command<AbstractCanvasHandler, CanvasViolation>> commandRegistry,
                                final Event<RegisterChangedEvent> registerChangedEvent); }
DefaultEditorSession extends EditorSession { @Override public void init(final Metadata metadata, final Command callback) { init(s -> s.registerCanvasControl(MediatorsControl.class) .registerCanvasHandlerControl(SelectionControl.class, MultipleSelection.class) .registerCanvasHandlerControl(ResizeControl.class) .registerCanvasHandlerControl(ConnectionAcceptorControl.class) .registerCanvasHandlerControl(ContainmentAcceptorControl.class) .registerCanvasHandlerControl(DockingAcceptorControl.class) .registerCanvasHandlerControl(CanvasInlineTextEditorControl.class) .registerCanvasHandlerControl(LocationControl.class) .registerCanvasHandlerControl(ToolboxControl.class) .registerCanvasHandlerControl(ElementBuilderControl.class, Observer.class) .registerCanvasHandlerControl(NodeBuilderControl.class) .registerCanvasHandlerControl(EdgeBuilderControl.class) .registerCanvasHandlerControl(AbstractCanvasShortcutsControlImpl.class) .registerCanvasControl(KeyboardControl.class) .registerCanvasControl(ClipboardControl.class) .registerCanvasHandlerControl(ControlPointControl.class), metadata, callback); } @Inject  DefaultEditorSession(final ManagedSession session,
                                final CanvasCommandManager<AbstractCanvasHandler> canvasCommandManager,
                                final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                                final Registry<org.kie.workbench.common.stunner.core.command.Command<AbstractCanvasHandler, CanvasViolation>> commandRegistry,
                                final Event<RegisterChangedEvent> registerChangedEvent); @PostConstruct void constructInstance(); @Override void init(final Metadata metadata,
                     final Command callback); void init(final Consumer<ManagedSession> sessionControls,
                     final Metadata metadata,
                     final Command callback); @Override void open(); @Override void destroy(); @Override String getSessionUUID(); @Override AbstractCanvas getCanvas(); @Override AbstractCanvasHandler getCanvasHandler(); @Override CanvasCommandManager<AbstractCanvasHandler> getCommandManager(); @Override Registry<org.kie.workbench.common.stunner.core.command.Command<AbstractCanvasHandler, CanvasViolation>> getCommandRegistry(); @Override MediatorsControl<AbstractCanvas> getMediatorsControl(); @Override KeyboardControl<AbstractCanvas, ClientSession> getKeyboardControl(); @Override ClipboardControl<Element, AbstractCanvas, ClientSession> getClipboardControl(); @Override SelectionControl<AbstractCanvasHandler, Element> getSelectionControl(); @Override ConnectionAcceptorControl<AbstractCanvasHandler> getConnectionAcceptorControl(); @Override ContainmentAcceptorControl<AbstractCanvasHandler> getContainmentAcceptorControl(); @Override DockingAcceptorControl<AbstractCanvasHandler> getDockingAcceptorControl(); }
DefaultEditorSession extends EditorSession { @Override public void init(final Metadata metadata, final Command callback) { init(s -> s.registerCanvasControl(MediatorsControl.class) .registerCanvasHandlerControl(SelectionControl.class, MultipleSelection.class) .registerCanvasHandlerControl(ResizeControl.class) .registerCanvasHandlerControl(ConnectionAcceptorControl.class) .registerCanvasHandlerControl(ContainmentAcceptorControl.class) .registerCanvasHandlerControl(DockingAcceptorControl.class) .registerCanvasHandlerControl(CanvasInlineTextEditorControl.class) .registerCanvasHandlerControl(LocationControl.class) .registerCanvasHandlerControl(ToolboxControl.class) .registerCanvasHandlerControl(ElementBuilderControl.class, Observer.class) .registerCanvasHandlerControl(NodeBuilderControl.class) .registerCanvasHandlerControl(EdgeBuilderControl.class) .registerCanvasHandlerControl(AbstractCanvasShortcutsControlImpl.class) .registerCanvasControl(KeyboardControl.class) .registerCanvasControl(ClipboardControl.class) .registerCanvasHandlerControl(ControlPointControl.class), metadata, callback); } @Inject  DefaultEditorSession(final ManagedSession session,
                                final CanvasCommandManager<AbstractCanvasHandler> canvasCommandManager,
                                final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                                final Registry<org.kie.workbench.common.stunner.core.command.Command<AbstractCanvasHandler, CanvasViolation>> commandRegistry,
                                final Event<RegisterChangedEvent> registerChangedEvent); @PostConstruct void constructInstance(); @Override void init(final Metadata metadata,
                     final Command callback); void init(final Consumer<ManagedSession> sessionControls,
                     final Metadata metadata,
                     final Command callback); @Override void open(); @Override void destroy(); @Override String getSessionUUID(); @Override AbstractCanvas getCanvas(); @Override AbstractCanvasHandler getCanvasHandler(); @Override CanvasCommandManager<AbstractCanvasHandler> getCommandManager(); @Override Registry<org.kie.workbench.common.stunner.core.command.Command<AbstractCanvasHandler, CanvasViolation>> getCommandRegistry(); @Override MediatorsControl<AbstractCanvas> getMediatorsControl(); @Override KeyboardControl<AbstractCanvas, ClientSession> getKeyboardControl(); @Override ClipboardControl<Element, AbstractCanvas, ClientSession> getClipboardControl(); @Override SelectionControl<AbstractCanvasHandler, Element> getSelectionControl(); @Override ConnectionAcceptorControl<AbstractCanvasHandler> getConnectionAcceptorControl(); @Override ContainmentAcceptorControl<AbstractCanvasHandler> getContainmentAcceptorControl(); @Override DockingAcceptorControl<AbstractCanvasHandler> getDockingAcceptorControl();  }