Package org.eclipse.php.internal.core.format

Examples of org.eclipse.php.internal.core.format.PHPHeuristicScanner


  private int searchForClosingPeer(int offset, char openingPeer,
      char closingPeer, IDocument document) throws BadLocationException {
    boolean useGenericsHeuristic = openingPeer == '<';
    if (useGenericsHeuristic && !fHighlightAngularBrackets)
      return -1;
    PHPHeuristicScanner scanner = PHPHeuristicScanner
        .createHeuristicScanner(document, offset, false);
    if (useGenericsHeuristic
        && !isTypeParameterBracket(offset, document, scanner))
      return -1;

    return scanner.findClosingPeer(offset + 1, openingPeer, closingPeer);
  }
View Full Code Here


      char closingPeer, IDocument document) throws BadLocationException {
    boolean useGenericsHeuristic = openingPeer == '<';
    if (useGenericsHeuristic && !fHighlightAngularBrackets)
      return -1;

    PHPHeuristicScanner scanner = PHPHeuristicScanner
        .createHeuristicScanner(document, offset, false);
    int peer = scanner.findOpeningPeer(offset - 1,
        PHPHeuristicScanner.UNBOUND, openingPeer, closingPeer);
    if (peer == PHPHeuristicScanner.NOT_FOUND)
      return -1;
    if (useGenericsHeuristic
        && !isTypeParameterBracket(peer, document, scanner))
View Full Code Here

        if (statementText.charAt(elementStart) != ')') { //
          return false;
        }

        // find get()
        PHPHeuristicScanner scanner = PHPHeuristicScanner.createHeuristicScanner(getDocument(), offset - statementText.length() + elementStart-1, true);
        int open = scanner.findOpeningPeer(offset - statementText.length() + elementStart-1, PHPHeuristicScanner.UNBOUND, PHPHeuristicScanner.LPAREN, PHPHeuristicScanner.RPAREN);
        statementText = getStatementText(open);
        totalLength = statementText.length();
        elementStart = PHPTextSequenceUtilities.readBackwardSpaces(
            statementText, totalLength);
        elementStart = PHPTextSequenceUtilities.readIdentifierStartIndex(
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.core.format.PHPHeuristicScanner

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.