Package org.eclipse.jst.jsf.context.symbol

Examples of org.eclipse.jst.jsf.context.symbol.ITypeDescriptor


     * @param propertyId
     * @return the symbol for the named propertyId or null if not found
     */
    public ISymbol getProperty(ISymbol base, Object propertyId)
    {
        ITypeDescriptor typeDesc = null;

        Object[] factoredProperties = new Object[] {propertyId};

        // check for expected interface types per JSP.2.3.4
        if (base instanceof IObjectSymbol)
View Full Code Here


        // if nothing found, return an empty array
        List  symbolsList =  Collections.EMPTY_LIST;
       
        if (base instanceof IObjectSymbol)
        {
            ITypeDescriptor typeDesc = null;
           
            // per JSP.2.3.4, if instance of map (unconstrained in our terminology)
            if (((IObjectSymbol)base).supportsCoercion(TypeConstants.TYPE_MAP))
            {
                typeDesc =
                    ((IObjectSymbol)base).coerce(TypeConstants.TYPE_MAP);
            }
            // Lists have no properties, even if they are also beans
            else if (((IObjectSymbol)base).supportsCoercion(TypeConstants.TYPE_LIST))
            {
                typeDesc = null;
            }
            else
            {
                typeDesc = ((IObjectSymbol)base).getTypeDescriptor();
           
            }
           
            if (typeDesc != null)
            {
                symbolsList =  typeDesc.getProperties();
                addCCAttrsIfNecessary(typeDesc, symbolsList);
            }
        }

        return (ISymbol[]) symbolsList.toArray(ISymbol.EMPTY_SYMBOL_ARRAY);
View Full Code Here

  /* (non-Javadoc)
     * @see org.eclipse.jst.jsf.designtime.el.AbstractDTPropertyResolver#getProperty(org.eclipse.jst.jsf.context.symbol.ISymbol, int)
     */
    public ISymbol getProperty(ISymbol base, int offset)
    {
        ITypeDescriptor typeDesc = null;

        if (offset < 0)
        {
          // should never be called with offset < 0
          throw new AssertionError("offsets must be >=0 to be valid"); //$NON-NLS-1$
        }
       
        // check for expected interface types per JSP.2.3.4
        if (base instanceof IObjectSymbol)
        {

          final IObjectSymbol objSymbol = (IObjectSymbol) base;
            typeDesc = objSymbol.getTypeDescriptor();

            // per JSP.2.3.4, if instance of array (unconstrained in our terminology)
            if (typeDesc.isArray())
            {
                ISymbol arrayElement = typeDesc.getArrayElement();
                // reset the name
                arrayElement.setName(base.getName()+"["+offset+"]"); //$NON-NLS-1$ //$NON-NLS-2$
                return arrayElement;
            }
           
View Full Code Here

TOP

Related Classes of org.eclipse.jst.jsf.context.symbol.ITypeDescriptor

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.