Package org.eclipse.jst.jsf.common.internal.types

Examples of org.eclipse.jst.jsf.common.internal.types.ValueType


            // per JSP.2.3.4, if instance of list (unbounded in our terminology)
            if (objSymbol.supportsCoercion(TypeConstants.TYPE_LIST))
            {
                //typeDesc = objSymbol.coerce(TypeConstants.TYPE_LIST);
                final EList<ValueType> args = new BasicEList<ValueType>();
                args.add(new ValueType(Signature.SIG_INT, ValueType.ASSIGNMENT_TYPE_RHS));
                return objSymbol.call("get", args, base.getName()+"["+offset+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
            }

            return getCCAttrsSymbolIfNecessary(typeDesc);
            // check unconstrained type
View Full Code Here


                        .deriveIFileFromContext(sContext);
                final IStructuredDocumentContext elContext = IStructuredDocumentContextFactory.INSTANCE
                        .getContext(sContext.getStructuredDocument(), attr);
                if (elText != null && file != null && elContext != null)
                {
                    final ValueType valueExpr = _factory
                            .getValueTypeFromEL(elText, elContext, file);
                    if (valueExpr != null)
                    {
                        final IJavaProject javaProject = getJavaProject(sContext);
                        return _factory.createJavaComponentSymbol(name, valueExpr, null, javaProject);
View Full Code Here

            throw new AssertionError("Binary operators should always have two sub-expressions")//$NON-NLS-1$
        }

        // evaluate choice argument
        node.jjtGetChild(0).jjtAccept(this, data);
        final ValueType choiceArg = ((EvaluationTracker)data).getValueType();
        // evaluate when true argument
        node.jjtGetChild(1).jjtAccept(this, data);
        final ValueType whenTrueArg = ((EvaluationTracker)data).getValueType();
        //evaluate when false argument
        node.jjtGetChild(2).jjtAccept(this, data);
        final ValueType whenFalseArg = ((EvaluationTracker)data).getValueType();


        if (choiceArg != null && whenTrueArg != null && whenFalseArg != null)
        {
            final TernaryChoiceOperator operator =
View Full Code Here

        }

        // evaluate left-most argument
        node.jjtGetChild(0).jjtAccept(this, tracker);

        ValueType curType = getValueTypeForBinaryOperation(tracker.getType(), (SimpleNode) node.jjtGetChild(0));

        for (int child = 1; child < node.jjtGetNumChildren(); child++)
        {
            // evaluate next argument running left-to-right
            node.jjtGetChild(child).jjtAccept(this, tracker);
            final ValueType secondType =
                getValueTypeForBinaryOperation(tracker.getType(), (SimpleNode) node.jjtGetChild(child));

            if (curType != null && secondType != null)
            {
                final BinaryOperator operator =
View Full Code Here

                .getContext(context.getStructuredDocument(),
                    dataTableElement.getAttributeNode("value")); //$NON-NLS-1$

            final IJavaProject javaProject = JavaCore.create(file.getProject());

            final ValueType valueExpr = new JSFSymbolFactory()
                    .getValueTypeFromEL(elText, elContext, file);

            if (valueExpr != null)
            {
                // otherwise, we have to try to resolve the base type and see
View Full Code Here

            // check if the two results are the same type
            // TODO: could increase accuracy by appoximating type:i.e. if both
            // are numeric etc.
            if (boxedWhenTrueArg.equals(boxedWhenFalseArg))
            {
                return new ValueType(whenTrueArg, IAssignable.ASSIGNMENT_TYPE_RHS);
            }

            // otherwise, we have no idea what the resulting type is
            return null;
        }
View Full Code Here

        {
            return handleStringComparison(firstArg, secondArg);
        }
       
        // otherwise, an equal compare will be done A.equals(B).  Since
        return new ValueType(TypeConstants.TYPE_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS);
    }
View Full Code Here

           
            return BooleanLiteralType.valueOf(result);
        }
       
        // otherwise, all we know is that it's a boolean
        return new ValueType(TypeConstants.TYPE_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS);
    }
View Full Code Here

            if (result != null)
            {
                // compare two things that aren't equal
                return BooleanLiteralType.valueOf(doRealOperation("foo", "foo_")); //$NON-NLS-1$ //$NON-NLS-2$
            }
            return new ValueType(TypeConstants.TYPE_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS);
        }
       
        // if the arg is a String, then we can't prove anything before runtime
        if (nonEnumType.isInstanceOf(TypeConstants.TYPE_STRING))
        {
            return new ValueType(TypeConstants.TYPE_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS);
        }
        // otherwise, we know it will result in a problem since one is an enum
        // and the other isn't so simply do a comparison on two things that aren't equals
        return BooleanLiteralType.valueOf(doRealOperation("foo", "foo_")); //$NON-NLS-1$ //$NON-NLS-2$
    }
View Full Code Here

                throw new AssertionError("should never get here; have already checked coercability above"); //$NON-NLS-1$
            }
        }
       
        // otherwise, we have a valid comparison that results in boolean
        return new ValueType(TypeConstants.TYPE_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.jsf.common.internal.types.ValueType

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.