@Override public Boolean dispatch(@NotNull KeyEvent e, @NotNull Context context) { if (myWrapper == null || myTypeAheadDone.isProcessed()) return null; myEvents.addAll(context.getQueue()); context.getQueue().clear(); if (isToDispatchToDialogNow(e)) { return false; } else { myEvents.add(e); return true; } }
private void flushEvents() { if (myWrapper.isToDispatchTypeAhead() && myContextOnFinish != null) { myContextOnFinish.dispatch(myEvents); } }