/** * After this method has been executed the caller knows that any installed annotation hover has * been installed. */ protected void ensureAnnotationHoverManagerInstalled() { if (fVerticalRuler != null && (fAnnotationHover != null || !isVerticalRulerOnlyShowingAnnotations()) && fVerticalRulerHoveringController == null && fHoverControlCreator != null) { fVerticalRulerHoveringController = new AnnotationBarHoverManager( fVerticalRuler, this, fAnnotationHover, fHoverControlCreator); fVerticalRulerHoveringController.install(fVerticalRuler.getControl()); fVerticalRulerHoveringController .getInternalAccessor() .setInformationControlReplacer(new StickyHoverManager(this)); } }
/* * @see org.eclipse.jface.text.TextViewer#setHoverEnrichMode(org.eclipse.jface.text.ITextViewerExtension8.EnrichMode) * @since 3.4 */ public void setHoverEnrichMode(EnrichMode mode) { super.setHoverEnrichMode(mode); if (fVerticalRulerHoveringController != null) fVerticalRulerHoveringController.getInternalAccessor().setHoverEnrichMode(mode); if (fOverviewRulerHoveringController != null) fOverviewRulerHoveringController.getInternalAccessor().setHoverEnrichMode(mode); }
/* * @see org.eclipse.jface.text.source.ISourceViewerExtension2#unconfigure() * @since 3.0 */ public void unconfigure() { clearRememberedSelection(); if (fPresentationReconciler != null) { fPresentationReconciler.uninstall(); fPresentationReconciler = null; } if (fReconciler != null) { fReconciler.uninstall(); fReconciler = null; } if (fContentAssistant != null) { fContentAssistant.uninstall(); fContentAssistantInstalled = false; fContentAssistant = null; if (fContentAssistantFacade != null) fContentAssistantFacade = null; } if (fQuickAssistAssistant != null) { fQuickAssistAssistant.uninstall(); fQuickAssistAssistantInstalled = false; fQuickAssistAssistant = null; } fContentFormatter = null; if (fInformationPresenter != null) { fInformationPresenter.uninstall(); fInformationPresenter = null; } fAutoIndentStrategies = null; fDoubleClickStrategies = null; fTextHovers = null; fIndentChars = null; fDefaultPrefixChars = null; if (fVerticalRulerHoveringController != null) { fVerticalRulerHoveringController.dispose(); fVerticalRulerHoveringController = null; } if (fOverviewRulerHoveringController != null) { fOverviewRulerHoveringController.dispose(); fOverviewRulerHoveringController = null; } if (fUndoManager != null) { fUndoManager.disconnect(); fUndoManager = null; } setHyperlinkDetectors(null, SWT.NONE); }
/* * @see ISourceViewer#showAnnotations(boolean) */ public void showAnnotations(boolean show) { boolean old = fIsVerticalRulerVisible; fIsVerticalRulerVisible = (fVerticalRuler != null && (show || !isVerticalRulerOnlyShowingAnnotations())); if (old != fIsVerticalRulerVisible && fComposite != null && !fComposite.isDisposed()) fComposite.layout(); if (fIsVerticalRulerVisible && show) ensureAnnotationHoverManagerInstalled(); else if (fVerticalRulerHoveringController != null) { fVerticalRulerHoveringController.dispose(); fVerticalRulerHoveringController = null; } }
/* * @see org.eclipse.jface.text.source.ISourceViewer#getCurrentAnnotationHover() * @since 3.2 */ public IAnnotationHover getCurrentAnnotationHover() { if (fVerticalRulerHoveringController == null) return null; return fVerticalRulerHoveringController.getCurrentAnnotationHover(); }