/** * Returns whether this context information popup is active. I.e., either * a context selector or context information is displayed. * * @return <code>true</code> if the context selector is active */ public boolean isActive() { return (Helper2.okToUse(fContextInfoPopup) || Helper2.okToUse(fContextSelectorShell)); }
/** * Returns whether this context information popup is active. I.e., either * a context selector or context information is displayed. * * @return <code>true</code> if the context selector is active */ public boolean isActive() { return (Helper2.okToUse(fContextInfoPopup) || Helper2.okToUse(fContextSelectorShell)); }
/** * Requests the proposal shell to take focus. * * @since 3.0 */ public void setFocus() { if (Helper2.okToUse(fProposalShell)) fProposalShell.setFocus(); } }
/** * Requests the proposal shell to take focus. * * @since 3.0 */ public void setFocus() { if (Helper2.okToUse(fProposalShell)) fProposalShell.setFocus(); } }
/** * Uninstalls this closer if previously installed. */ public void uninstall() { fContentAssistant= null; if (Helper2.okToUse(fShell)) fShell.removeShellListener(this); fShell= null; if (Helper2.okToUse(fScrollbar)) fScrollbar.removeSelectionListener(this); if (Helper2.okToUse(fTable)) fTable.removeFocusListener(this); }
/** * Uninstalls this closer if previously installed. */ public void uninstall() { fContentAssistant= null; if (Helper2.okToUse(fShell)) fShell.removeShellListener(this); fShell= null; if (Helper2.okToUse(fScrollbar)) fScrollbar.removeSelectionListener(this); if (Helper2.okToUse(fTable)) fTable.removeFocusListener(this); }
protected void adjustListeners(int type) { switch (type) { case LAYOUT_PROPOSAL_SELECTOR: if (fContextType == LAYOUT_CONTEXT_SELECTOR && Helper2.okToUse(fShells[LAYOUT_CONTEXT_SELECTOR])) // Disable event notification to the tip selector. removeContentAssistListener((IContentAssistListener2) fPopups[LAYOUT_CONTEXT_SELECTOR], CONTEXT_SELECTOR); break; case LAYOUT_CONTEXT_SELECTOR: if (Helper2.okToUse(fShells[LAYOUT_PROPOSAL_SELECTOR])) // Disable event notification to the proposal selector. removeContentAssistListener((IContentAssistListener2) fPopups[LAYOUT_PROPOSAL_SELECTOR], PROPOSAL_SELECTOR); break; case LAYOUT_CONTEXT_INFO_POPUP: break; } } }
/** *Returns whether the context selector has the focus. * * @return <code>true</code> if teh context selector has the focus */ public boolean hasFocus() { if (Helper2.okToUse(fContextSelectorShell)) return (fContextSelectorShell.isFocusControl() || fContextSelectorTable.isFocusControl()); return false; }
/** *Returns whether the context selector has the focus. * * @return <code>true</code> if teh context selector has the focus */ public boolean hasFocus() { if (Helper2.okToUse(fContextSelectorShell)) return (fContextSelectorShell.isFocusControl() || fContextSelectorTable.isFocusControl()); return false; }
/** * Returns whether this popup has the focus. * * @return <code>true</code> if the popup has the focus */ public boolean hasFocus() { if (Helper2.okToUse(fProposalShell)) return (fProposalShell.isFocusControl() || fProposalTable.isFocusControl()); return false; }
/** * Returns whether this popup has the focus. * * @return <code>true</code> if the popup has the focus */ public boolean hasFocus() { if (Helper2.okToUse(fProposalShell)) return (fProposalShell.isFocusControl() || fProposalTable.isFocusControl()); return false; }
@Override public void focusLost(final FocusEvent e) { fScrollbarClicked= false; Display d= fTable.getDisplay(); d.asyncExec(() -> { if (Helper2.okToUse(fTable) && !fTable.isFocusControl() && !fScrollbarClicked && fContentAssistant != null) fContentAssistant.popupFocusLost(e); }); }
/** * Hodes the context selector. */ private void hideContextSelector() { if (Helper2.okToUse(fContextSelectorShell)) { fContentAssistant.removeContentAssistListener(this, ContentAssistant2.CONTEXT_SELECTOR); fPopupCloser.uninstall(); fContextSelectorShell.setVisible(false); fContextSelectorShell.dispose(); fContextSelectorShell= null; } if (!Helper2.okToUse(fContextInfoPopup)) fContentAssistant.contextInformationClosed(); }
/** * Hodes the context selector. */ private void hideContextSelector() { if (Helper2.okToUse(fContextSelectorShell)) { fContentAssistant.removeContentAssistListener(this, ContentAssistant2.CONTEXT_SELECTOR); fPopupCloser.uninstall(); fContextSelectorShell.setVisible(false); fContextSelectorShell.dispose(); fContextSelectorShell= null; } if (!Helper2.okToUse(fContextInfoPopup)) fContentAssistant.contextInformationClosed(); }
/** * Installs a key listener on the text viewer's widget. */ private void installKeyListener() { if (!fKeyListenerHooked) { StyledText text= fViewer.getTextWidget(); if (Helper2.okToUse(text)) { if (fViewer instanceof ITextViewerExtension) { ITextViewerExtension e= (ITextViewerExtension) fViewer; e.prependVerifyKeyListener(fInternalListener); } else { text.addVerifyKeyListener(fInternalListener); } fKeyListenerHooked= true; } } }
/** * Uninstall the key listener from the text viewer's widget. */ private void uninstallKeyListener() { if (fKeyListenerHooked) { StyledText text= fViewer.getTextWidget(); if (Helper2.okToUse(text)) { if (fViewer instanceof ITextViewerExtension) { ITextViewerExtension e= (ITextViewerExtension) fViewer; e.removeVerifyKeyListener(fInternalListener); } else { text.removeVerifyKeyListener(fInternalListener); } fKeyListenerHooked= false; } } }