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

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

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

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

@Override
public int getBottomIndexEndOffset() {
  try {
    IRegion line= getDocument().getLineInformation(getBottomIndex());
    int bottomEndOffset= line.getOffset() + line.getLength() - 1;
    IRegion coverage= getModelCoverage();
    if (coverage == null)
      return -1;
    int coverageEndOffset=  coverage.getOffset() + coverage.getLength() - 1;
    return Math.min(coverageEndOffset, bottomEndOffset);
  } catch (BadLocationException ex) {
    if (TRACE_ERRORS)
      System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.getBottomIndexEndOffset")); //$NON-NLS-1$
    return getDocument().getLength() - 1;
  }
}
origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public int getBottomIndexEndOffset() {
  try {
    IRegion line= getDocument().getLineInformation(getBottomIndex());
    int bottomEndOffset= line.getOffset() + line.getLength() - 1;
    IRegion coverage= getModelCoverage();
    if (coverage == null)
      return -1;
    int coverageEndOffset=  coverage.getOffset() + coverage.getLength() - 1;
    return Math.min(coverageEndOffset, bottomEndOffset);
  } catch (BadLocationException ex) {
    if (TRACE_ERRORS)
      System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.getBottomIndexEndOffset")); //$NON-NLS-1$
    return getDocument().getLength() - 1;
  }
}
org.eclipse.jface.textTextViewergetBottomIndex

Popular methods of TextViewer

  • getTextWidget
  • getControl
  • doOperation
  • setDocument
  • modelRange2WidgetRange
    Same as #modelRange2WidgetRange(IRegion) just for a org.eclipse.jface.text.Position.
  • getRewriteTarget
  • getSelection
  • modelLine2WidgetLine
    Implements the contract of ITextViewerExtension5#modelLine2WidgetLine(int).
  • 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
  • setSelection,
  • <init>,
  • canDoOperation,
  • getVisibleRegion,
  • handleDispose,
  • invalidateTextPresentation,
  • setTopIndex,
  • _getVisibleRegionOffset,
  • activatePlugins,
  • addPresentation

Popular in Java

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top 12 Jupyter Notebook Extensions
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