Package org.eclipse.jface.text

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


        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

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.