@Test public void testOnCopySelectionCommandExecuted() { pasteSelectionSessionCommand.bind(session); pasteSelectionSessionCommand.listen(statusCallback); pasteSelectionSessionCommand.onCopySelectionCommandExecuted(new CopySelectionSessionCommandExecutedEvent(mock(CopySelectionSessionCommand.class), session)); verify(statusCallback, times(1)).execute(); assertTrue(command.isEnabled()); }
protected void onCopySelectionCommandExecuted(@Observes CopySelectionSessionCommandExecutedEvent event) { checkNotNull("event", event); if (Objects.equals(getSession(), event.getClientSession())) { setEnabled(true); fire(); } }
PasteSelectionSessionCommand extends AbstractClientSessionCommand<EditorSession> { protected void onCopySelectionCommandExecuted(@Observes CopySelectionSessionCommandExecutedEvent event) { checkNotNull("event", event); if (Objects.equals(getSession(), event.getClientSession())) { setEnabled(true); fire(); } } }
PasteSelectionSessionCommand extends AbstractClientSessionCommand<EditorSession> { protected void onCopySelectionCommandExecuted(@Observes CopySelectionSessionCommandExecutedEvent event) { checkNotNull("event", event); if (Objects.equals(getSession(), event.getClientSession())) { setEnabled(true); fire(); } } protected  PasteSelectionSessionCommand(); @Inject  PasteSelectionSessionCommand(final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                                        @Any ManagedInstance<CanvasCommandFactory<AbstractCanvasHandler>> canvasCommandFactoryInstance,
                                        final Event<CanvasSelectionEvent> selectionEvent,
                                        final DefinitionUtils definitionUtils,
                                        final SessionManager sessionManager); }
PasteSelectionSessionCommand extends AbstractClientSessionCommand<EditorSession> { protected void onCopySelectionCommandExecuted(@Observes CopySelectionSessionCommandExecutedEvent event) { checkNotNull("event", event); if (Objects.equals(getSession(), event.getClientSession())) { setEnabled(true); fire(); } } protected  PasteSelectionSessionCommand(); @Inject  PasteSelectionSessionCommand(final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                                        @Any ManagedInstance<CanvasCommandFactory<AbstractCanvasHandler>> canvasCommandFactoryInstance,
                                        final Event<CanvasSelectionEvent> selectionEvent,
                                        final DefinitionUtils definitionUtils,
                                        final SessionManager sessionManager); void setTestEdgeFoundInCanvas(boolean testEdgeFoundInCanvas); void setTestEdgeFoundInClipboard(boolean testEdgeFoundInClipboard); @Override void bind(final EditorSession session); @Override boolean accepts(final ClientSession session); @Override void execute(final Callback<V> callback); boolean isEdgeFoundInClipboard(Edge edge); boolean isEdgeFoundInCanvas(final Edge edge); boolean wasNodesDeletedFromGraph(); void clear(); String getCanvasViolations(CommandResult<CanvasViolation> result); }
PasteSelectionSessionCommand extends AbstractClientSessionCommand<EditorSession> { protected void onCopySelectionCommandExecuted(@Observes CopySelectionSessionCommandExecutedEvent event) { checkNotNull("event", event); if (Objects.equals(getSession(), event.getClientSession())) { setEnabled(true); fire(); } } protected  PasteSelectionSessionCommand(); @Inject  PasteSelectionSessionCommand(final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                                        @Any ManagedInstance<CanvasCommandFactory<AbstractCanvasHandler>> canvasCommandFactoryInstance,
                                        final Event<CanvasSelectionEvent> selectionEvent,
                                        final DefinitionUtils definitionUtils,
                                        final SessionManager sessionManager); void setTestEdgeFoundInCanvas(boolean testEdgeFoundInCanvas); void setTestEdgeFoundInClipboard(boolean testEdgeFoundInClipboard); @Override void bind(final EditorSession session); @Override boolean accepts(final ClientSession session); @Override void execute(final Callback<V> callback); boolean isEdgeFoundInClipboard(Edge edge); boolean isEdgeFoundInCanvas(final Edge edge); boolean wasNodesDeletedFromGraph(); void clear(); String getCanvasViolations(CommandResult<CanvasViolation> result);  }