org.eclipse.jst.jsf.designtime.symbols
Class AbstractDataModelVariableFactory

java.lang.Object
  extended by org.eclipse.jst.jsf.designtime.symbols.AbstractDataModelVariableFactory

public abstract class AbstractDataModelVariableFactory
extends java.lang.Object

A framework provided variable factory for EL model objects that are constructed based on DataModel's dervied from an EL expression.


Constructor Summary
AbstractDataModelVariableFactory()
           
 
Method Summary
 ISymbol createDefaultSymbol(java.lang.String symbolName)
           
 ISymbol createFromType(java.lang.String symbolName, org.eclipse.jst.jsf.common.internal.types.ValueType valueType, org.eclipse.jdt.core.IJavaProject javaProject)
          Implements default rules for taking an non-array value expression and resolving it to a ISymbol modelling a JSF DataModel
 org.eclipse.jst.jsf.common.internal.types.ValueType createValueExpression(java.lang.String elText, IStructuredDocumentContext elContext, org.eclipse.core.resources.IFile file)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDataModelVariableFactory

public AbstractDataModelVariableFactory()
Method Detail

createValueExpression

public final org.eclipse.jst.jsf.common.internal.types.ValueType createValueExpression(java.lang.String elText,
                                                                                       IStructuredDocumentContext elContext,
                                                                                       org.eclipse.core.resources.IFile file)
Parameters:
elText - The EL expression text. Must not be null
elContext - The document context pointing to elText in the source document. Must not be null
file - The workspace resource that contains elText. Must not be null.
Returns:
the value expression resolved from elText or null if it cannot be resolved or elText doesn't resolve to value expression (i.e. is a method expression)

createFromType

public ISymbol createFromType(java.lang.String symbolName,
                              org.eclipse.jst.jsf.common.internal.types.ValueType valueType,
                              org.eclipse.jdt.core.IJavaProject javaProject)
Implements default rules for taking an non-array value expression and resolving it to a ISymbol modelling a JSF DataModel

Parameters:
symbolName -
valueType -
javaProject -
Returns:
a symbol where valueType is considered to be the base type upon which a data model would be created. This combines the possibility that the value expression is either an explicit DataModel implementation or a non-DataModel type for which JSF be default provides an implicit wrapper model. List is treated as a special case here, since their are two subcases: 1) the list is a raw type, in which case it must be treated as implicit and opaque (as to the type of the variable created) 2) the list has Java 5 type argument information that can be used to infer the type of the row variable

createDefaultSymbol

public final ISymbol createDefaultSymbol(java.lang.String symbolName)
Parameters:
symbolName - The name of the symbol to create. Must not be null
Returns:
a default symbol that eliminates bogus warnings for this dataTable's row variable in cases where something better is resolvable. Note that this is not ideal, since will result in any property being accepted on the variable with this name.