Codota Logo
LineRange
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain LineRange
private void myMethod () {
LineRange l =
  • Codota IconILineRange iLineRange;ILineRange iLineRange2;new LineRange(iLineRange.getStartLine() + 1, iLineRange2.getNumberOfLines())
  • Codota IconILineRange iLineRange;ILineRange iLineRange2;new LineRange(iLineRange.getStartLine() - 1, iLineRange2.getNumberOfLines())
  • Smart code suggestions by Codota
}
origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public ILineRange getHoverLineRange(ISourceViewer viewer, int lineNumber) {
  RevisionRange range= getRange(lineNumber);
  return range == null ? null : new LineRange(lineNumber, 1);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@Override
public ILineRange getHoverLineRange(ISourceViewer viewer, int lineNumber) {
  RevisionRange range= getRange(lineNumber);
  return range == null ? null : new LineRange(lineNumber, 1);
}
origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public ILineRange getHoverLineRange(ISourceViewer viewer, int lineNumber) {
  return new LineRange(lineNumber, 1);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public ILineRange getHoverLineRange(ISourceViewer viewer, int lineNumber) {
  return new LineRange(lineNumber, 1);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@Override
public ILineRange getHoverLineRange(ISourceViewer viewer, int lineNumber) {
  return new LineRange(lineNumber, 1);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
public ILineRange getHoverLineRange(ISourceViewer viewer, int lineNumber) {
  return new LineRange(lineNumber, 1);
}
origin: org.eclipse/org.eclipse.jdt.ui

public ILineRange getHoverLineRange(ISourceViewer viewer, int lineNumber) {
  return new LineRange(lineNumber, 1);
}
origin: org.eclipse.egit/ui

/**
 * Register revision
 *
 * @return this revision
 */
public BlameRevision register() {
  addRange(new LineRange(start, lines));
  return this;
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Returns the line coverage of the adjusted ranges, an empty range if the coverage is empty.
 *
 * @return the line coverage of the adjusted ranges
 */
public ILineRange getAdjustedCoverage() {
  if (fAdjusted.isEmpty())
    return new LineRange(fLines.getStartLine(), 0);
  Range first= fAdjusted.get(0);
  Range last= fAdjusted.get(fAdjusted.size() - 1);
  return Range.createAbsolute(first.start(), last.end());
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Returns the line coverage of the adjusted ranges, an empty range if the coverage is empty.
 *
 * @return the line coverage of the adjusted ranges
 */
public ILineRange getAdjustedCoverage() {
  if (fAdjusted.isEmpty())
    return new LineRange(fLines.getStartLine(), 0);
  Range first= fAdjusted.get(0);
  Range last= fAdjusted.get(fAdjusted.size() - 1);
  return Range.createAbsolute(first.start(), last.end());
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Computes the widget lines that need repainting given the clipping region of a paint event.
 *
 * @param event the paint event
 * @return the lines in widget coordinates that need repainting
 */
private ILineRange computeDirtyWidgetLines(PaintEvent event) {
  int firstLine= fStyledText.getLineIndex(event.y);
  int lastLine= fStyledText.getLineIndex(event.y + event.height - 1);
  return new LineRange(firstLine, lastLine - firstLine + 1);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Computes the widget lines that need repainting given the clipping region of a paint event.
 *
 * @param event the paint event
 * @return the lines in widget coordinates that need repainting
 */
private ILineRange computeDirtyWidgetLines(PaintEvent event) {
  int firstLine= fStyledText.getLineIndex(event.y);
  int lastLine= fStyledText.getLineIndex(event.y + event.height - 1);
  return new LineRange(firstLine, lastLine - firstLine + 1);
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Returns the range of lines that is visible in the viewer, including any partially visible
 * lines.
 *
 * @param viewer the viewer
 * @return the range of lines that is visible in the viewer, <code>null</code> if no lines are
 *         visible
 */
public static ILineRange getVisibleModelLines(ITextViewer viewer) {
  int top= getPartialTopIndex(viewer);
  int bottom= getPartialBottomIndex(viewer);
  if (top == -1 || bottom == -1)
    return null;
  return new LineRange(top, bottom - top + 1);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Returns the range of lines that is visible in the viewer, including any partially visible
 * lines.
 *
 * @param viewer the viewer
 * @return the range of lines that is visible in the viewer, <code>null</code> if no lines are
 *         visible
 */
public static ILineRange getVisibleModelLines(ITextViewer viewer) {
  int top= getPartialTopIndex(viewer);
  int bottom= getPartialBottomIndex(viewer);
  if (top == -1 || bottom == -1)
    return null;
  return new LineRange(top, bottom - top + 1);
}
origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public ILineRange getHoverLineRange(ISourceViewer viewer, int lineNumber) {
  IDocument document= viewer.getDocument();
  if (document != null) {
    Point range= computeLineRange(viewer, lineNumber, 0, Math.max(0, document.getNumberOfLines() - 1));
    if (range.x != -1 && range.y != -1)
      return new LineRange(range.x, range.y - range.x + 1);
  }
  return null;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@Override
public ILineRange getHoverLineRange(ISourceViewer viewer, int lineNumber) {
  IDocument document= viewer.getDocument();
  if (document != null) {
    Point range= computeLineRange(viewer, lineNumber, 0, Math.max(0, document.getNumberOfLines() - 1));
    if (range.x != -1 && range.y != -1)
      return new LineRange(range.x, range.y - range.x + 1);
  }
  return null;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private ILineRange getLineRange(IDocument document, ITextSelection selection) throws BadLocationException {
  final int offset= selection.getOffset();
  int startLine= document.getLineOfOffset(offset);
  int endOffset= offset + selection.getLength();
  int endLine= document.getLineOfOffset(endOffset);
  final int nLines= endLine - startLine + 1;
  return new LineRange(startLine, nLines);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private ILineRange getLineRange(IDocument document, ITextSelection selection) throws BadLocationException {
  final int offset= selection.getOffset();
  int startLine= document.getLineOfOffset(offset);
  int endOffset= offset + selection.getLength();
  int endLine= document.getLineOfOffset(endOffset);
  final int nLines= endLine - startLine + 1;
  return new LineRange(startLine, nLines);
}
origin: org.eclipse/org.eclipse.jdt.ui

private ILineRange getLineRange(IDocument document, ITextSelection selection) throws BadLocationException {
  final int offset= selection.getOffset();
  int startLine= document.getLineOfOffset(offset);
  int endOffset= offset + selection.getLength();
  int endLine= document.getLineOfOffset(endOffset);
  final int nLines= endLine - startLine + 1;
  return new LineRange(startLine, nLines);
}

origin: org.eclipse/org.eclipse.jdt.ui

  private void indent(IDocument document) throws BadLocationException, MalformedTreeException {
    // first line
    int offset= document.getLineOffset(0);
    document.replace(offset, 0, CodeFormatterUtil.createIndentString(fInitialIndentLevel, fProject));
    
    // following lines
    int lineCount= document.getNumberOfLines();
    IndentUtil.indentLines(document, new LineRange(1, lineCount - 1), fProject, null);
  }
}
org.eclipse.jface.text.sourceLineRange

Javadoc

Default implementation of ILineRange.

Most used methods

  • <init>
    Creates a new line range with the given specification.

Popular in Java

  • Finding current android device location
  • compareTo (BigDecimal)
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now