Example #1
0
 /**
  * After this method has been executed the caller knows that any installed overview hover has been
  * installed.
  */
 protected void ensureOverviewHoverManagerInstalled() {
   if (fOverviewRuler != null
       && fOverviewRulerAnnotationHover != null
       && fOverviewRulerHoveringController == null
       && fHoverControlCreator != null) {
     fOverviewRulerHoveringController =
         new OverviewRulerHoverManager(
             fOverviewRuler, this, fOverviewRulerAnnotationHover, fHoverControlCreator);
     fOverviewRulerHoveringController.install(fOverviewRuler.getControl());
     fOverviewRulerHoveringController
         .getInternalAccessor()
         .setInformationControlReplacer(new StickyHoverManager(this));
   }
 }
Example #2
0
 /*
  * @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);
 }
Example #3
0
  /*
   * @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);
  }
Example #4
0
 /*
  * @see org.eclipse.jface.text.source.ISourceViewerExtension#showAnnotationsOverview(boolean)
  * @since 2.1
  */
 public void showAnnotationsOverview(boolean show) {
   boolean old = fIsOverviewRulerVisible;
   fIsOverviewRulerVisible = (show && fOverviewRuler != null);
   if (old != fIsOverviewRulerVisible) {
     if (fComposite != null && !fComposite.isDisposed()) fComposite.layout();
     if (fIsOverviewRulerVisible) {
       ensureOverviewHoverManagerInstalled();
     } else if (fOverviewRulerHoveringController != null) {
       fOverviewRulerHoveringController.dispose();
       fOverviewRulerHoveringController = null;
     }
   }
 }