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; } } }
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; } } }
/** *Hides the context information popup. */ private void hideContextInfoPopup() { if (Helper2.okToUse(fContextInfoPopup)) { int size= fContextFrameStack.size(); if (size > 0) { fContextFrameStack.pop(); -- size; } if (size > 0) { ContextFrame current= fContextFrameStack.peek(); internalShowContextFrame(current, false); } else { fContentAssistant.removeContentAssistListener(this, ContentAssistant2.CONTEXT_INFO_POPUP); fContextInfoPopup.setVisible(false); fContextInfoPopup.dispose(); fContextInfoPopup= null; if (fTextPresentation != null) { fTextPresentation.clear(); fTextPresentation= null; } } } if (fContextInfoPopup == null) fContentAssistant.contextInformationClosed(); }
/** *Hides the context information popup. */ private void hideContextInfoPopup() { if (Helper2.okToUse(fContextInfoPopup)) { int size= fContextFrameStack.size(); if (size > 0) { fContextFrameStack.pop(); -- size; } if (size > 0) { ContextFrame current= fContextFrameStack.peek(); internalShowContextFrame(current, false); } else { fContentAssistant.removeContentAssistListener(this, ContentAssistant2.CONTEXT_INFO_POPUP); fContextInfoPopup.setVisible(false); fContextInfoPopup.dispose(); fContextInfoPopup= null; if (fTextPresentation != null) { fTextPresentation.clear(); fTextPresentation= null; } } } if (fContextInfoPopup == null) 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(); }
/** * 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(); }
/** * Hides this popup. */ public void hide() { unregister(); if (fViewer instanceof IEditingSupportRegistry) { IEditingSupportRegistry registry= (IEditingSupportRegistry) fViewer; registry.unregister(fFocusEditingSupport); } if (Helper2.okToUse(fProposalShell)) { fContentAssistant.removeContentAssistListener(this, ContentAssistant2.PROPOSAL_SELECTOR); fPopupCloser.uninstall(); // see bug 47511: setVisible may run the event loop on GTK // and trigger a rentrant call - have to make sure we don't // dispose another shell that was already brought up in a // reentrant call when calling setVisible() Shell tempShell= fProposalShell; fProposalShell= null; tempShell.setVisible(false); tempShell.dispose(); } }
/** * Hides this popup. */ public void hide() { unregister(); if (fViewer instanceof IEditingSupportRegistry) { IEditingSupportRegistry registry= (IEditingSupportRegistry) fViewer; registry.unregister(fFocusEditingSupport); } if (Helper2.okToUse(fProposalShell)) { fContentAssistant.removeContentAssistListener(this, ContentAssistant2.PROPOSAL_SELECTOR); fPopupCloser.uninstall(); // see bug 47511: setVisible may run the event loop on GTK // and trigger a rentrant call - have to make sure we don't // dispose another shell that was already brought up in a // reentrant call when calling setVisible() Shell tempShell= fProposalShell; fProposalShell= null; tempShell.setVisible(false); tempShell.dispose(); } }