Ejemplo n.º 1
0
 /**
  * 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));
   }
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
  }
Ejemplo n.º 4
0
  /*
   * @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;
    }
  }
Ejemplo n.º 5
0
 /*
  * @see org.eclipse.jface.text.source.ISourceViewer#getCurrentAnnotationHover()
  * @since 3.2
  */
 public IAnnotationHover getCurrentAnnotationHover() {
   if (fVerticalRulerHoveringController == null) return null;
   return fVerticalRulerHoveringController.getCurrentAnnotationHover();
 }