Package org.eclipse.jst.jsp.core.internal.java.jspel

Examples of org.eclipse.jst.jsp.core.internal.java.jspel.JSPELParser


      if (elRegion.getType() == DOMJSPRegionContexts.JSP_EL_CLOSE)
        break;
    }
   
    String elText = container.getFullText().substring(contentStart, (elRegion != null) ? elRegion.getStart() : (contentLength - 1));
    JSPELParser elParser = JSPELParser.createParser(elText);
    try {
      elParser.Expression();
    }
    catch (ParseException e) {
      int sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_EL_SYNTAX);
      if (sev != ValidationMessage.IGNORE) {
        Token curTok = e.currentToken;
View Full Code Here


    }
  }

  protected void validateXMLNode(ITextRegionCollection container, ITextRegion region, IReporter reporter, IFile file) {
    String elText = container.getText(region);
    JSPELParser elParser = JSPELParser.createParser(elText);
    int contentStart = container.getStartOffset(region);
    int contentLength = container.getLength();
    try {
      elParser.Expression();
    }
    catch (ParseException e) {
      int sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_EL_SYNTAX);
      if (sev != ValidationMessage.IGNORE) {
        Token curTok = e.currentToken;
View Full Code Here

    }

  private static PrefixVisitor getVisitorForPosition(final int relativePosition,
      final String elText) {
    final java.io.StringReader reader = new java.io.StringReader(elText);
        final JSPELParser  parser = new JSPELParser(reader);
       
        try
        {
            final ASTExpression expr = parser.Expression();
            final PrefixVisitor visitor = new PrefixVisitor(relativePosition, elText);
            expr.jjtAccept(visitor, null);
            return visitor;
        }
        catch (ParseException pe)
View Full Code Here

    }

  private static PrefixVisitor getVisitorForPosition(final int relativePosition,
      final String elText) {
    final java.io.StringReader reader = new java.io.StringReader(elText);
        final JSPELParser  parser = new JSPELParser(reader);
       
        try
        {
            final ASTExpression expr = parser.Expression();
            final PrefixVisitor visitor = new PrefixVisitor(relativePosition, elText);
            expr.jjtAccept(visitor, null);
            return visitor;
        }
        catch (ParseException pe)
View Full Code Here

    {
        final ELResultWrapper result = extractELExpression(textContent);
       
        if (result.elText != null)
        {
             JSPELParser parser = new JSPELParser(new StringReader(result.elText));
           
            try {
                parser.Expression();
            } catch (ParseException e) {
                // syntax error
                return DiagnosticFactory.create_SYNTAX_ERROR_IN_EL();
            }
           
View Full Code Here

        {
            final char nextChar = (char) nextCharacter;

            if (nextChar == '\n')
            {
                final JSPELParser parser = JSPELParser.createParser(elText);
                final ASTExpression expr = parser.Expression();
                expr.dump(""); //$NON-NLS-1$

                elText = ""; //$NON-NLS-1$
            }
            else
View Full Code Here

        break;
    }
   
    String elText = container.getFullText().substring(contentStart, (elRegion != null) ? elRegion.getStart() : (contentLength - 1));
   
    JSPELParser elParser = JSPELParser.createParser(elText);
    try {
      elParser.Expression();
    }
    catch (ParseException e) {
      int sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_EL_SYNTAX);
      if (sev != ValidationMessage.IGNORE) {
        Token curTok = e.currentToken;
View Full Code Here

    }
  }

  protected void validateXMLNode(ITextRegionCollection container, ITextRegion region, IReporter reporter, IFile file) {
    String elText = container.getText(region);
    JSPELParser elParser = JSPELParser.createParser(elText);
    int contentStart = container.getStartOffset(region);
    int contentLength = container.getLength();
    try {
      elParser.Expression();
    }
    catch (ParseException e) {
      int sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_EL_SYNTAX);
      if (sev != ValidationMessage.IGNORE) {
        Token curTok = e.currentToken;
View Full Code Here

     * Validates a single EL expression in an XML attribute value
     * @return an ASTExpression for the node
     */
    public ASTExpression validateXMLNode()
    {
        JSPELParser elParser = JSPELParser.createParser(_elText);
        // =
        try {
            //final long startParsing = System.currentTimeMillis();
            final ASTExpression expr =  elParser.Expression();
            //final long endParsing = System.currentTimeMillis();
            //final long startSemantics = System.currentTimeMillis();
            validateSemantics(expr, _context);
            //final long endSemantics = System.currentTimeMillis();

View Full Code Here

    return null;
  }

  protected ASTFunctionInvocation getInvocation(int relativePosition, String elText) {
    FindFunctionInvocationVisitor visitor = new FindFunctionInvocationVisitor(relativePosition);
    JSPELParser parser = JSPELParser.createParser(elText);
    try {
      ASTExpression expression = parser.Expression();
      return (ASTFunctionInvocation) expression.jjtAccept(visitor, null);
    }
    catch (ParseException e) { /* parse exception = no completion */
    }
    return (null);
View Full Code Here

TOP

Related Classes of org.eclipse.jst.jsp.core.internal.java.jspel.JSPELParser

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.