Package org.eclipse.jface.text

Examples of org.eclipse.jface.text.FindReplaceDocumentAdapter.find()


          fContent.add(new Segment(attributeLabel, p, makeIconString("attribute", sig.group(1))));
        }
        region = frAdapter.find(offset+length, ATTRIBUTE_REGEX, true, false, false, true);
      }
      // do the virtual attributes
      region = frAdapter.find(0, VIRTUAL_ATTRIBUTE_REGEX, true, false, false, true);
      attributeLabel = null;
      while (region != null){
        int offset = region.getOffset();
        int length = region.getLength();
        Position p = new Position(offset, length);
View Full Code Here


        Matcher sig = virtualAttributePattern.matcher(attributeLabel);
        if (sig.find()){
          attributeLabel = sig.group(2);
          fContent.add(new Segment(attributeLabel, p, makeIconString("virtual", sig.group(1))));
        }
        region = frAdapter.find(offset+length, VIRTUAL_ATTRIBUTE_REGEX, true, false, false, true);
      }
      // do the window attributes
      region = frAdapter.find(0, WINDOW_REGEX, true, false, false, true);
      attributeLabel = null;
      while (region != null){
View Full Code Here

          fContent.add(new Segment(attributeLabel, p, makeIconString("virtual", sig.group(1))));
        }
        region = frAdapter.find(offset+length, VIRTUAL_ATTRIBUTE_REGEX, true, false, false, true);
      }
      // do the window attributes
      region = frAdapter.find(0, WINDOW_REGEX, true, false, false, true);
      attributeLabel = null;
      while (region != null){
        int offset = region.getOffset();
        int length = region.getLength();
        Position p = new Position(offset, length);
View Full Code Here

        Matcher sig = windowAttributePattern.matcher(attributeLabel);
        if (sig.find()){
          attributeLabel = sig.group(1);
          fContent.add(new Segment(attributeLabel, p, "icons/window_attribute.gif"));
        }
        region = frAdapter.find(offset+length, WINDOW_REGEX, true, false, false, true);
      }
      // do the class constants
      region = frAdapter.find(0, CONSTANT_REGEX, true, false, false, true);
      attributeLabel = null;
      while (region != null){
View Full Code Here

          fContent.add(new Segment(attributeLabel, p, "icons/window_attribute.gif"));
        }
        region = frAdapter.find(offset+length, WINDOW_REGEX, true, false, false, true);
      }
      // do the class constants
      region = frAdapter.find(0, CONSTANT_REGEX, true, false, false, true);
      attributeLabel = null;
      while (region != null){
        int offset = region.getOffset();
        int length = region.getLength();
        Position p = new Position(offset, length);
View Full Code Here

        Matcher sig = constantPattern.matcher(attributeLabel);
        if (sig.find()){
          attributeLabel = sig.group(2);
          fContent.add(new Segment(attributeLabel, p, makeIconString("constant", sig.group(1))));
        }
        region = frAdapter.find(offset+length, CONSTANT_REGEX, true, false, false, true);
      }
      // do the method implementations
      region = frAdapter.find(0, CEX_SIGNATURE_REGEX, true, false, false, true);
      String methodSignature = null;
      while (region != null){
View Full Code Here

          fContent.add(new Segment(attributeLabel, p, makeIconString("constant", sig.group(1))));
        }
        region = frAdapter.find(offset+length, CONSTANT_REGEX, true, false, false, true);
      }
      // do the method implementations
      region = frAdapter.find(0, CEX_SIGNATURE_REGEX, true, false, false, true);
      String methodSignature = null;
      while (region != null){
        int offset = region.getOffset();
        int length = region.getLength();
        Position p = new Position(offset, length);
View Full Code Here

        Matcher sig = cexSignaturePattern.matcher(methodSignature);
        if (sig.find()){
          methodSignature = sig.group(1);
          fContent.add(new Segment(makeLabel(methodSignature), p, "icons/private_method.gif"));
        }
        region = frAdapter.find(offset+length, CEX_SIGNATURE_REGEX, true, false, false, true);
      }
//      // do the event handlers
//      region = frAdapter.find(0, ToolEventHandler.CEX_SIGNATURE_REGEX, true, false, false, true);
//      String ehSignature = null;
//      while (region != null){
View Full Code Here

    targetSignature = ((ToolComponent)getParent()).getToolName() + "." + targetSignature;
    String startRegionRegex = "method\\s+" + targetSignature + "\\s*begin";
    String endRegionRegex = "(?s)(.+?)(?-s)end method;";
    try {
      FindReplaceDocumentAdapter frAdapter = new FindReplaceDocumentAdapter(document);
      IRegion startRegion = frAdapter.find(0, startRegionRegex, true, false, false, true);
     
      if (startRegion == null)
        return null; // no method implementation
     
      IRegion endRegion = frAdapter.find(startRegion.getOffset()+startRegion.getLength()+"begin".length(), endRegionRegex, true, false, false, true);
View Full Code Here

      IRegion startRegion = frAdapter.find(0, startRegionRegex, true, false, false, true);
     
      if (startRegion == null)
        return null; // no method implementation
     
      IRegion endRegion = frAdapter.find(startRegion.getOffset()+startRegion.getLength()+"begin".length(), endRegionRegex, true, false, false, true);
      IRegion sourceRegion = null;
      if (includeSignature){
        sourceRegion = new Region(startRegion.getOffset(), "begin".length()+startRegion.getLength()+endRegion.getLength());
      } else {
        sourceRegion = new Region(endRegion.getOffset(), endRegion.getLength()-"end method;".length());
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.