/** Clones itself with given context. */ public Action createContextAwareInstance(Lookup actionContext) { return new ContextAction<T>(performer, selectMode, actionContext, type, global.isSurvive()); }
public <T> void unregisterListener(Class<T> type, ContextAction<T> a) { synchronized (CACHE) { Set<ContextAction> existing = findLSet(type); if (existing != null) { existing.remove(a); if (existing.isEmpty()) { listeners.remove(type); } } if (a.selectMode == ContextSelection.ALL && selectionAll != null) { selectionAll.remove(a); if (selectionAll.isEmpty() && !isSurvive()) { selectionAll = null; } } } }