org.eclipse.xtext.ui.editor.model
Class Regions

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.model.Regions

public class Regions
extends java.lang.Object

Author:
Sven Efftinge - Initial contribution and API

Constructor Summary
Regions()
           
 
Method Summary
static com.google.common.base.Predicate<? super org.eclipse.jface.text.IRegion> overlaps(int offset, int length)
          Returns a predicate which returns true if the passed range and the region passed to the predicate overlap.
static com.google.common.base.Predicate<? super org.eclipse.jface.text.IRegion> overlaps(org.eclipse.jface.text.IRegion region)
          Returns a predicate which returns true if the passed region and the one passed to the predicate overlap.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Regions

public Regions()
Method Detail

overlaps

public static com.google.common.base.Predicate<? super org.eclipse.jface.text.IRegion> overlaps(int offset,
                                                                                                int length)
Returns a predicate which returns true if the passed range and the region passed to the predicate overlap. Returns false if one of the arguments is null. Based on TextUtilities.overlaps(IRegion, IRegion)

Parameters:
the - region
Returns:
the predicate

overlaps

public static com.google.common.base.Predicate<? super org.eclipse.jface.text.IRegion> overlaps(org.eclipse.jface.text.IRegion region)
Returns a predicate which returns true if the passed region and the one passed to the predicate overlap. Returns false if one of the arguments is null. Based on TextUtilities.overlaps(IRegion, IRegion)

Parameters:
the - region
Returns:
the predicate