|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jst.jsf.context.symbol.InitializedSymbolFactory
org.eclipse.jst.jsf.designtime.symbols.JSFSymbolFactory
public final class JSFSymbolFactory
Factory for creating symbols for variables/message bundles that are
contributed by components/tags. This Factory can be used by descendants of
AbstractContextSymbolFactory
in order to create the symbols they want
to contribute.
It provides also methods for getting the resulting ValueType
from an
EL expression and the "row" type signature from an DataModel/Array/List
ValueType
.
NOTE: C.B March 26, 2008 -- commented out portions are left for the future
because the rely on enhancements to the symbol model that could not be made
in the current release. Other portions of the original ComponentSymbolFactory
have been moved to InitializedSymbolFactory
This reflects the split between things deemed to be generic EL (put in common
plugin) and things deemed to be JSF-specific (put here).
Constructor Summary | |
---|---|
JSFSymbolFactory()
|
Method Summary | |
---|---|
ISymbol |
createArraySymbol(java.lang.String symbolName,
java.lang.String signature,
ERuntimeSource source,
IJavaProject javaProject)
|
ISymbol |
createDefaultSymbol(java.lang.String symbolName,
ERuntimeSource source,
java.lang.String description)
|
ISymbol |
createFromList(java.lang.String symbolName,
org.eclipse.jst.jsf.common.internal.types.ValueType valueType,
ERuntimeSource source,
java.lang.String description,
IJavaProject javaProject)
|
IBeanInstanceSymbol |
createManagedBeanSymbol(java.lang.String symbolName,
java.lang.String fullyQualifiedName,
ERuntimeSource source,
java.lang.String description,
IJavaProject javaProject)
FUTURE use: added to support future API feature. |
IInstanceSymbol |
createMessageBundleSymbol(java.lang.String symbolName,
java.lang.String bundleName,
IJavaProject project)
FUTURE use: added to support future API feature. |
ISymbol |
createScalarSymbol(java.lang.String symbolName,
java.lang.String signature,
ERuntimeSource source,
IJavaProject javaProject)
|
java.lang.String |
getRowSignatureFromDataModel(org.eclipse.jst.jsf.common.internal.types.ValueType type)
Tries to guess the row type of a javax.faces.DataModel
instance. |
java.lang.String |
getRowSignatureFromValueType(org.eclipse.jst.jsf.common.internal.types.ValueType type)
|
org.eclipse.jst.jsf.common.internal.types.ValueType |
getValueTypeFromEL(java.lang.String elText,
IStructuredDocumentContext elContext,
IFile file)
Convenience for getValueTypeFromEL(String, IStructuredDocumentContext, IFile, IStructuredDocumentSymbolResolverFactory)
using StructuredDocumentSymbolResolverFactory.getInstance(). |
org.eclipse.jst.jsf.common.internal.types.ValueType |
getValueTypeFromEL(java.lang.String elText,
IStructuredDocumentContext elContext,
IFile file,
IStructuredDocumentSymbolResolverFactory symbolResolverFactory)
|
boolean |
isContainerType(org.eclipse.jst.jsf.common.internal.types.ValueType type)
|
Methods inherited from class org.eclipse.jst.jsf.context.symbol.InitializedSymbolFactory |
---|
createBeanOrUnknownInstanceSymbol, createJavaComponentSymbol, createJavaComponentSymbol, createTypeDescriptorFromSignature, createUnknownComponentSymbol, createUnknownInstanceSymbol, getElementSignatureFromContainerType |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JSFSymbolFactory()
Method Detail |
---|
public org.eclipse.jst.jsf.common.internal.types.ValueType getValueTypeFromEL(java.lang.String elText, IStructuredDocumentContext elContext, IFile file, IStructuredDocumentSymbolResolverFactory symbolResolverFactory)
elText
- The EL expression text. Must not be nullelContext
- The document context pointing to elText in the source document. Must not be nullfile
- The workspace resource that contains elText. Must not be null.symbolResolverFactory
-
public org.eclipse.jst.jsf.common.internal.types.ValueType getValueTypeFromEL(java.lang.String elText, IStructuredDocumentContext elContext, IFile file)
getValueTypeFromEL(String, IStructuredDocumentContext, IFile, IStructuredDocumentSymbolResolverFactory)
using StructuredDocumentSymbolResolverFactory.getInstance().
elText
- elContext
- file
-
public java.lang.String getRowSignatureFromDataModel(org.eclipse.jst.jsf.common.internal.types.ValueType type)
javax.faces.DataModel
instance. This will only work if type
is a descendant that
narrows down the return type of "getRowData()".
type
-
null
if type
is no DataModel or if
nothing more specific than Object
can be
determinedpublic boolean isContainerType(org.eclipse.jst.jsf.common.internal.types.ValueType type)
type
-
true
, if type
is a collection or
arraypublic java.lang.String getRowSignatureFromValueType(org.eclipse.jst.jsf.common.internal.types.ValueType type)
type
- -
the type of the value
property
UIData
takes as value
property.
Will return null
if no type or nothing more
specific than Object
can be determinedpublic final ISymbol createArraySymbol(java.lang.String symbolName, java.lang.String signature, ERuntimeSource source, IJavaProject javaProject)
symbolName
- The name of the symbol to be created. Must not be nullsignature
- The type signature of the array type. Must not be nullsource
- the runtime sourcejavaProject
- must not be null
public final ISymbol createScalarSymbol(java.lang.String symbolName, java.lang.String signature, ERuntimeSource source, IJavaProject javaProject)
symbolName
- The name of the symbol to create. Must not be null.signature
- The fully resolved type signature of the scalar. Must not be null.source
- javaProject
- The JavaProject whose classpath is to be used to resolve type information for signture. Must not be null.
public final ISymbol createFromList(java.lang.String symbolName, org.eclipse.jst.jsf.common.internal.types.ValueType valueType, ERuntimeSource source, java.lang.String description, IJavaProject javaProject)
symbolName
- The name of the symbol to create. Must not be null.valueType
- The value expression representing the implicit list. The signature
on the valueType must be a list. Must not be null.source
- description
- javaProject
- The JavaProject whose classpath will be used to resolve types. Must not be null.
public final ISymbol createDefaultSymbol(java.lang.String symbolName, ERuntimeSource source, java.lang.String description)
symbolName
- The name of the symbol to create. Must not be nullsource
- description
-
public IInstanceSymbol createMessageBundleSymbol(java.lang.String symbolName, java.lang.String bundleName, IJavaProject project)
symbolName
- bundleName
- project
-
public IBeanInstanceSymbol createManagedBeanSymbol(java.lang.String symbolName, java.lang.String fullyQualifiedName, ERuntimeSource source, java.lang.String description, IJavaProject javaProject)
symbolName
- fullyQualifiedName
- source
- description
- javaProject
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |