@Override public void setFocus() { final String where = "setFocus"; //$NON-NLS-1$ if (setFocusIsRunning) { trace(where, "ERROR: trying to call setFocus while processing focus", fStatusControl); //$NON-NLS-1$ } else { trace(where, "START", fStatusControl); //$NON-NLS-1$ } setFocusIsRunning = true; if (fStatusControl != null && !fStatusControl.isDisposed()) { /* even if the control does not really take focus, we still have to set it * to fulfill the contract and to make e.g. Ctrl+PageUp/Down work. */ fStatusControl.setFocus(); } else { super.setFocus(); } setFocusIsRunning = false; trace(where, "END", fStatusControl); //$NON-NLS-1$ }
@Override protected void sanityCheckState(IEditorInput input) { // http://dev.eclipse.org/bugs/show_bug.cgi?id=19014 super.sanityCheckState(input); if (!setFocusIsRunning) { updatePartControl(); } else { trace("sanityCheck", "delaying update", fStatusControl); //$NON-NLS-1$ //$NON-NLS-2$ PlatformUI.getWorkbench().getDisplay().asyncExec(() -> { trace("sanityCheck", "incoming update", fStatusControl); //$NON-NLS-1$ //$NON-NLS-2$ updatePartControl(); }); } }
final String where = "updatePartControl"; //$NON-NLS-1$ if (setFocusIsRunning) { trace(where, "ERROR: trying to call update while processing focus", fStatusControl); //$NON-NLS-1$ } else { trace(where, "START", fStatusControl); //$NON-NLS-1$ trace(where, "status control disposed", fStatusControl); //$NON-NLS-1$ fStatusControl= null; } else { fStatusControl= createStatusControl(fParent, status); trace(where, "status control created", fStatusControl); //$NON-NLS-1$ front= fStatusControl; fParent.setFocus(); trace(where, "END", fStatusControl); //$NON-NLS-1$