Tabnine Logo
org.eclipse.jface.internal.text.revisions
Code IndexAdd Tabnine to your IDE (free)

How to use org.eclipse.jface.internal.text.revisions

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

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

/**
 * Handles the selection of a revision and informs listeners.
 *
 * @param revision the selected revision, <code>null</code> for none
 */
void handleRevisionSelected(Revision revision) {
  fSelectedRevision= revision;
  fRevisionSelectionProvider.revisionSelected(revision);
  if (isConnected())
    updateOverviewAnnotations();
  postRedraw();
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Moves the start offset to <code>start</code>, keeping {@link #end()} constant.
 *
 * @param start the new start, must be &gt;= 0 and &lt; {@link #end()}
 * @throws LineIndexOutOfBoundsException if <code>start</code> &lt; 0 or &gt;= {@link #end()}
 */
public void setStart(int start) throws LineIndexOutOfBoundsException {
  int end= end();
  if (!(start >= 0 && start < end))
    throw new LineIndexOutOfBoundsException("Cannot set a negative start: " + start); //$NON-NLS-1$
  moveTo(start);
  setEnd(end);
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Returns the first line after this range. Equivalent to {@linkplain #start() start} + {@linkplain #length() length}.
 *
 * @return the first line after this range
 */
public int end() {
  return start() + length();
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Creates a new range equal to the passed line range.
 *
 * @param range the range to copy
 * @return a <code>Range</code> equal to <code>range</code>
 */
public static Range copy(Range range) {
  return createRelative(range.start(), range.length());
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Resizes the range by <code>delta</code> lines, keeping {@link #start()} constant.
 *
 * @param delta the number of lines to resize the range
 * @throws LineIndexOutOfBoundsException if <code>-delta</code> &gt;= {@link #length()}
 */
public void resizeBy(int delta) throws LineIndexOutOfBoundsException {
  setLength(length() + delta);
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Sets the length of this range, keeping {@link #end()} constant.
 *
 * @param length the new length, must be &gt; 0 and &lt;= {@link #end()}
 * @throws LineIndexOutOfBoundsException if <code>length</code> &lt;= 0
 */
public void setLengthAndMove(int length) throws LineIndexOutOfBoundsException {
  setStart(end() - length);
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Disposes of the painter's resources.
 */
private void handleDispose() {
  updateFocusLine(-1);
  if (fLineDiffer != null) {
    ((IAnnotationModel) fLineDiffer).removeAnnotationModelListener(fAnnotationListener);
    fLineDiffer= null;
  }
  fRevisionSelectionProvider.uninstall();
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Creates a new range with the given start offset and length.
 *
 * @param start the first line of the new range, must be &gt;= 0
 * @param length the number of lines included in the new range, must be &gt; 0
 * @return a <code>Range</code> with the given start and length
 * @throws LineIndexOutOfBoundsException if the parameters violate the invariant of
 *         {@link Range}
 */
public static Range createRelative(int start, int length) throws LineIndexOutOfBoundsException {
  return new Range(start, length);
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Returns <code>true</code> if the receiver can provide a hover for a certain document line.
 *
 * @param activeLine the document line of interest
 * @return <code>true</code> if the receiver can provide a hover
 */
public boolean hasHover(int activeLine) {
  return fViewer instanceof ISourceViewer && fHover.getHoverLineRange((ISourceViewer) fViewer, activeLine) != null;
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Returns <code>true</code> if the ruler is showing revision information, <code>false</code>
 * otherwise
 *
 * @return <code>true</code> if revision information is shown, <code>false</code> otherwise
 * @since 3.3
 */
public boolean isShowingRevisionInformation() {
  return fRevisionPainter.hasInformation();
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Private protocol used by {@link RevisionPainter} to signal selection of a revision.
 *
 * @param revision the selected revision, or <code>null</code> for none
 */
void revisionSelected(Revision revision) {
  setSelectedRevision(revision);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

  @Override
  public Object clone() {
    return Range.copy(this);
  }
}
origin: org.eclipse.platform/org.eclipse.jface.text

  /**
   * Returns the revision selection provider.
   *
   * @return the revision selection provider
   * @since 3.2
   */
  public ISelectionProvider getRevisionSelectionProvider() {
    return fRevisionPainter.getRevisionSelectionProvider();
  }
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Sets the length of this range, keeping {@link #start()} constant.
 *
 * @param length the new length, must be &gt; 0
 * @throws LineIndexOutOfBoundsException if <code>length</code> &lt;= 0
 */
public void setLength(int length) throws LineIndexOutOfBoundsException {
  if (!(length > 0))
    throw new LineIndexOutOfBoundsException("Cannot set length <= 0: " + length); //$NON-NLS-1$
  fLength= length;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Updates the focus line with a new line.
 *
 * @param line the new focus line, -1 for no focus
 */
private void updateFocusLine(int line) {
  if (fFocusLine != line)
    onFocusLineChanged(fFocusLine, line);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Handles the selection of a revision and informs listeners.
 * 
 * @param revision the selected revision, <code>null</code> for none
 */
void handleRevisionSelected(Revision revision) {
  fSelectedRevision= revision;
  fRevisionSelectionProvider.revisionSelected(revision);
  if (isConnected())
    updateOverviewAnnotations();
  postRedraw();
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Creates a new range equal to the passed line range.
 *
 * @param range the range to copy
 * @return a <code>Range</code> equal to <code>range</code>
 */
public static Range copy(Range range) {
  return createRelative(range.start(), range.length());
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Returns the first line after this range. Equivalent to {@linkplain #start() start} + {@linkplain #length() length}.
 *
 * @return the first line after this range
 */
public int end() {
  return start() + length();
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Resizes the range by <code>delta</code> lines, keeping {@link #start()} constant.
 *
 * @param delta the number of lines to resize the range
 * @throws LineIndexOutOfBoundsException if <code>-delta</code> &gt;= {@link #length()}
 */
public void resizeBy(int delta) throws LineIndexOutOfBoundsException {
  setLength(length() + delta);
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Creates a new range with the given start and end offsets.
 *
 * @param start the first line of the new range, must be &gt;= 0
 * @param end the first line not in the range any more (exclusive), must be &gt; <code>start</code>
 * @return a <code>Range</code> with the given start and end offsets
 * @throws LineIndexOutOfBoundsException if the parameters violate the invariant of
 *         {@link Range}
 */
public static Range createAbsolute(int start, int end) {
  return new Range(start, end - start);
}
org.eclipse.jface.internal.text.revisions

Most used classes

  • HunkComputer
    Computes the diff hunks from an ILineDiffer.
  • ChangeRegion
    A change region describes a contiguous range of lines that was changed in the same revision of a doc
  • Colors
    Utility for color operations.
  • Hunk
    A hunk describes a contiguous range of changed, added or deleted lines. Hunks are separated by one o
  • LineIndexOutOfBoundsException
    Thrown to indicate that an attempt to create or modify a Range failed because it would have resulted
  • RevisionPainter$ColorTool,
  • RevisionPainter$HoverInformationControlCreator$1,
  • RevisionPainter$HoverInformationControlCreator,
  • RevisionPainter$MouseHandler,
  • RevisionPainter$RevisionAnnotation,
  • RevisionPainter$RevisionHover,
  • RevisionPainter,
  • RevisionSelectionProvider$PostSelectionListener,
  • RevisionSelectionProvider
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