/** * Returns whether this popup has the focus. * * @return <code>true</code> if the popup has the focus */ public boolean hasFocus() { if (Helper.okToUse(fProposalShell)) { if ((fProposalShell.getDisplay().getActiveShell() == fProposalShell)) return true; /* * We have to delegate this query to the additional info controller * as well, since the content assistant is the widget token owner * and its closer does not know that the additional info control can * now also take focus. */ if (fAdditionalInfoController != null) { IInformationControl informationControl= fAdditionalInfoController.getCurrentInformationControl2(); if (informationControl != null && informationControl.isFocusControl()) return true; InformationControlReplacer replacer= fAdditionalInfoController.getInternalAccessor().getInformationControlReplacer(); if (replacer != null) { informationControl= replacer.getCurrentInformationControl2(); if (informationControl != null && informationControl.isFocusControl()) return true; } } } return false; }
/** * Returns whether this popup has the focus. * * @return <code>true</code> if the popup has the focus */ public boolean hasFocus() { if (Helper.okToUse(fProposalShell)) { if ((fProposalShell.getDisplay().getActiveShell() == fProposalShell)) return true; /* * We have to delegate this query to the additional info controller * as well, since the content assistant is the widget token owner * and its closer does not know that the additional info control can * now also take focus. */ if (fAdditionalInfoController != null) { IInformationControl informationControl= fAdditionalInfoController.getCurrentInformationControl2(); if (informationControl != null && informationControl.isFocusControl()) return true; InformationControlReplacer replacer= fAdditionalInfoController.getInternalAccessor().getInformationControlReplacer(); if (replacer != null) { informationControl= replacer.getCurrentInformationControl2(); if (informationControl != null && informationControl.isFocusControl()) return true; } } } return false; }
fAdditionalInfoController.hideInformationControl(); else if (!fAdditionalInfoController.getInternalAccessor().isReplaceInProgress()) { IInformationControl infoControl= fAdditionalInfoController.getCurrentInformationControl2(); if (event.widget instanceof Control) { Control control= (Control) event.widget; IInformationControl infoControl= fAdditionalInfoController.getCurrentInformationControl2(); if (infoControl instanceof IInformationControlExtension5) { final IInformationControlExtension5 iControl5= (IInformationControlExtension5) infoControl;
fAdditionalInfoController.hideInformationControl(); else if (!fAdditionalInfoController.getInternalAccessor().isReplaceInProgress()) { IInformationControl infoControl= fAdditionalInfoController.getCurrentInformationControl2(); if (event.widget instanceof Control) { Control control= (Control) event.widget; IInformationControl infoControl= fAdditionalInfoController.getCurrentInformationControl2(); if (infoControl instanceof IInformationControlExtension5) { final IInformationControlExtension5 iControl5= (IInformationControlExtension5) infoControl;