Tabnine Logo
IAnnotationHoverExtension2
Code IndexAdd Tabnine to your IDE (free)

How to use
IAnnotationHoverExtension2
in
org.eclipse.jface.text.source

Best Java code snippets using org.eclipse.jface.text.source.IAnnotationHoverExtension2 (Showing top 2 results out of 315)

origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@Override
protected Point computeLocation(Rectangle subjectArea, Point controlSize, Anchor anchor) {
  MouseEvent event= getHoverEvent();
  IAnnotationHover hover= getHover(event);
  boolean allowMouseExit= false;
  if (hover instanceof IAnnotationHoverExtension) {
    IAnnotationHoverExtension extension= (IAnnotationHoverExtension) hover;
    allowMouseExit= extension.canHandleMouseCursor();
  }
  boolean hideOnMouseWheel= true;
  if (hover instanceof IAnnotationHoverExtension2) {
    IAnnotationHoverExtension2 extension= (IAnnotationHoverExtension2) hover;
    hideOnMouseWheel= !extension.canHandleMouseWheel();
  }
  fHideOnMouseWheel= hideOnMouseWheel;
  if (allowMouseExit) {
    fAllowMouseExit= true;
    Control subjectControl= getSubjectControl();
    // return a location that just overlaps the annotation on the bar
    if (anchor == AbstractInformationControlManager.ANCHOR_RIGHT)
      return subjectControl.toDisplay(subjectArea.x - 4, subjectArea.y - 2);
    else if (anchor == AbstractInformationControlManager.ANCHOR_LEFT)
      return subjectControl.toDisplay(subjectArea.x + subjectArea.width - controlSize.x + 4, subjectArea.y - 2);
  }
  fAllowMouseExit= false;
  return super.computeLocation(subjectArea, controlSize, anchor);
}
origin: org.eclipse.platform/org.eclipse.jface.text

@Override
protected Point computeLocation(Rectangle subjectArea, Point controlSize, Anchor anchor) {
  MouseEvent event= getHoverEvent();
  IAnnotationHover hover= getHover(event);
  boolean allowMouseExit= false;
  if (hover instanceof IAnnotationHoverExtension) {
    IAnnotationHoverExtension extension= (IAnnotationHoverExtension) hover;
    allowMouseExit= extension.canHandleMouseCursor();
  }
  boolean hideOnMouseWheel= true;
  if (hover instanceof IAnnotationHoverExtension2) {
    IAnnotationHoverExtension2 extension= (IAnnotationHoverExtension2) hover;
    hideOnMouseWheel= !extension.canHandleMouseWheel();
  }
  fHideOnMouseWheel= hideOnMouseWheel;
  if (allowMouseExit) {
    fAllowMouseExit= true;
    Control subjectControl= getSubjectControl();
    // return a location that just overlaps the annotation on the bar
    if (anchor == AbstractInformationControlManager.ANCHOR_RIGHT)
      return subjectControl.toDisplay(subjectArea.x - 4, subjectArea.y - 2);
    else if (anchor == AbstractInformationControlManager.ANCHOR_LEFT)
      return subjectControl.toDisplay(subjectArea.x + subjectArea.width - controlSize.x + 4, subjectArea.y - 2);
  }
  fAllowMouseExit= false;
  return super.computeLocation(subjectArea, controlSize, anchor);
}
org.eclipse.jface.text.sourceIAnnotationHoverExtension2

Javadoc

Extension interface for org.eclipse.jface.text.source.IAnnotationHover for
  • providing whether the information control can interact with the mouse wheel

Most used methods

  • canHandleMouseWheel
    Returns whether the provided information control can interact with the mouse wheel. I.e. the hover w

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • JFrame (javax.swing)
  • JOptionPane (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now