Examples of computePartitioning()


Examples of org.eclipse.jface.text.IDocument.computePartitioning()

    String className = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
        .getActivePage().getActiveEditor().getSite().getId().toLowerCase();
   
    // try to get current partition (true Eclipse)
    try {
      ITypedRegion[] regions = doc.computePartitioning(editor.getCaretPos(), 0);
      if (regions.length > 0) {
        result = guessSyntaxFromString(regions[0].getType());
      }
    } catch (Exception e) {  }
   
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.computePartitioning()

        IDocument document = getDocument();
        if (document == null) {
            return null;
        }
        IRegion line = document.getLineInformationOfOffset(lineOffset);
        ITypedRegion[] linePartitioning = document.computePartitioning(lineOffset, line.getLength());

        /*
         * List segmentation= new ArrayList(); for (int i= 0; i < linePartitioning.length; i++) { // if (IJavaPartitions.JAVA_STRING.equals(linePartitioning[i].getType())) //
         * segmentation.add(linePartitioning[i]); }
         *
 
View Full Code Here

Examples of org.eclipse.jface.text.IDocumentPartitioner.computePartitioning()

  private void foldPartitions(HashMap markerMap, String partitionType, boolean autoCollapse, int minLines) {
    // This will hold the regions that should have folding markers.
    ArrayList regions = new ArrayList();

    IDocumentPartitioner partitioner = doc.getDocumentPartitioner();
    ITypedRegion[] regionArray = partitioner.computePartitioning(0, doc.getLength());

    for (int i = 0; i < regionArray.length; i++) {
      ITypedRegion region = regionArray[i];
      if (region.getType() == partitionType) {
        // Position position= new Position(region.getOffset(),
View Full Code Here

Examples of org.eclipse.jface.text.rules.FastPartitioner.computePartitioning()

        fastPartitioner.connect(doc);

        TextPresentation textPresentation = new TextPresentation();
        PyCodeScanner scanner = new PyCodeScanner(colorCache);
        try {
            ITypedRegion[] computePartitioning = fastPartitioner.computePartitioning(0, doc.getLength());
            for (ITypedRegion region : computePartitioning) {
                String type = region.getType();
                int offset = region.getOffset();
                int len = region.getLength();
                if (IPythonPartitions.PY_DEFAULT.equals(type) || type == null) {
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.