Examples of ISymbol


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

         * @return symbol and symbol region if resolved, null otherwise
         */
        public SymbolInfo getSymbolInfo(IStructuredDocumentContext context) {
          if (_prefixResolved && _symbolStartPos < _symbolEndPos) {
            Region region = new Region(_symbolStartPos - 1, _symbolEndPos - _symbolStartPos + 1);
                ISymbol symbol = null;
                switch (_prefixType) {
                case ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION:
                    symbol = SymbolResolveUtil.getSymbolForVariable(context, substring(_fullText, region));
                    break;
                case ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION:
View Full Code Here

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

                       symbols.add(createSymbolForResourceBundle(project, name, basename));
                   } catch (JavaModelException e) {
                       JSFCorePlugin.log(e, "Error creating base name for: "+basename); //$NON-NLS-1$
                    } catch (IOException e) {
                      //Bug 306811 - Invalid error "messages not found in classpath for project"
                      ISymbol symbol = createSymbolForResourceBundleInJAR(project, name, basename);
                      if (symbol != null) {
                        symbols.add(symbol);
                      } else {
                        JSFCorePlugin.log(e, "Error creating base name for: "+basename); //$NON-NLS-1$
                      }
View Full Code Here

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

            stream.println(scopeNames[i]+" Scope:"); //$NON-NLS-1$
            stream.println("--------------"); //$NON-NLS-1$

            for (final Iterator it = symbolMaps[i].values().iterator(); it.hasNext();)
            {
                ISymbol symbol = (ISymbol) it.next();
                System.out.println(symbol.getName());
            }
        }
    }
View Full Code Here

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

            else if (objSymbol.supportsCoercion(TypeConstants.TYPE_MAP))
            {
                EList<ValueType>  args = new BasicEList<ValueType>();
                args.add(new StringLiteralType(propertyId.toString()));
               
                ISymbol prop = objSymbol.call("get", args, propertyId.toString()); //$NON-NLS-1$
               
                if (prop != null)
                {
                    return prop;
                }
               
                typeDesc = objSymbol.coerce(TypeConstants.TYPE_MAP);

                // handle string keys into maps that contain dots.  Because type descriptor
                // handle dotted property ids (i.e. 'x.y.z') as separate properties with
                // intermediate parts, we need to handle this specially.
                if (propertyId instanceof String && ((String)propertyId).indexOf('.')>-1)
                {
                    factoredProperties = factorKey(propertyId);
                }
            }
            //if symbol is "attrs", add it if applicable
            else if (propertyId instanceof String
                && ((String)propertyId).equals(ATTRS_SYMBOL_NAME)) {
              return getCCAttrsSymbolIfNecessary(typeDesc);
            }

            // check unconstrained type
            if (typeDesc instanceof IBoundedTypeDescriptor)
            {
                // TODO: propertyId may need to change when supporting
                // template types
                if (((IBoundedTypeDescriptor)typeDesc).isUnboundedForType(TypeConstants.TYPE_JAVAOBJECT))
                {
                    // the most we know is that it could be an Object
                    return ((IBoundedTypeDescriptor)typeDesc).getUnboundedProperty(propertyId, TypeConstants.TYPE_JAVAOBJECT);
                }
            }
           
        }

        int i = 0;
        ISymbol  matchedSymbol;

        do
        {
            matchedSymbol = null; // always reset so if the for completes without setting, the
                                  // while ends
            SEARCH_SEGMENT: for (final Iterator it = getIterator(typeDesc); it.hasNext();)
            {
                final ISymbol element = (ISymbol) it.next();

                if (element.getName().equals(factoredProperties[i])
                        && element instanceof IObjectSymbol)
                {
                    matchedSymbol = element;
                    typeDesc = ((IObjectSymbol)matchedSymbol).getTypeDescriptor();
                    break SEARCH_SEGMENT;
View Full Code Here

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

        return (ISymbol[]) symbolsList.toArray(ISymbol.EMPTY_SYMBOL_ARRAY);
    }

    private ISymbol getCCAttrsSymbolIfNecessary(final ITypeDescriptor typeDesc) {
      ISymbol attrsSymbol = null;
      if (typeDesc.instanceOf(UICOMPONENT_SYMBOL_SIGNATURE)) {
        attrsSymbol = _symbolFactory.createUnknownInstanceSymbol(ATTRS_SYMBOL_NAME, ERuntimeSource.BUILT_IN_SYMBOL_LITERAL);       
      }
      return attrsSymbol;
    }
View Full Code Here

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

      }
      return attrsSymbol;
    }
   
    private void addCCAttrsIfNecessary(final ITypeDescriptor typeDesc, final List symbolsList) {
      final ISymbol attrsSymbol = getCCAttrsSymbolIfNecessary(typeDesc);
      if (attrsSymbol != null) {       
        symbolsList.add(attrsSymbol);
      }
  }
View Full Code Here

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

            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;
            }
           
            // per JSP.2.3.4, if instance of list (unbounded in our terminology)
            if (objSymbol.supportsCoercion(TypeConstants.TYPE_LIST))
View Full Code Here

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

        {
            properties = new HashMap<Object, ISymbol>();
            _propertiesByOwner.put(symbol, properties);
        }

        ISymbol property = properties.get(propertyName);

        if (property == PROPERTY_NOT_FOUND)
        {
            property = null;
        }
View Full Code Here

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

    }

    @Override
    public ISymbol getVariable(final String name)
    {
        ISymbol variable = _variablesByName.get(name);

        // if the symbol was not found, return null but avoid calling the
        // delegate again
        if (variable == SYMBOL_NOT_FOUND)
        {
View Full Code Here

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

         * @return symbol and symbol region if resolved, null otherwise
         */
        public SymbolInfo getSymbolInfo(IStructuredDocumentContext context) {
          if (_prefixResolved && _symbolStartPos < _symbolEndPos) {
            Region region = new Region(_symbolStartPos - 1, _symbolEndPos - _symbolStartPos + 1);
                ISymbol symbol = null;
                switch (_prefixType) {
                case ContentAssistStrategy.PREFIX_TYPE_ID_COMPLETION:
                    symbol = SymbolResolveUtil.getSymbolForVariable(context, substring(_fullText, region));
                    break;
                case ContentAssistStrategy.PREFIX_TYPE_DOT_COMPLETION:
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.