Package org.eclipse.php.internal.core.util.text

Examples of org.eclipse.php.internal.core.util.text.TextSequence.charAt()


        hasQuotes = true;

        endPosition = PHPTextSequenceUtilities.readBackwardSpaces(
            statementText, startPosition);
        if (endPosition == 0
            || (statementText.charAt(endPosition - 1) != '\"' && statementText
                .charAt(endPosition - 1) != '\'')) {
          return false;
        }
        startPosition = endPosition - 1;
      }
View Full Code Here


        startPosition = endPosition - 1;
      }
      endPosition = PHPTextSequenceUtilities.readBackwardSpaces(
          statementText, startPosition);
      if (endPosition > 0
          && (statementText.charAt(endPosition - 1) == '\"' || statementText
              .charAt(endPosition - 1) == '\'')) {
        hasQuotes = true;
        startPosition = endPosition - 1;
        endPosition = PHPTextSequenceUtilities.readBackwardSpaces(
            statementText, startPosition);
View Full Code Here

        startPosition = endPosition - 1;
      }
      endPosition = PHPTextSequenceUtilities.readBackwardSpaces(
          statementText, startPosition);
      if (endPosition > 0
          && (statementText.charAt(endPosition - 1) == '\"' || statementText
              .charAt(endPosition - 1) == '\'')) {
        hasQuotes = true;
        startPosition = endPosition - 1;
        endPosition = PHPTextSequenceUtilities.readBackwardSpaces(
            statementText, startPosition);
View Full Code Here

        startPosition = endPosition - 1;
        endPosition = PHPTextSequenceUtilities.readBackwardSpaces(
            statementText, startPosition);
      }
      if (endPosition == 0
          || statementText.charAt(endPosition - 1) != '[') {
        return false;
      }

      endPosition = PHPTextSequenceUtilities.readBackwardSpaces(
          statementText, endPosition - 1);
View Full Code Here

    TextSequence statementText = getStatementText();
    int functionEnd = getFunctionEnd();

    for (int i = statementText.length() - 1; i >= functionEnd; i--) {
      if (statementText.charAt(i) == '(') {
        return false;
      }
    }

    declaringClass = PHPModelUtils.getCurrentType(getSourceModule(),
View Full Code Here

    }

    // check if we are in the class identifier part.
    typeIdentifierEnd = 0;
    for (; typeIdentifierEnd < statementText.length(); typeIdentifierEnd++) {
      if (!Character.isLetterOrDigit(statementText
          .charAt(typeIdentifierEnd))) {
        break;
      }
    }
    // we are in class identifier part.
View Full Code Here

          if ((prefix == null || prefix.length() == 0)) {
            return false;
          }
          TextSequence statementText = getStatementText();
          if (statementText.length() > 0
              && statementText.charAt(statementText.length() - 1) == ':') {
            return false;
          }
        } catch (BadLocationException e) {
        }
      }
View Full Code Here

    statementText = statementText.subTextSequence(classEnd, statementText
        .length());

    int startPosition = 0;
    for (; startPosition < statementText.length(); startPosition++) {
      if (statementText.charAt(startPosition) == '(') {
        break;
      }
    }
    if (startPosition == statementText.length()) {
      // the current position is before the '('
View Full Code Here

      tagStart = PHPTextSequenceUtilities.readIdentifierStartIndex(
          getPhpVersion(), getStatementText(), tagEnd, true);

      tagName = statementText.subSequence(tagStart, tagEnd).toString();

      if (tagStart > 0 && statementText.charAt(tagStart - 1) == '@') {
        found = true;
      } else if (isPHPTag(tagName)) {
        found = true;
      }
View Full Code Here

        elementStart = PHPTextSequenceUtilities.readIdentifierStartIndex(
            statementText, elementStart, true);
        elementStart = PHPTextSequenceUtilities.readBackwardSpaces(
            statementText, elementStart);
        elementStart-=3;
        if (statementText.charAt(elementStart) != ')') { //
          return false;
        }

        // find get()
        PHPHeuristicScanner scanner = PHPHeuristicScanner.createHeuristicScanner(getDocument(), offset - statementText.length() + elementStart-1, true);
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.