Examples of overlapsWith()


Examples of fork.lib.math.algebra.elementary.set.continuous.Region.overlapsWith()

public static double getOverlap(ArrayList<Region> bufs, Region tar) throws RegionException{
    double ret=0;
    for( int i=0; i<bufs.size() ; i++ ){
        Region r= bufs.get(i);
        if(r.isInteger() && tar.isInteger()){
            if(r.overlapsWith(tar)){
                ret+= r.getOverlapRegion(tar).getRange()+1;
            }
        }else{
            if(r.overlapsWith(tar)){
                ret+= r.getOverlapRegion(tar).getRange();
View Full Code Here

Examples of fork.lib.math.algebra.elementary.set.continuous.Region.overlapsWith()

        if(r.isInteger() && tar.isInteger()){
            if(r.overlapsWith(tar)){
                ret+= r.getOverlapRegion(tar).getRange()+1;
            }
        }else{
            if(r.overlapsWith(tar)){
                ret+= r.getOverlapRegion(tar).getRange();
            }
        }
    }
    return ret;
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

                    boolean overlaps = false;
                    for ( int k = 0; k < positionList.size(); k++ )
                    {
                        Position pos = positionList.get( k );
                        if ( pos.overlapsWith( tokens[i].getOffset(), tokens[i].getLength() ) )
                        {
                            overlaps = true;
                            break;
                        }
                    }
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

    int count = 0;
    Iterator it = java2jsp.keySet().iterator();
    Position javaRange = null;
    while(it.hasNext()) {
      javaRange = (Position)it.next();
      if(javaRange.overlapsWith(javaOffset, javaLength))
        count++;
      if(count > 1)
        return true;
    }
    return false;
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

    List results = new ArrayList();
    Iterator it = getJava2JspMap().keySet().iterator();
    Position p = null;
    while(it.hasNext()) {
      p = (Position)it.next();
      if(p.overlapsWith(offset, length))
        results.add(p);
    }
    return (Position[])results.toArray(new Position[results.size()]);
  }
 
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

          continue;

        Position p = model.getPosition(a);
        // check if this is an annotation in the region we are
        // concerned with
        if (p.overlapsWith(hoverRegion.getOffset(), hoverRegion.getLength())) {
          String msg = a.getText();
          if ((msg != null) && msg.trim().length() > 0) {
            // it is possible for temporary annotations to
            // duplicate other annotations so make sure not to add
            // dups
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

    int count = 0;
    Iterator it = java2jsp.keySet().iterator();
    Position javaRange = null;
    while(it.hasNext()) {
      javaRange = (Position)it.next();
      if(javaRange.overlapsWith(javaOffset, javaLength))
        count++;
      if(count > 1)
        return true;
    }
    return false;
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

    List results = new ArrayList();
    Iterator it = getJava2JspMap().keySet().iterator();
    Position p = null;
    while(it.hasNext()) {
      p = (Position)it.next();
      if(p.overlapsWith(offset, length))
        results.add(p);
    }
    return (Position[])results.toArray(new Position[results.size()]);
  }
 
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

                    boolean overlaps = false;
                    for ( int k = 0; k < positionList.size(); k++ )
                    {
                        Position pos = ( Position ) positionList.get( k );
                        if ( pos.overlapsWith( tokens[i].getOffset(), tokens[i].getLength() ) )
                        {
                            overlaps = true;
                            break;
                        }
                    }
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

        // remove all affected positions
        while (first < category.length) {
          TypedPosition p= (TypedPosition) category[first];
          if (lastScannedPosition >= p.offset + p.length ||
              (p.overlapsWith(start, length) &&
                 (!d.containsPosition(fPositionCategory, start, length) ||
                  !contentType.equals(p.getType())))) {

            rememberRegion(p.offset, p.length);
            d.removePosition(fPositionCategory, p);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.