@Test public void testBind() { assertThat(canvasShortcutsControl.editorSession).isNull(); final EditorSession session = mock(EditorSession.class); final KeyboardControl keyboardControl = mock(KeyboardControl.class); doReturn(keyboardControl).when(session).getKeyboardControl(); canvasShortcutsControl.bind(session); assertThat(canvasShortcutsControl.editorSession).isEqualTo(session); verify(keyboardControl).addKeyShortcutCallback(eq(canvasShortcutsControl)); }
@Override public void bind(final EditorSession session) { this.editorSession = session; session.getKeyboardControl().addKeyShortcutCallback(this); }
AbstractCanvasShortcutsControlImpl extends AbstractCanvasHandlerRegistrationControl<AbstractCanvasHandler> implements CanvasControl.SessionAware<EditorSession>,
                   KeyboardControl.KeyShortcutCallback { @Override public void bind(final EditorSession session) { this.editorSession = session; session.getKeyboardControl().addKeyShortcutCallback(this); } }
AbstractCanvasShortcutsControlImpl extends AbstractCanvasHandlerRegistrationControl<AbstractCanvasHandler> implements CanvasControl.SessionAware<EditorSession>,
                   KeyboardControl.KeyShortcutCallback { @Override public void bind(final EditorSession session) { this.editorSession = session; session.getKeyboardControl().addKeyShortcutCallback(this); } @Inject  AbstractCanvasShortcutsControlImpl(final Instance<KeyboardShortcut> keyboardShortcutActions); }
AbstractCanvasShortcutsControlImpl extends AbstractCanvasHandlerRegistrationControl<AbstractCanvasHandler> implements CanvasControl.SessionAware<EditorSession>,
                   KeyboardControl.KeyShortcutCallback { @Override public void bind(final EditorSession session) { this.editorSession = session; session.getKeyboardControl().addKeyShortcutCallback(this); } @Inject  AbstractCanvasShortcutsControlImpl(final Instance<KeyboardShortcut> keyboardShortcutActions); @Override void register(Element element); @Override void bind(final EditorSession session); @Override void onKeyShortcut(final KeyboardEvent.Key... keys); String selectedNodeId(); Element selectedNodeElement(); }
AbstractCanvasShortcutsControlImpl extends AbstractCanvasHandlerRegistrationControl<AbstractCanvasHandler> implements CanvasControl.SessionAware<EditorSession>,
                   KeyboardControl.KeyShortcutCallback { @Override public void bind(final EditorSession session) { this.editorSession = session; session.getKeyboardControl().addKeyShortcutCallback(this); } @Inject  AbstractCanvasShortcutsControlImpl(final Instance<KeyboardShortcut> keyboardShortcutActions); @Override void register(Element element); @Override void bind(final EditorSession session); @Override void onKeyShortcut(final KeyboardEvent.Key... keys); String selectedNodeId(); Element selectedNodeElement();  }