Package org.netbeans.modules.php.editor.lexer

Examples of org.netbeans.modules.php.editor.lexer.PHPTokenId


     *
     * @param token
     */
    private void setTarget(Token<PHPTokenId> token) {
        target = token.text().toString();
        PHPTokenId id = token.id();
        if (id == PHPTokenId.PHP_CONSTANT_ENCAPSED_STRING) {
            if (target.length() > 2) {
                target = target.substring(1, target.length() - 1);
            } else {
                target = ""; // NOI18N
View Full Code Here


        String name = null;
        paramCount = 1;
        while (ts.movePrevious()) {
            Token<PHPTokenId> token = ts.token();
            String text = token.text().toString();
            PHPTokenId id = token.id();
            if (id == PHPTokenId.PHP_TOKEN && text.equals(",")) { // NOI18N
                // XXX this is not exact
                paramCount++;
                continue;
            }
View Full Code Here

            }

            // search first parameter
            while (ts.moveNext()) {
                Token<PHPTokenId> token = ts.token();
                PHPTokenId id = token.id();
                if (id == PHPTokenId.PHP_SEMICOLON) {
                    break;
                }
                if (id == PHPTokenId.PHP_CONSTANT_ENCAPSED_STRING) {
                    String text = token.text().toString();
View Full Code Here

        // move to caret position
        ts.move(offset);
        ts.moveNext();
        while (ts.movePrevious()) {
            Token<PHPTokenId> token = ts.token();
            PHPTokenId id = token.id();
            if (id == PHPTokenId.PHP_SEMICOLON) {
                break;
            }
            String text = token.text().toString();
            if (MethodFactory.METHODS.contains(text) && id == PHPTokenId.PHP_STRING) {
View Full Code Here

        String method = ""; // NOI18N
        while (ts.movePrevious()) {
            Token<PHPTokenId> token = ts.token();
            CharSequence text = token.text();
            PHPTokenId id = token.id();
            if (TokenUtilities.equals(text, ";") // NOI18N
                    || TokenUtilities.equals(text, "{") // NOI18N
                    || TokenUtilities.equals(text, "=")) { // NOI18N
                break;
            }
View Full Code Here

        }
        TokenSequence<PHPTokenId> ts = FuelDocUtils.getTokenSequence(document);
        ts.move(offset);
        ts.moveNext();
        Token<PHPTokenId> token = ts.token();
        PHPTokenId id = token.id();
        String text = token.text().toString();
        if (id != PHPTokenId.PHP_CONSTANT_ENCAPSED_STRING || text.equals("")) {
            return false;
        }
View Full Code Here

            }
            ts.move(offset);
            ts.moveNext();
            Token<PHPTokenId> token = ts.token();
            target = token.text().toString();
            PHPTokenId tokenId = token.id();
            int targetOffset = ts.offset();
            if (!isValid(ts)) {
                return false;
            }
            if (tokenId == PHPTokenId.PHP_CONSTANT_ENCAPSED_STRING) {
View Full Code Here

TOP

Related Classes of org.netbeans.modules.php.editor.lexer.PHPTokenId

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.