protected boolean overrides(Object existing, Object candidate) { if (existing == null) { return true; } if (existing.equals(candidate)) { return true; } if (existing instanceof IStackFrame && candidate instanceof IStackFrame) { IStackFrame curr = (IStackFrame) existing; IStackFrame next = (IStackFrame) candidate; return curr.getThread().equals(next.getThread()) || !isSticky(existing); } return !isSticky(existing); }
@Override public boolean isSticky(ISelection selection, IPresentationContext context) { if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) { if (selection instanceof IStructuredSelection) { return isSticky(((IStructuredSelection)selection).getFirstElement()); } } return false; }