Tabnine Logo
TextViewer.modelLine2WidgetLine
Code IndexAdd Tabnine to your IDE (free)

How to use
modelLine2WidgetLine
method
in
org.eclipse.jface.text.TextViewer

Best Java code snippets using org.eclipse.jface.text.TextViewer.modelLine2WidgetLine (Showing top 7 results out of 315)

origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public void setTopIndex(int index) {
  if (fTextWidget != null) {
    int widgetLine= modelLine2WidgetLine(index);
    if (widgetLine == -1)
      widgetLine= getClosestWidgetLineForModelLine(index);
    if (widgetLine > -1) {
      fTextWidget.setTopIndex(widgetLine);
        updateViewportListeners(INTERNAL);
    }
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@Override
public void setTopIndex(int index) {
  if (fTextWidget != null) {
    int widgetLine= modelLine2WidgetLine(index);
    if (widgetLine == -1)
      widgetLine= getClosestWidgetLineForModelLine(index);
    if (widgetLine > -1) {
      fTextWidget.setTopIndex(widgetLine);
        updateViewportListeners(INTERNAL);
    }
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

protected void setLastRulerMouseLocation(ISourceViewer viewer, int line) {
  // set last mouse activity in order to get the correct context menu
  if (fCompositeRuler != null) {
    StyledText st= viewer.getTextWidget();
    if (st != null && !st.isDisposed()) {
      if (viewer instanceof ITextViewerExtension5) {
        int widgetLine= ((ITextViewerExtension5)viewer).modelLine2WidgetLine(line);
        Point loc= st.getLocationAtOffset(st.getOffsetAtLine(widgetLine));
        fCompositeRuler.setLocationOfLastMouseButtonActivity(0, loc.y);
      } else if (viewer instanceof TextViewer) {
        // TODO remove once TextViewer implements the extension
        int widgetLine= ((TextViewer)viewer).modelLine2WidgetLine(line);
        Point loc= st.getLocationAtOffset(st.getOffsetAtLine(widgetLine));
        fCompositeRuler.setLocationOfLastMouseButtonActivity(0, loc.y);
      }
    }
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

protected void setLastRulerMouseLocation(ISourceViewer viewer, int line) {
  // set last mouse activity in order to get the correct context menu
  if (fCompositeRuler != null) {
    StyledText st= viewer.getTextWidget();
    if (st != null && !st.isDisposed()) {
      if (viewer instanceof ITextViewerExtension5) {
        int widgetLine= ((ITextViewerExtension5)viewer).modelLine2WidgetLine(line);
        Point loc= st.getLocationAtOffset(st.getOffsetAtLine(widgetLine));
        fCompositeRuler.setLocationOfLastMouseButtonActivity(0, loc.y);
      } else if (viewer instanceof TextViewer) {
        // TODO remove once TextViewer implements the extension
        int widgetLine= ((TextViewer)viewer).modelLine2WidgetLine(line);
        Point loc= st.getLocationAtOffset(st.getOffsetAtLine(widgetLine));
        fCompositeRuler.setLocationOfLastMouseButtonActivity(0, loc.y);
      }
    }
  }
}
origin: org.eclipse/org.eclipse.jdt.ui

protected void setLastRulerMouseLocation(ISourceViewer viewer, int line) {
  // set last mouse activity in order to get the correct context menu
  if (fCompositeRuler != null) {
    StyledText st= viewer.getTextWidget();
    if (st != null && !st.isDisposed()) {
      if (viewer instanceof ITextViewerExtension5) {
        int widgetLine= ((ITextViewerExtension5)viewer).modelLine2WidgetLine(line);
        Point loc= st.getLocationAtOffset(st.getOffsetAtLine(widgetLine));
        fCompositeRuler.setLocationOfLastMouseButtonActivity(0, loc.y);
      } else if (viewer instanceof TextViewer) {
        // TODO remove once TextViewer implements the extension
        int widgetLine= ((TextViewer)viewer).modelLine2WidgetLine(line);
        Point loc= st.getLocationAtOffset(st.getOffsetAtLine(widgetLine));
        fCompositeRuler.setLocationOfLastMouseButtonActivity(0, loc.y);
      }
    }
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

int stableWidgetLine= modelLine2WidgetLine(stableLine);
fStablePixel= getTextWidget().getLinePixel(stableWidgetLine);
IRegion stableLineInfo= fUpdaterDocument.getLineInformation(stableLine);
origin: org.eclipse.platform/org.eclipse.jface.text

int stableWidgetLine= modelLine2WidgetLine(stableLine);
fStablePixel= getTextWidget().getLinePixel(stableWidgetLine);
IRegion stableLineInfo= fUpdaterDocument.getLineInformation(stableLine);
org.eclipse.jface.textTextViewermodelLine2WidgetLine

Javadoc

Implements the contract of ITextViewerExtension5#modelLine2WidgetLine(int).

Popular methods of TextViewer

  • getTextWidget
  • getControl
  • doOperation
  • setDocument
  • modelRange2WidgetRange
    Same as #modelRange2WidgetRange(IRegion) just for a org.eclipse.jface.text.Position.
  • getRewriteTarget
  • getSelection
  • getDocument
  • setSelectedRange
  • setSelection
  • <init>
    Create a new text viewer with the given SWT style bits. The viewer is ready to use but does not have
  • canDoOperation
  • <init>,
  • canDoOperation,
  • getVisibleRegion,
  • handleDispose,
  • invalidateTextPresentation,
  • setTopIndex,
  • _getVisibleRegionOffset,
  • activatePlugins,
  • addPresentation

Popular in Java

  • Making http post requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • getApplicationContext (Context)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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