Package org.gjt.sp.util

Examples of org.gjt.sp.util.CharIndexedSegment


    // the start and end flags will be wrong with reverse search enabled,
    // but they are only used by the regexp matcher, which doesn't
    // support reverse search yet.
    //
    // REMIND: fix flags when adding reverse regexp search.
    SearchMatcher.Match match = matcher.nextMatch(new CharIndexedSegment(text,reverse),
      start == 0,true,firstTime,reverse);

    if(match != null)
    {
      jEdit.commitTemporary(buffer);
View Full Code Here


      boolean startOfLine = (buffer.getLineStartOffset(
        buffer.getLineOfOffset(offset)) == offset);

      SearchMatcher.Match occur = matcher.nextMatch(
        new CharIndexedSegment(text,false),
        startOfLine,endOfLine,counter == 0,
        false);
      if(occur == null)
        break loop;
View Full Code Here

      if(offset != lastOffset)
        return false;
    } //}}}

    int matchedChars = 1;
    CharIndexedSegment charIndexed = null;
    REMatch match = null;

    //{{{ See if the rule's start or end sequence matches here
    if(!end || (checkRule.action & ParserRule.MARK_FOLLOWING) == 0)
    {
      // the end cannot be a regular expression
      if((checkRule.action & ParserRule.REGEXP) == 0 || end)
      {
        if(end)
        {
          if(context.spanEndSubst != null)
            pattern.array = context.spanEndSubst;
          else
            pattern.array = checkRule.end;
        }
        else
          pattern.array = checkRule.start;
        pattern.offset = 0;
        pattern.count = pattern.array.length;
        matchedChars = pattern.count;

        if(!SyntaxUtilities.regionMatches(context.rules
          .getIgnoreCase(),line,pos,pattern.array))
        {
          return false;
        }
      }
      else
      {
        // note that all regexps start with \A so they only
        // match the start of the string
        int matchStart = pos - line.offset;
        charIndexed = new CharIndexedSegment(line,matchStart);
        match = checkRule.startRegexp.getMatch(
          charIndexed,0,RE.REG_ANCHORINDEX);
        if(match == null)
          return false;
        else if(match.getStartIndex() != 0)
View Full Code Here

            // highlight as DIGIT
            digit = false;
          }
          else
          {
            CharIndexedSegment seg = new CharIndexedSegment(
              line,false);
            int oldCount = line.count;
            int oldOffset = line.offset;
            line.offset = lastOffset;
            line.count = len;
View Full Code Here

TOP

Related Classes of org.gjt.sp.util.CharIndexedSegment

Copyright © 2018 www.massapicom. 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.