Package org.fife.ui.rsyntaxtextarea

Examples of org.fife.ui.rsyntaxtextarea.Token.startsWith()


          // If we're folding PHP.  Note that PHP folding can only be
          // "one level deep," so our logic here is simple.
          if (language>=0 && t.type==Token.SEPARATOR) {

            // <?, <?php, <%, <%!, ...
            if (t.startsWith(LANG_START[language])) {
              if (currentFold==null) {
                currentFold = new Fold(FoldType.CODE, textArea, t.offset);
                folds.add(currentFold);
              }
              else {
View Full Code Here


              }
              inSublanguage = true;
            }

            // ?> or %>
            else if (t.startsWith(LANG_END[language])) {
              int phpEnd = t.offset + t.textCount - 1;
              currentFold.setEndOffset(phpEnd);
              Fold parentFold = currentFold.getParent();
              // Don't add fold markers for single-line blocks
              if (currentFold.isOnSingleLine()) {
View Full Code Here

                // Otherwise, this MLC is continuing on to yet
                // another line.
              }

              // Starting a MLC that ends on a later line...
              else if (t.startsWith(MLC_START) && !t.endsWith(MLC_END)) {
                if (currentFold==null) {
                  currentFold = new Fold(FoldType.COMMENT, textArea, t.offset);
                  folds.add(currentFold);
                }
                else {
View Full Code Here

                inMLC = true;
              }

              // Starting a JSP comment that ends on a later line...
              else if (language==LANGUAGE_JSP &&
                  t.startsWith(JSP_COMMENT_START) &&
                  !t.endsWith(JSP_COMMENT_END)) {
                if (currentFold==null) {
                  currentFold = new Fold(FoldType.COMMENT, textArea, t.offset);
                  folds.add(currentFold);
                }
View Full Code Here

                // Otherwise, this MLC is continuing on to yet
                // another line.
              }

              // Starting a MLC that ends on a later line...
              else if (t.startsWith(MLC_START) && !t.endsWith(MLC_END)) {
                if (currentFold==null) {
                  currentFold = new Fold(FoldType.COMMENT, textArea, t.getOffset());
                  folds.add(currentFold);
                }
                else {
View Full Code Here

                inMLC = true;
              }

              // Starting a JSP comment that ends on a later line...
              else if (language==LANGUAGE_JSP &&
                  t.startsWith(JSP_COMMENT_START) &&
                  !t.endsWith(JSP_COMMENT_END)) {
                if (currentFold==null) {
                  currentFold = new Fold(FoldType.COMMENT, textArea, t.getOffset());
                  folds.add(currentFold);
                }
View Full Code Here

          // If we're folding PHP.  Note that PHP folding can only be
          // "one level deep," so our logic here is simple.
          if (language>=0 && t.getType()==Token.SEPARATOR) {

            // <?, <?php, <%, <%!, ...
            if (t.startsWith(LANG_START[language])) {
              if (currentFold==null) {
                currentFold = new Fold(FoldType.CODE, textArea, t.getOffset());
                folds.add(currentFold);
              }
              else {
View Full Code Here

              }
              inSublanguage = true;
            }

            // ?> or %>
            else if (t.startsWith(LANG_END[language])) {
              int phpEnd = t.getEndOffset() - 1;
              currentFold.setEndOffset(phpEnd);
              Fold parentFold = currentFold.getParent();
              // Don't add fold markers for single-line blocks
              if (currentFold.isOnSingleLine()) {
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.