Search in sources :

Example 1 with FindFunctionInvocationVisitor

use of org.eclipse.jst.jsp.core.internal.java.jspel.FindFunctionInvocationVisitor in project webtools.sourceediting by eclipse.

the class JSPELContentAssistProcessor method getInvocation.

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);
}
Also used : FindFunctionInvocationVisitor(org.eclipse.jst.jsp.core.internal.java.jspel.FindFunctionInvocationVisitor) JSPELParser(org.eclipse.jst.jsp.core.internal.java.jspel.JSPELParser) ASTFunctionInvocation(org.eclipse.jst.jsp.core.internal.java.jspel.ASTFunctionInvocation) ParseException(org.eclipse.jst.jsp.core.internal.java.jspel.ParseException) ASTExpression(org.eclipse.jst.jsp.core.internal.java.jspel.ASTExpression)

Aggregations

ASTExpression (org.eclipse.jst.jsp.core.internal.java.jspel.ASTExpression)1 ASTFunctionInvocation (org.eclipse.jst.jsp.core.internal.java.jspel.ASTFunctionInvocation)1 FindFunctionInvocationVisitor (org.eclipse.jst.jsp.core.internal.java.jspel.FindFunctionInvocationVisitor)1 JSPELParser (org.eclipse.jst.jsp.core.internal.java.jspel.JSPELParser)1 ParseException (org.eclipse.jst.jsp.core.internal.java.jspel.ParseException)1