Codota Logo
AnnotationModel$AnnotationsInterator.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.eclipse.jface.text.source.AnnotationModel$AnnotationsInterator
constructor

Best Java code snippets using org.eclipse.jface.text.source.AnnotationModel$AnnotationsInterator.<init> (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.text

/**
 * Returns an iterator as specified in {@link IAnnotationModelExtension2#getAnnotationIterator(int, int, boolean, boolean)}
 *
 * @param offset region start
 * @param length region length
 * @param canStartBefore position can start before region
 * @param canEndAfter position can end after region
 * @return an iterator to iterate over annotations in region
 * @see IAnnotationModelExtension2#getAnnotationIterator(int, int, boolean, boolean)
 * @since 3.4
 */
private Iterator<Annotation> getRegionAnnotationIterator(int offset, int length, boolean canStartBefore, boolean canEndAfter) {
  if (!(fDocument instanceof AbstractDocument))
    return new RegionIterator(getAnnotationIterator(true), this, offset, length, canStartBefore, canEndAfter);
  AbstractDocument document= (AbstractDocument) fDocument;
  cleanup(true);
  try {
    Position[] positions= document.getPositions(IDocument.DEFAULT_CATEGORY, offset, length, canStartBefore, canEndAfter);
    return new AnnotationsInterator(positions, fPositions);
  } catch (BadPositionCategoryException e) {
    // can happen if e.g. the document doesn't contain such a category, or when removed in a different thread
    return Collections.<Annotation>emptyList().iterator();
  }
}
origin: org.eclipse.platform/org.eclipse.text

/**
 * Returns an iterator as specified in {@link IAnnotationModelExtension2#getAnnotationIterator(int, int, boolean, boolean)}
 *
 * @param offset region start
 * @param length region length
 * @param canStartBefore position can start before region
 * @param canEndAfter position can end after region
 * @return an iterator to iterate over annotations in region
 * @see IAnnotationModelExtension2#getAnnotationIterator(int, int, boolean, boolean)
 * @since 3.4
 */
private Iterator<Annotation> getRegionAnnotationIterator(int offset, int length, boolean canStartBefore, boolean canEndAfter) {
  if (!(fDocument instanceof AbstractDocument))
    return new RegionIterator(getAnnotationIterator(true), this, offset, length, canStartBefore, canEndAfter);
  AbstractDocument document= (AbstractDocument) fDocument;
  cleanup(true);
  try {
    Position[] positions= document.getPositions(IDocument.DEFAULT_CATEGORY, offset, length, canStartBefore, canEndAfter);
    return new AnnotationsInterator(positions, fPositions);
  } catch (BadPositionCategoryException e) {
    // can happen if e.g. the document doesn't contain such a category, or when removed in a different thread
    return Collections.<Annotation>emptyList().iterator();
  }
}
org.eclipse.jface.text.sourceAnnotationModel$AnnotationsInterator<init>

Popular methods of AnnotationModel$AnnotationsInterator

  • findNext

Popular in Java

  • Making http requests using okhttp
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
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