diff options
author | cbateman | 2007-05-07 17:30:22 +0000 |
---|---|---|
committer | cbateman | 2007-05-07 17:30:22 +0000 |
commit | fa6b36357aaafe236d2b4563b442fa5b9564f0c2 (patch) | |
tree | 676deba2978910bbec38cbcbb350e3c57158085f /jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context | |
parent | 59d77ed3682769750b38004a111487611a9b5081 (diff) | |
download | webtools.jsf-fa6b36357aaafe236d2b4563b442fa5b9564f0c2.tar.gz webtools.jsf-fa6b36357aaafe236d2b4563b442fa5b9564f0c2.tar.xz webtools.jsf-fa6b36357aaafe236d2b4563b442fa5b9564f0c2.zip |
Initial checkin for generics support in EL.
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context')
61 files changed, 1909 insertions, 610 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ERuntimeSource.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ERuntimeSource.java index 6d7ea849c..5fcc6a14a 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ERuntimeSource.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ERuntimeSource.java @@ -42,7 +42,7 @@ public final class ERuntimeSource extends AbstractEnumerator { * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * The '<em><b>BUILT IN SYMBOL</b></em>' literal value. @@ -112,7 +112,7 @@ public final class ERuntimeSource extends AbstractEnumerator { * @generated * @ordered */ - public static final ERuntimeSource BUILT_IN_SYMBOL_LITERAL = new ERuntimeSource(BUILT_IN_SYMBOL, "BUILT_IN_SYMBOL", "BUILT_IN_SYMBOL"); + public static final ERuntimeSource BUILT_IN_SYMBOL_LITERAL = new ERuntimeSource(BUILT_IN_SYMBOL, "BUILT_IN_SYMBOL", "BUILT_IN_SYMBOL"); //$NON-NLS-1$ //$NON-NLS-2$ /** * The '<em><b>MANAGED BEAN SYMBOL</b></em>' literal object. @@ -122,7 +122,7 @@ public final class ERuntimeSource extends AbstractEnumerator { * @generated * @ordered */ - public static final ERuntimeSource MANAGED_BEAN_SYMBOL_LITERAL = new ERuntimeSource(MANAGED_BEAN_SYMBOL, "MANAGED_BEAN_SYMBOL", "MANAGED_BEAN_SYMBOL"); + public static final ERuntimeSource MANAGED_BEAN_SYMBOL_LITERAL = new ERuntimeSource(MANAGED_BEAN_SYMBOL, "MANAGED_BEAN_SYMBOL", "MANAGED_BEAN_SYMBOL"); //$NON-NLS-1$ //$NON-NLS-2$ /** * The '<em><b>TAG INSTANTIATED SYMBOL</b></em>' literal object. @@ -132,7 +132,7 @@ public final class ERuntimeSource extends AbstractEnumerator { * @generated * @ordered */ - public static final ERuntimeSource TAG_INSTANTIATED_SYMBOL_LITERAL = new ERuntimeSource(TAG_INSTANTIATED_SYMBOL, "TAG_INSTANTIATED_SYMBOL", "TAG_INSTANTIATED_SYMBOL"); + public static final ERuntimeSource TAG_INSTANTIATED_SYMBOL_LITERAL = new ERuntimeSource(TAG_INSTANTIATED_SYMBOL, "TAG_INSTANTIATED_SYMBOL", "TAG_INSTANTIATED_SYMBOL"); //$NON-NLS-1$ //$NON-NLS-2$ /** * The '<em><b>OTHER</b></em>' literal object. @@ -142,7 +142,7 @@ public final class ERuntimeSource extends AbstractEnumerator { * @generated * @ordered */ - public static final ERuntimeSource OTHER_LITERAL = new ERuntimeSource(OTHER, "OTHER", "OTHER"); + public static final ERuntimeSource OTHER_LITERAL = new ERuntimeSource(OTHER, "OTHER", "OTHER"); //$NON-NLS-1$ //$NON-NLS-2$ /** * An array of all the '<em><b>ERuntime Source</b></em>' enumerators. diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanInstanceSymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanInstanceSymbol.java index 34e1956f3..4ea5cbfe3 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanInstanceSymbol.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanInstanceSymbol.java @@ -27,7 +27,7 @@ public interface IBeanInstanceSymbol extends IInstanceSymbol, IDescribedInDetail * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * Returns the value of the '<em><b>Properties</b></em>' reference list. diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanMethodSymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanMethodSymbol.java index d82830209..75719a8be 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanMethodSymbol.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanMethodSymbol.java @@ -34,7 +34,7 @@ public interface IBeanMethodSymbol extends IDescribedInDetail, IMethodSymbol { * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * Returns the value of the '<em><b>Owner</b></em>' reference. diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanPropertySymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanPropertySymbol.java index 247c2e9f8..cc02b9966 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanPropertySymbol.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBeanPropertySymbol.java @@ -24,7 +24,7 @@ public interface IBeanPropertySymbol extends IPropertySymbol, IDescribedInDetail * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * @return the bean that owns this property diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedJavaTypeDescriptor.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedJavaTypeDescriptor.java index 095cb7815..61538a69e 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedJavaTypeDescriptor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedJavaTypeDescriptor.java @@ -23,6 +23,6 @@ public interface IBoundedJavaTypeDescriptor extends IJavaTypeDescriptor2, IBound * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ } // IBoundedJavaTypeDescriptor
\ No newline at end of file diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedListTypeDescriptor.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedListTypeDescriptor.java index 9b2b9c465..1288d7d5f 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedListTypeDescriptor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedListTypeDescriptor.java @@ -23,6 +23,6 @@ public interface IBoundedListTypeDescriptor extends IListTypeDescriptor, IBounde * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ } // IBoundedListTypeDescriptor diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedMapTypeDescriptor.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedMapTypeDescriptor.java index 0a89f45b3..95a43540d 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedMapTypeDescriptor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedMapTypeDescriptor.java @@ -26,6 +26,6 @@ public interface IBoundedMapTypeDescriptor extends IMapTypeDescriptor, IBoundedT * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ } // IBoundedMapTypeDescriptor
\ No newline at end of file diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedTypeDescriptor.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedTypeDescriptor.java index 2d1e57c6d..9ff581ebc 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedTypeDescriptor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IBoundedTypeDescriptor.java @@ -7,6 +7,7 @@ package org.eclipse.jst.jsf.context.symbol; + /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>IBounded Type Descriptor</b></em>'. @@ -23,7 +24,7 @@ public interface IBoundedTypeDescriptor extends ITypeDescriptor { * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * <!-- begin-user-doc --> diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IComponentSymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IComponentSymbol.java index 7ef176269..74a1f5aba 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IComponentSymbol.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IComponentSymbol.java @@ -28,6 +28,6 @@ public interface IComponentSymbol extends IInstanceSymbol, IDescribedInDetail { * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ } // IComponentSymbol diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IDescribedInDetail.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IDescribedInDetail.java index c3a5b042d..91ca5baa5 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IDescribedInDetail.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IDescribedInDetail.java @@ -13,6 +13,11 @@ package org.eclipse.jst.jsf.context.symbol; + + + + + /** * Tags a symbol that has a detailed, user-readable description * @author cbateman @@ -24,7 +29,7 @@ public interface IDescribedInDetail { * <!-- end-user-doc -->s * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * @return the detailed description diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IInstanceSymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IInstanceSymbol.java index 0807c3196..c4494299d 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IInstanceSymbol.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IInstanceSymbol.java @@ -25,7 +25,7 @@ public interface IInstanceSymbol extends IObjectSymbol { * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * @return the type descriptor for this instance diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IJavaSymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IJavaSymbol.java index a2aea762b..6be9d68ae 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IJavaSymbol.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IJavaSymbol.java @@ -27,7 +27,7 @@ public interface IJavaSymbol extends ISymbol { * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * A IJavaElement may not exist for a symbol if it is synthetic at diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IJavaTypeDescriptor2.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IJavaTypeDescriptor2.java index 60547c7ed..1a6c5d4e3 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IJavaTypeDescriptor2.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IJavaTypeDescriptor2.java @@ -12,7 +12,6 @@ package org.eclipse.jst.jsf.context.symbol; import org.eclipse.emf.common.util.EList; - import org.eclipse.jdt.core.IType; /** @@ -40,7 +39,7 @@ public interface IJavaTypeDescriptor2 extends ITypeDescriptor { * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * Returns the value of the '<em><b>Type</b></em>' attribute. @@ -130,4 +129,14 @@ public interface IJavaTypeDescriptor2 extends ITypeDescriptor { */ void setArrayCount(int value); + /** + * <!-- begin-user-doc --> + * @param resolvedTypeSignature + * @return the resolved type or null. + * <!-- end-user-doc --> + * @model dataType="org.eclipse.jst.jsf.context.symbol.IType" + * @generated + */ + IType resolveType(String resolvedTypeSignature); + } // IJavaTypeDescriptor2 diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IListTypeDescriptor.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IListTypeDescriptor.java index 262769b8d..dd0a4b1e8 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IListTypeDescriptor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IListTypeDescriptor.java @@ -30,7 +30,7 @@ public interface IListTypeDescriptor extends ITypeDescriptor { * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * Returns the value of the '<em><b>List Source</b></em>' attribute. diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IMapTypeDescriptor.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IMapTypeDescriptor.java index 531827bd6..42c5ed9a7 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IMapTypeDescriptor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IMapTypeDescriptor.java @@ -36,7 +36,7 @@ public interface IMapTypeDescriptor extends ITypeDescriptor { * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * Returns the value of the '<em><b>Map Source</b></em>' attribute. diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IMethodSymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IMethodSymbol.java index 25f0b2844..c03b6d7d3 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IMethodSymbol.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IMethodSymbol.java @@ -34,7 +34,7 @@ public interface IMethodSymbol extends ISymbol { * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * Returns the value of the '<em><b>Signature</b></em>' attribute. diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IObjectSymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IObjectSymbol.java index 1217a0b29..590ceda84 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IObjectSymbol.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IObjectSymbol.java @@ -11,6 +11,8 @@ ********************************************************************************/ package org.eclipse.jst.jsf.context.symbol; +import org.eclipse.emf.common.util.EList; + /** * <!-- begin-user-doc --> @@ -36,7 +38,7 @@ public interface IObjectSymbol extends ISymbol { * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * Returns the value of the '<em><b>Type Descriptor</b></em>' reference. @@ -139,4 +141,19 @@ public interface IObjectSymbol extends ISymbol { */ ITypeDescriptor coerce(String typeSignature); + /** + * <!-- begin-user-doc --> + * @param methodName + * @param methodArguments + * @param symbolName + * @return a symbol resulting from calling the call or null if can't be determined. + * Generally, the symbolName should be used for the getName() value of the returned + * symbol, although implementers are not bound to this if a more meaningful value + * can be calculated. + * <!-- end-user-doc --> + * @model methodArgumentsType="org.eclipse.jst.jsf.common.internal.types.ValueType" methodArgumentsDataType="org.eclipse.jst.jsf.context.symbol.ValueType" methodArgumentsMany="true" + * @generated + */ + ISymbol call(String methodName, EList methodArguments, String symbolName); + } // IObjectSymbol diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IPropertySymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IPropertySymbol.java index 138c80b3f..e03074594 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IPropertySymbol.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/IPropertySymbol.java @@ -34,7 +34,7 @@ public interface IPropertySymbol extends IObjectSymbol { * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * Returns the value of the '<em><b>Intermediate</b></em>' attribute. diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ISymbol.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ISymbol.java index ca6dd90a8..37eb0cb15 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ISymbol.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ISymbol.java @@ -32,7 +32,7 @@ public interface ISymbol extends EObject { * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * @return the symbol's name diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ITypeDescriptor.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ITypeDescriptor.java index d93443983..0c46713cd 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ITypeDescriptor.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/ITypeDescriptor.java @@ -15,6 +15,8 @@ package org.eclipse.jst.jsf.context.symbol; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; +import org.eclipse.jdt.core.IJavaElement; +import org.eclipse.jdt.core.IType; /** * A generic descriptor for symbol information @@ -28,7 +30,7 @@ public interface ITypeDescriptor extends EObject { * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * Returns the value of the '<em><b>Properties</b></em>' reference list. @@ -137,6 +139,48 @@ public interface ITypeDescriptor extends EObject { EList getMethods(); /** + * Returns the value of the '<em><b>Type Parameter Signatures</b></em>' attribute list. + * The list contents are of type {@link java.lang.String}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Type Parameter Signatures</em>' attribute list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Type Parameter Signatures</em>' attribute list. + * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getITypeDescriptor_TypeParameterSignatures() + * @model type="java.lang.String" unique="false" transient="true" + * @generated + */ + EList getTypeParameterSignatures(); + + /** + * Returns the value of the '<em><b>Jdt Context</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Jdt Context</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Jdt Context</em>' attribute. + * @see #setJdtContext(IJavaElement) + * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#getITypeDescriptor_JdtContext() + * @model dataType="org.eclipse.jst.jsf.context.symbol.IJavaElement" + * @generated + */ + IJavaElement getJdtContext(); + + /** + * Sets the value of the '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getJdtContext <em>Jdt Context</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Jdt Context</em>' attribute. + * @see #getJdtContext() + * @generated + */ + void setJdtContext(IJavaElement value); + + /** * <!-- begin-user-doc --> * @param typeSignature * @return true if the type descriptor's underlying type would resolve true == (type instanceof typeSignature) @@ -166,4 +210,24 @@ public interface ITypeDescriptor extends EObject { */ IObjectSymbol getArrayElement(); + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @model dataType="org.eclipse.jst.jsf.context.symbol.IType" + * @generated + */ + IType resolveType(String resolvedTypeSignature); + + /** + * <!-- begin-user-doc --> + * @param methodName + * @param methodArgs + * @param symbolName + * @return a symbol or null if not handling + * <!-- end-user-doc --> + * @model methodArgsType="java.lang.String" methodArgsMany="true" + * @generated + */ + ISymbol calculateSyntheticCall(String methodName, EList methodArgs, String symbolName); + } diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/SymbolFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/SymbolFactory.java index 017ada4b6..8bc9a9f0f 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/SymbolFactory.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/SymbolFactory.java @@ -27,7 +27,7 @@ public interface SymbolFactory extends EFactory { * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * The singleton instance of the factory. diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/SymbolPackage.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/SymbolPackage.java index 4e0ccbfec..5fb541601 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/SymbolPackage.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/SymbolPackage.java @@ -1,14 +1,9 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html +/** + * <copyright> + * </copyright> * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ + * $Id: SymbolPackage.java,v 1.6 2007/05/07 17:30:19 cbateman Exp $ + */ package org.eclipse.jst.jsf.context.symbol; import org.eclipse.emf.ecore.EAttribute; @@ -39,7 +34,7 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - String copyright = "Copyright 2006 Oracle"; + String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * The package name. @@ -47,7 +42,7 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - String eNAME = "symbol"; + String eNAME = "symbol"; //$NON-NLS-1$ /** * The package namespace URI. @@ -55,7 +50,7 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - String eNS_URI = "http:///org/eclipse/jst/jsf/context/symbol.ecore"; + String eNS_URI = "http:///org/eclipse/jst/jsf/context/symbol.ecore"; //$NON-NLS-1$ /** * The package namespace name. @@ -63,7 +58,7 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - String eNS_PREFIX = "org.eclipse.jst.jsf.context.symbol"; + String eNS_PREFIX = "org.eclipse.jst.jsf.context.symbol"; //$NON-NLS-1$ /** * The singleton instance of the package. @@ -559,13 +554,31 @@ public interface SymbolPackage extends EPackage { int ITYPE_DESCRIPTOR__METHODS = 5; /** + * The feature id for the '<em><b>Type Parameter Signatures</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES = 6; + + /** + * The feature id for the '<em><b>Jdt Context</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ITYPE_DESCRIPTOR__JDT_CONTEXT = 7; + + /** * The number of structural features of the '<em>IType Descriptor</em>' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int ITYPE_DESCRIPTOR_FEATURE_COUNT = 6; + int ITYPE_DESCRIPTOR_FEATURE_COUNT = 8; /** * The meta object id for the '{@link org.eclipse.jst.jsf.context.symbol.IDescribedInDetail <em>IDescribed In Detail</em>}' class. @@ -651,6 +664,24 @@ public interface SymbolPackage extends EPackage { int IJAVA_TYPE_DESCRIPTOR2__METHODS = ITYPE_DESCRIPTOR__METHODS; /** + * The feature id for the '<em><b>Type Parameter Signatures</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int IJAVA_TYPE_DESCRIPTOR2__TYPE_PARAMETER_SIGNATURES = ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES; + + /** + * The feature id for the '<em><b>Jdt Context</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int IJAVA_TYPE_DESCRIPTOR2__JDT_CONTEXT = ITYPE_DESCRIPTOR__JDT_CONTEXT; + + /** * The feature id for the '<em><b>Type</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -879,6 +910,24 @@ public interface SymbolPackage extends EPackage { int IMAP_TYPE_DESCRIPTOR__METHODS = ITYPE_DESCRIPTOR__METHODS; /** + * The feature id for the '<em><b>Type Parameter Signatures</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int IMAP_TYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES = ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES; + + /** + * The feature id for the '<em><b>Jdt Context</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int IMAP_TYPE_DESCRIPTOR__JDT_CONTEXT = ITYPE_DESCRIPTOR__JDT_CONTEXT; + + /** * The feature id for the '<em><b>Map Source</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1007,6 +1056,24 @@ public interface SymbolPackage extends EPackage { int IBOUNDED_TYPE_DESCRIPTOR__METHODS = ITYPE_DESCRIPTOR__METHODS; /** + * The feature id for the '<em><b>Type Parameter Signatures</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int IBOUNDED_TYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES = ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES; + + /** + * The feature id for the '<em><b>Jdt Context</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int IBOUNDED_TYPE_DESCRIPTOR__JDT_CONTEXT = ITYPE_DESCRIPTOR__JDT_CONTEXT; + + /** * The number of structural features of the '<em>IBounded Type Descriptor</em>' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1080,6 +1147,24 @@ public interface SymbolPackage extends EPackage { int IBOUNDED_MAP_TYPE_DESCRIPTOR__METHODS = IMAP_TYPE_DESCRIPTOR__METHODS; /** + * The feature id for the '<em><b>Type Parameter Signatures</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int IBOUNDED_MAP_TYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES = IMAP_TYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES; + + /** + * The feature id for the '<em><b>Jdt Context</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int IBOUNDED_MAP_TYPE_DESCRIPTOR__JDT_CONTEXT = IMAP_TYPE_DESCRIPTOR__JDT_CONTEXT; + + /** * The feature id for the '<em><b>Map Source</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1171,6 +1256,24 @@ public interface SymbolPackage extends EPackage { int IBOUNDED_JAVA_TYPE_DESCRIPTOR__METHODS = IJAVA_TYPE_DESCRIPTOR2__METHODS; /** + * The feature id for the '<em><b>Type Parameter Signatures</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int IBOUNDED_JAVA_TYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES = IJAVA_TYPE_DESCRIPTOR2__TYPE_PARAMETER_SIGNATURES; + + /** + * The feature id for the '<em><b>Jdt Context</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int IBOUNDED_JAVA_TYPE_DESCRIPTOR__JDT_CONTEXT = IJAVA_TYPE_DESCRIPTOR2__JDT_CONTEXT; + + /** * The feature id for the '<em><b>Type</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1280,6 +1383,24 @@ public interface SymbolPackage extends EPackage { int ILIST_TYPE_DESCRIPTOR__METHODS = ITYPE_DESCRIPTOR__METHODS; /** + * The feature id for the '<em><b>Type Parameter Signatures</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ILIST_TYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES = ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES; + + /** + * The feature id for the '<em><b>Jdt Context</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ILIST_TYPE_DESCRIPTOR__JDT_CONTEXT = ITYPE_DESCRIPTOR__JDT_CONTEXT; + + /** * The feature id for the '<em><b>List Source</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1362,6 +1483,24 @@ public interface SymbolPackage extends EPackage { int IBOUNDED_LIST_TYPE_DESCRIPTOR__METHODS = ILIST_TYPE_DESCRIPTOR__METHODS; /** + * The feature id for the '<em><b>Type Parameter Signatures</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int IBOUNDED_LIST_TYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES = ILIST_TYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES; + + /** + * The feature id for the '<em><b>Jdt Context</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int IBOUNDED_LIST_TYPE_DESCRIPTOR__JDT_CONTEXT = ILIST_TYPE_DESCRIPTOR__JDT_CONTEXT; + + /** * The feature id for the '<em><b>List Source</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1409,6 +1548,16 @@ public interface SymbolPackage extends EPackage { */ int IJAVA_ELEMENT = 21; + /** + * The meta object id for the '<em>Value Type</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.common.internal.types.ValueType + * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getValueType() + * @generated + */ + int VALUE_TYPE = 22; + /** * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol <em>IBean Instance Symbol</em>}'. @@ -1614,6 +1763,28 @@ public interface SymbolPackage extends EPackage { EReference getITypeDescriptor_Methods(); /** + * Returns the meta object for the attribute list '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getTypeParameterSignatures <em>Type Parameter Signatures</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute list '<em>Type Parameter Signatures</em>'. + * @see org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getTypeParameterSignatures() + * @see #getITypeDescriptor() + * @generated + */ + EAttribute getITypeDescriptor_TypeParameterSignatures(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getJdtContext <em>Jdt Context</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Jdt Context</em>'. + * @see org.eclipse.jst.jsf.context.symbol.ITypeDescriptor#getJdtContext() + * @see #getITypeDescriptor() + * @generated + */ + EAttribute getITypeDescriptor_JdtContext(); + + /** * Returns the meta object for class '{@link org.eclipse.jst.jsf.context.symbol.IDescribedInDetail <em>IDescribed In Detail</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1919,6 +2090,17 @@ public interface SymbolPackage extends EPackage { EDataType getIJavaElement(); /** + * Returns the meta object for data type '{@link org.eclipse.jst.jsf.common.internal.types.ValueType <em>Value Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for data type '<em>Value Type</em>'. + * @see org.eclipse.jst.jsf.common.internal.types.ValueType + * @model instanceClass="org.eclipse.jst.jsf.common.internal.types.ValueType" + * @generated + */ + EDataType getValueType(); + + /** * Returns the factory that creates the instances of the model. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1939,7 +2121,7 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - interface Literals { + interface Literals { /** * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.internal.impl.IBeanInstanceSymbolImpl <em>IBean Instance Symbol</em>}' class. * <!-- begin-user-doc --> @@ -1948,7 +2130,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBeanInstanceSymbol() * @generated */ - @SuppressWarnings("hiding") EClass IBEAN_INSTANCE_SYMBOL = eINSTANCE.getIBeanInstanceSymbol(); /** @@ -1957,7 +2138,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EReference IBEAN_INSTANCE_SYMBOL__PROPERTIES = eINSTANCE.getIBeanInstanceSymbol_Properties(); /** @@ -1966,7 +2146,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EReference IBEAN_INSTANCE_SYMBOL__METHODS = eINSTANCE.getIBeanInstanceSymbol_Methods(); /** @@ -1977,7 +2156,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBeanPropertySymbol() * @generated */ - @SuppressWarnings("hiding") EClass IBEAN_PROPERTY_SYMBOL = eINSTANCE.getIBeanPropertySymbol(); /** @@ -1986,7 +2164,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EReference IBEAN_PROPERTY_SYMBOL__OWNER = eINSTANCE.getIBeanPropertySymbol_Owner(); /** @@ -1997,7 +2174,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIInstanceSymbol() * @generated */ - @SuppressWarnings("hiding") EClass IINSTANCE_SYMBOL = eINSTANCE.getIInstanceSymbol(); /** @@ -2006,7 +2182,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute IINSTANCE_SYMBOL__TYPE_RESOLVED = eINSTANCE.getIInstanceSymbol_TypeResolved(); /** @@ -2015,7 +2190,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute IINSTANCE_SYMBOL__RUNTIME_SOURCE = eINSTANCE.getIInstanceSymbol_RuntimeSource(); /** @@ -2026,7 +2200,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIJavaSymbol() * @generated */ - @SuppressWarnings("hiding") EClass IJAVA_SYMBOL = eINSTANCE.getIJavaSymbol(); /** @@ -2035,7 +2208,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute IJAVA_SYMBOL__JAVA_ELEMENT = eINSTANCE.getIJavaSymbol_JavaElement(); /** @@ -2046,7 +2218,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getISymbol() * @generated */ - @SuppressWarnings("hiding") EClass ISYMBOL = eINSTANCE.getISymbol(); /** @@ -2055,7 +2226,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute ISYMBOL__NAME = eINSTANCE.getISymbol_Name(); /** @@ -2066,7 +2236,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getITypeDescriptor() * @generated */ - @SuppressWarnings("hiding") EClass ITYPE_DESCRIPTOR = eINSTANCE.getITypeDescriptor(); /** @@ -2075,7 +2244,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EReference ITYPE_DESCRIPTOR__PROPERTIES = eINSTANCE.getITypeDescriptor_Properties(); /** @@ -2084,7 +2252,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute ITYPE_DESCRIPTOR__TYPE_SIGNATURE = eINSTANCE.getITypeDescriptor_TypeSignature(); /** @@ -2093,7 +2260,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute ITYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES = eINSTANCE.getITypeDescriptor_SuperTypeSignatures(); /** @@ -2102,7 +2268,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute ITYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES = eINSTANCE.getITypeDescriptor_InterfaceTypeSignatures(); /** @@ -2111,7 +2276,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE = eINSTANCE.getITypeDescriptor_TypeSignatureDelegate(); /** @@ -2120,10 +2284,25 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EReference ITYPE_DESCRIPTOR__METHODS = eINSTANCE.getITypeDescriptor_Methods(); /** + * The meta object literal for the '<em><b>Type Parameter Signatures</b></em>' attribute list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES = eINSTANCE.getITypeDescriptor_TypeParameterSignatures(); + + /** + * The meta object literal for the '<em><b>Jdt Context</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ITYPE_DESCRIPTOR__JDT_CONTEXT = eINSTANCE.getITypeDescriptor_JdtContext(); + + /** * The meta object literal for the '{@link org.eclipse.jst.jsf.context.symbol.IDescribedInDetail <em>IDescribed In Detail</em>}' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -2131,7 +2310,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIDescribedInDetail() * @generated */ - @SuppressWarnings("hiding") EClass IDESCRIBED_IN_DETAIL = eINSTANCE.getIDescribedInDetail(); /** @@ -2142,7 +2320,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIJavaTypeDescriptor2() * @generated */ - @SuppressWarnings("hiding") EClass IJAVA_TYPE_DESCRIPTOR2 = eINSTANCE.getIJavaTypeDescriptor2(); /** @@ -2151,7 +2328,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute IJAVA_TYPE_DESCRIPTOR2__TYPE = eINSTANCE.getIJavaTypeDescriptor2_Type(); /** @@ -2160,7 +2336,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EReference IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES = eINSTANCE.getIJavaTypeDescriptor2_BeanProperties(); /** @@ -2169,7 +2344,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EReference IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS = eINSTANCE.getIJavaTypeDescriptor2_BeanMethods(); /** @@ -2178,7 +2352,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT = eINSTANCE.getIJavaTypeDescriptor2_ArrayCount(); /** @@ -2189,7 +2362,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBeanMethodSymbol() * @generated */ - @SuppressWarnings("hiding") EClass IBEAN_METHOD_SYMBOL = eINSTANCE.getIBeanMethodSymbol(); /** @@ -2198,7 +2370,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EReference IBEAN_METHOD_SYMBOL__OWNER = eINSTANCE.getIBeanMethodSymbol_Owner(); /** @@ -2209,7 +2380,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIComponentSymbol() * @generated */ - @SuppressWarnings("hiding") EClass ICOMPONENT_SYMBOL = eINSTANCE.getIComponentSymbol(); /** @@ -2220,7 +2390,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIPropertySymbol() * @generated */ - @SuppressWarnings("hiding") EClass IPROPERTY_SYMBOL = eINSTANCE.getIPropertySymbol(); /** @@ -2229,7 +2398,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute IPROPERTY_SYMBOL__INTERMEDIATE = eINSTANCE.getIPropertySymbol_Intermediate(); /** @@ -2240,7 +2408,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIMapTypeDescriptor() * @generated */ - @SuppressWarnings("hiding") EClass IMAP_TYPE_DESCRIPTOR = eINSTANCE.getIMapTypeDescriptor(); /** @@ -2249,7 +2416,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute IMAP_TYPE_DESCRIPTOR__MAP_SOURCE = eINSTANCE.getIMapTypeDescriptor_MapSource(); /** @@ -2258,7 +2424,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute IMAP_TYPE_DESCRIPTOR__IMMUTABLE = eINSTANCE.getIMapTypeDescriptor_Immutable(); /** @@ -2269,7 +2434,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIMethodSymbol() * @generated */ - @SuppressWarnings("hiding") EClass IMETHOD_SYMBOL = eINSTANCE.getIMethodSymbol(); /** @@ -2278,7 +2442,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute IMETHOD_SYMBOL__SIGNATURE = eINSTANCE.getIMethodSymbol_Signature(); /** @@ -2289,7 +2452,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIObjectSymbol() * @generated */ - @SuppressWarnings("hiding") EClass IOBJECT_SYMBOL = eINSTANCE.getIObjectSymbol(); /** @@ -2298,7 +2460,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EReference IOBJECT_SYMBOL__TYPE_DESCRIPTOR = eINSTANCE.getIObjectSymbol_TypeDescriptor(); /** @@ -2307,7 +2468,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute IOBJECT_SYMBOL__READABLE = eINSTANCE.getIObjectSymbol_Readable(); /** @@ -2316,7 +2476,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute IOBJECT_SYMBOL__WRITABLE = eINSTANCE.getIObjectSymbol_Writable(); /** @@ -2327,7 +2486,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBoundedTypeDescriptor() * @generated */ - @SuppressWarnings("hiding") EClass IBOUNDED_TYPE_DESCRIPTOR = eINSTANCE.getIBoundedTypeDescriptor(); /** @@ -2338,7 +2496,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBoundedMapTypeDescriptor() * @generated */ - @SuppressWarnings("hiding") EClass IBOUNDED_MAP_TYPE_DESCRIPTOR = eINSTANCE.getIBoundedMapTypeDescriptor(); /** @@ -2349,7 +2506,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBoundedJavaTypeDescriptor() * @generated */ - @SuppressWarnings("hiding") EClass IBOUNDED_JAVA_TYPE_DESCRIPTOR = eINSTANCE.getIBoundedJavaTypeDescriptor(); /** @@ -2360,7 +2516,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIListTypeDescriptor() * @generated */ - @SuppressWarnings("hiding") EClass ILIST_TYPE_DESCRIPTOR = eINSTANCE.getIListTypeDescriptor(); /** @@ -2369,7 +2524,6 @@ public interface SymbolPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") EAttribute ILIST_TYPE_DESCRIPTOR__LIST_SOURCE = eINSTANCE.getIListTypeDescriptor_ListSource(); /** @@ -2380,7 +2534,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIBoundedListTypeDescriptor() * @generated */ - @SuppressWarnings("hiding") EClass IBOUNDED_LIST_TYPE_DESCRIPTOR = eINSTANCE.getIBoundedListTypeDescriptor(); /** @@ -2391,7 +2544,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getERuntimeSource() * @generated */ - @SuppressWarnings("hiding") EEnum ERUNTIME_SOURCE = eINSTANCE.getERuntimeSource(); /** @@ -2402,7 +2554,6 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIType() * @generated */ - @SuppressWarnings("hiding") EDataType ITYPE = eINSTANCE.getIType(); /** @@ -2413,9 +2564,18 @@ public interface SymbolPackage extends EPackage { * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getIJavaElement() * @generated */ - @SuppressWarnings("hiding") EDataType IJAVA_ELEMENT = eINSTANCE.getIJavaElement(); + /** + * The meta object literal for the '<em>Value Type</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.common.internal.types.ValueType + * @see org.eclipse.jst.jsf.context.symbol.internal.impl.SymbolPackageImpl#getValueType() + * @generated + */ + EDataType VALUE_TYPE = eINSTANCE.getValueType(); + } } //SymbolPackage diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanInstanceSymbolImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanInstanceSymbolImpl.java index c143aff26..3872020fe 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanInstanceSymbolImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanInstanceSymbolImpl.java @@ -21,6 +21,7 @@ import org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol; import org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor; import org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor; import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; +import org.eclipse.jst.jsf.context.symbol.ISymbol; import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; import org.eclipse.jst.jsf.context.symbol.SymbolFactory; import org.eclipse.jst.jsf.context.symbol.SymbolPackage; @@ -45,8 +46,7 @@ public class IBeanInstanceSymbolImpl extends IInstanceSymbolImpl implements IBea * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * A detailed description (human readable) about this instance symbol @@ -223,6 +223,7 @@ public class IBeanInstanceSymbolImpl extends IInstanceSymbolImpl implements IBea { IBoundedListTypeDescriptor listDesc = SymbolFactory.eINSTANCE.createIBoundedListTypeDescriptor(); + // bean maps are generally writable listDesc.setListSource(new BasicEList()); // give it an empty list return listDesc; @@ -232,4 +233,15 @@ public class IBeanInstanceSymbolImpl extends IInstanceSymbolImpl implements IBea return null; } + /** (non-Javadoc) + * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IPropertySymbolImpl#call(java.lang.String, org.eclipse.emf.common.util.EList, java.lang.String) + * + * @generated NOT + */ + public ISymbol call(String methodName, EList methodArguments, + String symbolName) + { + return Util.call(methodName, methodArguments, symbolName, getTypeDescriptor()); + } + } //IBeanInstanceSymbolImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanMethodSymbolImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanMethodSymbolImpl.java index 938c7453d..0db98fa80 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanMethodSymbolImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanMethodSymbolImpl.java @@ -44,7 +44,7 @@ public class IBeanMethodSymbolImpl extends EObjectImpl implements IBeanMethodSym * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * The default value of the '{@link #getName() <em>Name</em>}' attribute. diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanPropertySymbolImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanPropertySymbolImpl.java index cd611a315..3204c5df1 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanPropertySymbolImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBeanPropertySymbolImpl.java @@ -14,14 +14,18 @@ package org.eclipse.jst.jsf.context.symbol.internal.impl; import java.util.HashMap; import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.jdt.core.IJavaElement; +import org.eclipse.jdt.core.Signature; import org.eclipse.jst.jsf.common.internal.types.TypeConstants; import org.eclipse.jst.jsf.context.symbol.IBeanPropertySymbol; import org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor; import org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor; import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; +import org.eclipse.jst.jsf.context.symbol.ISymbol; import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; import org.eclipse.jst.jsf.context.symbol.SymbolFactory; import org.eclipse.jst.jsf.context.symbol.SymbolPackage; @@ -45,8 +49,8 @@ public class IBeanPropertySymbolImpl extends IPropertySymbolImpl implements IBea * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ + /** * The cached value of the '{@link #getOwner() <em>Owner</em>}' reference. @@ -222,11 +226,14 @@ public class IBeanPropertySymbolImpl extends IPropertySymbolImpl implements IBea /** * @generated NOT */ - public ITypeDescriptor coerce(String typeSignature) + public ITypeDescriptor coerce(final String typeSignature) { + // ensure that we have an erased version + final String erasedTypeSignature = Signature.getTypeErasure(typeSignature); + if (supportsCoercion(typeSignature)) { - if (TypeConstants.TYPE_MAP.equals(typeSignature)) + if (TypeConstants.TYPE_MAP.equals(erasedTypeSignature)) { IBoundedMapTypeDescriptor mapDesc = SymbolFactory.eINSTANCE.createIBoundedMapTypeDescriptor(); @@ -235,10 +242,12 @@ public class IBeanPropertySymbolImpl extends IPropertySymbolImpl implements IBea mapDesc.setMapSource(new HashMap()); // give it an empty map return mapDesc; } - else if (TypeConstants.TYPE_LIST.equals(typeSignature)) + else if (TypeConstants.TYPE_LIST.equals(erasedTypeSignature)) { IBoundedListTypeDescriptor listDesc = SymbolFactory.eINSTANCE.createIBoundedListTypeDescriptor(); + listDesc.setJdtContext(deriveBestJdtContext()); + // bean maps are generally writable return listDesc; } @@ -248,6 +257,50 @@ public class IBeanPropertySymbolImpl extends IPropertySymbolImpl implements IBea } + private IJavaElement deriveBestJdtContext() + { + IJavaElement contextElement = null; + if (getTypeDescriptor() instanceof IJavaTypeDescriptor2) + { + contextElement = + ((IJavaTypeDescriptor2)getTypeDescriptor()).getType(); + } + + if (contextElement == null) + { + contextElement = getTypeDescriptor().getJdtContext(); + } + + return contextElement; + } + + /** (non-Javadoc) + * @see org.eclipse.jst.jsf.context.symbol.internal.impl.IPropertySymbolImpl#call(java.lang.String, org.eclipse.emf.common.util.EList, java.lang.String) + * + * @generated NOT + */ + public ISymbol call(String methodName, EList methodArguments, + String symbolName) + { + return Util.call(methodName, methodArguments, symbolName, getTypeDescriptor()); + } + + +// private List convertArgsToSignatures(List methodArgs) +// { +// List args = new ArrayList(); +// +// for (final Iterator it = methodArgs.iterator(); it.hasNext();) +// { +// Object arg = it.next(); +// String className = arg.getClass().getName(); +// String resolvedName = Signature.createTypeSignature(className, true); +// args.add(resolvedName); +// } +// +// return args; +// } + /** * @generated NOT */ @@ -259,11 +312,11 @@ public class IBeanPropertySymbolImpl extends IPropertySymbolImpl implements IBea // for java bean instances, we need to minimally support // Map, List and Array to conform to the basic spec // for JSF EL - if (TypeConstants.TYPE_MAP.equals(typeSignature)) + if (TypeConstants.TYPE_MAP.equals(Signature.getTypeErasure(typeSignature))) { return true; } - else if (TypeConstants.TYPE_LIST.equals(typeSignature)) + else if (TypeConstants.TYPE_LIST.equals(Signature.getTypeErasure(typeSignature))) { return true; } diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedJavaTypeDescriptorImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedJavaTypeDescriptorImpl.java index ed338575c..ecc18ca0f 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedJavaTypeDescriptorImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedJavaTypeDescriptorImpl.java @@ -2,10 +2,11 @@ * <copyright> * </copyright> * - * $Id: IBoundedJavaTypeDescriptorImpl.java,v 1.6 2007/04/26 00:08:52 cbateman Exp $ + * $Id: IBoundedJavaTypeDescriptorImpl.java,v 1.7 2007/05/07 17:30:20 cbateman Exp $ */ package org.eclipse.jst.jsf.context.symbol.internal.impl; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.jdt.core.Signature; import org.eclipse.jst.jsf.common.internal.types.TypeConstants; @@ -30,8 +31,7 @@ public class IBoundedJavaTypeDescriptorImpl extends IJavaTypeDescriptor2Impl imp * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * <!-- begin-user-doc --> @@ -80,14 +80,18 @@ public class IBoundedJavaTypeDescriptorImpl extends IJavaTypeDescriptor2Impl imp propSymbol.setReadable(true); IBoundedJavaTypeDescriptor typeDesc = SymbolFactory.eINSTANCE.createIBoundedJavaTypeDescriptor(); - + typeDesc.setTypeSignatureDelegate(TypeConstants.TYPE_JAVAOBJECT); propSymbol.setTypeDescriptor(typeDesc); retValue = propSymbol; } - - return retValue; + return retValue; } + public ISymbol calculateSyntheticCall(String methodName, EList methodArgs, + String symbolName) + { + return getUnboundedProperty(symbolName, TypeConstants.TYPE_JAVAOBJECT); + } } //IBoundedJavaTypeDescriptorImpl
\ No newline at end of file diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedListTypeDescriptorImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedListTypeDescriptorImpl.java index f6fcc8dd8..4dd73dc44 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedListTypeDescriptorImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedListTypeDescriptorImpl.java @@ -2,14 +2,26 @@ * <copyright> * </copyright> * - * $Id: IBoundedListTypeDescriptorImpl.java,v 1.3 2007/04/26 00:08:52 cbateman Exp $ + * $Id: IBoundedListTypeDescriptorImpl.java,v 1.4 2007/05/07 17:30:20 cbateman Exp $ */ package org.eclipse.jst.jsf.context.symbol.internal.impl; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; +import org.eclipse.jdt.core.IMethod; +import org.eclipse.jdt.core.IType; +import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.Signature; +import org.eclipse.jst.jsf.common.JSFCommonPlugin; import org.eclipse.jst.jsf.common.internal.types.TypeConstants; +import org.eclipse.jst.jsf.common.util.JDTBeanIntrospector; +import org.eclipse.jst.jsf.common.util.TypeUtil; import org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor; +import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; import org.eclipse.jst.jsf.context.symbol.ISymbol; import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; @@ -32,8 +44,7 @@ public class IBoundedListTypeDescriptorImpl extends IListTypeDescriptorImpl impl * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * <!-- begin-user-doc --> @@ -98,6 +109,112 @@ public class IBoundedListTypeDescriptorImpl extends IListTypeDescriptorImpl impl } /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public ISymbol call(String methodName, EList methodArguments, String symbolName) + { + ISymbol result = null; + final IType type = resolveType(getTypeSignature()); + + if (type != null) + { + final JDTBeanIntrospector introspector = + new JDTBeanIntrospector(type); + + final IMethod callMethod = + matchMethod(methodName, methodArguments, introspector.getAllMethods()); + + if (callMethod != null) + { + try + { + // resolve the method's return type; don't erase parameters + final String retTypeSignature = + TypeUtil.resolveTypeSignature + (type, callMethod.getReturnType(), false) ; + + final IPropertySymbol propSymbol = + SymbolFactory.eINSTANCE.createIPropertySymbol(); + + // TODO: there is a possible problem here for non-string keyed maps + propSymbol.setName(symbolName.toString()); + propSymbol.setReadable(true); + IJavaTypeDescriptor2 typeDesc = + SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2(); + + typeDesc.setArrayCount(Signature.getArrayCount(retTypeSignature)); + + // may be null + typeDesc.setType(resolveType(retTypeSignature)); + typeDesc.setTypeSignatureDelegate(retTypeSignature); + propSymbol.setTypeDescriptor(typeDesc); + result = propSymbol; + } + catch (JavaModelException e) + { + JSFCommonPlugin.log(e); + // fall-through and return null result + } + } + } + + return result; + } + + private IMethod matchMethod(String name, List methodArguments, IMethod[] allMethods) + { + final List argSigs = convertArgsToSignatures(methodArguments); + IMethod matchedMethod = null; + + for (int i = 0; i < allMethods.length; i++) + { + final IMethod method = allMethods[i]; + + // check for names and argument count match + if (method.getParameterTypes().length == argSigs.size() + && method.getElementName().equals(name)) + { + String[] methods = method.getParameterTypes(); + // need to verify argument matches + boolean isMatched = true; + CHECK_ARGUMENTS: for (int j = 0; j < methods.length; j++) + { + if (!methods[j].equals(argSigs.get(j))) + { + // not a match + isMatched = false; + break CHECK_ARGUMENTS; + } + } + + if (isMatched) + { + return method; + } + } + } + + return matchedMethod; + } + + private List convertArgsToSignatures(List methodArgs) + { + List args = new ArrayList(); + + for (final Iterator it = methodArgs.iterator(); it.hasNext();) + { + Object arg = it.next(); + String className = arg.getClass().getName(); + String resolvedName = Signature.createTypeSignature(className, true); + args.add(resolvedName); + } + + return args; + } + + /** * @return the ITypeDescriptor for this List's element type (bound type). * Defaults to java.lang.Object if no bounds or can't resolve bounds * @@ -105,12 +222,12 @@ public class IBoundedListTypeDescriptorImpl extends IListTypeDescriptorImpl impl */ private ITypeDescriptor getBoundsTypeDescriptor(int offset) { - ITypeDescriptor typeDesc = null; + IJavaTypeDescriptor2 typeDesc = null; - String[] bounds = Signature.getTypeArguments(getTypeSignature()); + List typeParameters = getTypeParameterSignatures(); // if no bounds at all, then default to bounded java object - if (bounds.length == 0) + if (typeParameters.size() == 0) { typeDesc = SymbolFactory.eINSTANCE.createIBoundedJavaTypeDescriptor(); @@ -119,9 +236,19 @@ public class IBoundedListTypeDescriptorImpl extends IListTypeDescriptorImpl impl } else { - // do nothing for now + // TODO: there should only be exactly one on a list... + final String elementType = (String) typeParameters.get(0); + + typeDesc = + SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2(); + + typeDesc.setArrayCount(Signature.getArrayCount(elementType)); + + // may be null + typeDesc.setType(resolveType(elementType)); + typeDesc.setTypeSignatureDelegate(elementType); } - + return typeDesc; } } //IBoundedListTypeDescriptorImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedMapTypeDescriptorImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedMapTypeDescriptorImpl.java index 3d14762ec..fd71c5a75 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedMapTypeDescriptorImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IBoundedMapTypeDescriptorImpl.java @@ -2,15 +2,17 @@ * <copyright> * </copyright> * - * $Id: IBoundedMapTypeDescriptorImpl.java,v 1.5 2007/04/26 00:08:52 cbateman Exp $ + * $Id: IBoundedMapTypeDescriptorImpl.java,v 1.6 2007/05/07 17:30:20 cbateman Exp $ */ package org.eclipse.jst.jsf.context.symbol.internal.impl; import java.util.Iterator; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.jdt.core.Signature; import org.eclipse.jst.jsf.common.internal.types.TypeConstants; +import org.eclipse.jst.jsf.common.internal.types.ValueType; import org.eclipse.jst.jsf.context.symbol.IBoundedJavaTypeDescriptor; import org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor; import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; @@ -33,8 +35,7 @@ public class IBoundedMapTypeDescriptorImpl extends IMapTypeDescriptorImpl implem * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * <!-- begin-user-doc --> @@ -99,7 +100,23 @@ public class IBoundedMapTypeDescriptorImpl extends IMapTypeDescriptorImpl implem } - + /** + * @see org.eclipse.jst.jsf.context.symbol.internal.impl.ITypeDescriptorImpl#calculateSyntheticCall(java.lang.String, org.eclipse.emf.common.util.EList, java.lang.String) + * @generated NOT + */ + public ISymbol calculateSyntheticCall(String methodName, EList methodArgs, + String symbolName) { + if ("get".equals(methodName) //$NON-NLS-1$ + && methodArgs.size() == 1) + { + return getUnboundedProperty(symbolName, ((ValueType) methodArgs.get(0)).getSignature()); + } + + // default is return null + return null; + } + + /** * @generated NOT */ diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IComponentSymbolImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IComponentSymbolImpl.java index 9d1b24dea..1a57a3938 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IComponentSymbolImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IComponentSymbolImpl.java @@ -32,8 +32,7 @@ public class IComponentSymbolImpl extends IInstanceSymbolImpl implements ICompon * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * A human readable description of this symbol diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IInstanceSymbolImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IInstanceSymbolImpl.java index dd70efe59..bc868c512 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IInstanceSymbolImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IInstanceSymbolImpl.java @@ -12,6 +12,7 @@ package org.eclipse.jst.jsf.context.symbol.internal.impl; import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; @@ -19,6 +20,7 @@ import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.jst.jsf.common.internal.types.TypeConstants; import org.eclipse.jst.jsf.context.symbol.ERuntimeSource; import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol; +import org.eclipse.jst.jsf.context.symbol.ISymbol; import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; import org.eclipse.jst.jsf.context.symbol.SymbolPackage; @@ -47,7 +49,7 @@ public class IInstanceSymbolImpl extends EObjectImpl implements IInstanceSymbol * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * The default value of the '{@link #getName() <em>Name</em>}' attribute. @@ -357,6 +359,15 @@ public class IInstanceSymbolImpl extends EObjectImpl implements IInstanceSymbol /** * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public ISymbol call(String methodName, EList methodArguments, String symbolName) { + return Util.call(methodName,methodArguments,symbolName,getTypeDescriptor()); + } + + /** + * <!-- begin-user-doc --> * @param featureID * @param resolve * @param coreType @@ -473,13 +484,13 @@ public class IInstanceSymbolImpl extends EObjectImpl implements IInstanceSymbol if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); + result.append(" (name: "); //$NON-NLS-1$ result.append(name); - result.append(", readable: "); + result.append(", readable: "); //$NON-NLS-1$ result.append(readable); - result.append(", writable: "); + result.append(", writable: "); //$NON-NLS-1$ result.append(writable); - result.append(", runtimeSource: "); + result.append(", runtimeSource: "); //$NON-NLS-1$ result.append(runtimeSource); result.append(')'); return result.toString(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaSymbolImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaSymbolImpl.java index 5cbf1ddf3..32d8de6b8 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaSymbolImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaSymbolImpl.java @@ -40,7 +40,7 @@ public class IJavaSymbolImpl extends EObjectImpl implements IJavaSymbol { * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * The default value of the '{@link #getName() <em>Name</em>}' attribute. diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaTypeDescriptor2Impl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaTypeDescriptor2Impl.java index 707e4d43e..15c550cce 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaTypeDescriptor2Impl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaTypeDescriptor2Impl.java @@ -25,6 +25,8 @@ import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.jdt.core.Flags; +import org.eclipse.jdt.core.IJavaElement; +import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IMethod; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.ITypeHierarchy; @@ -66,8 +68,7 @@ public class IJavaTypeDescriptor2Impl extends ITypeDescriptorImpl implements IJa * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * The default value of the '{@link #getType() <em>Type</em>}' attribute. @@ -114,6 +115,26 @@ public class IJavaTypeDescriptor2Impl extends ITypeDescriptorImpl implements IJa protected int arrayCount = ARRAY_COUNT_EDEFAULT; /** + * The default value of the '{@link #getJdtContext() <em>Jdt Context</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getJdtContext() + * @generated + * @ordered + */ + protected static final IJavaElement JDT_CONTEXT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getJdtContext() <em>Jdt Context</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getJdtContext() + * @generated + * @ordered + */ + protected IJavaElement jdtContext = JDT_CONTEXT_EDEFAULT; + + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated @@ -275,7 +296,153 @@ public class IJavaTypeDescriptor2Impl extends ITypeDescriptorImpl implements IJa eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT, oldArrayCount, arrayCount)); } - public boolean isArray() + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IJavaElement getJdtContext() { + return jdtContext; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setJdtContext(IJavaElement newJdtContext) { + IJavaElement oldJdtContext = jdtContext; + jdtContext = newJdtContext; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__JDT_CONTEXT, oldJdtContext, jdtContext)); + } + + /** + * <!-- begin-user-doc --> + * + * Tries to load an IType for a fully resolved (i.e. starts with L not Q) + * type signature using the current jdtContext. + * + * @return the resolved IType or null if none could be resolved. + * + * <!-- end-user-doc --> + * @generated NOT + */ + public IType resolveType(String resolvedTypeSignature) + { + IType resolvedType = null; + + // we need to obtain an IJavaProject within which to resolve + // the type. + IJavaProject project = null; + + // first, see if we have an IType + if (getType() != null) + { + project = getType().getJavaProject(); + + if (project != null) + { + resolvedType = TypeUtil.resolveType(project, resolvedTypeSignature); + } + } + + // if not, see if a jdtContext hint has been set + if (resolvedType == null && getJdtContext() != null) + { + resolvedType = super.resolveType(resolvedTypeSignature); + } + + return resolvedType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__TYPE: + return getType(); + case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES: + return getBeanProperties(); + case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS: + return getBeanMethods(); + case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT: + return new Integer(getArrayCount()); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__TYPE: + setType((IType)newValue); + return; + case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES: + getBeanProperties().clear(); + getBeanProperties().addAll((Collection)newValue); + return; + case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS: + getBeanMethods().clear(); + getBeanMethods().addAll((Collection)newValue); + return; + case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT: + setArrayCount(((Integer)newValue).intValue()); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void eUnset(int featureID) { + switch (featureID) { + case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__TYPE: + setType(TYPE_EDEFAULT); + return; + case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES: + getBeanProperties().clear(); + return; + case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS: + getBeanMethods().clear(); + return; + case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT: + setArrayCount(ARRAY_COUNT_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean eIsSet(int featureID) { + switch (featureID) { + case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES: + return !getBeanProperties().isEmpty(); + case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS: + return !getBeanMethods().isEmpty(); + case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT: + return arrayCount != ARRAY_COUNT_EDEFAULT; + } + return super.eIsSet(featureID); + } + + public boolean isArray() { return getArrayCount() > 0; } @@ -388,6 +555,7 @@ public class IJavaTypeDescriptor2Impl extends ITypeDescriptorImpl implements IJa workingCopy.setWritable(property.isWritable()); workingCopyDesc.setArrayCount(property.getArrayCount()); + workingCopyDesc.getTypeParameterSignatures().addAll(property.getTypeParameterSignatures()); final IType newType = property.getType(); final String signature = property.getTypeSignature(); @@ -425,8 +593,8 @@ public class IJavaTypeDescriptor2Impl extends ITypeDescriptorImpl implements IJa // to be a bean method, it must not a constructor, must be public // and must not be static if (!method.isConstructor() - && (method.getFlags() & Flags.AccPublic) != 0 - && (method.getFlags() & Flags.AccStatic) == 0) + && Flags.isPublic(method.getFlags()) + && !Flags.isStatic(method.getFlags())) { String methodName = method.getElementName(); IBeanMethodSymbol workingCopy = SymbolFactory.eINSTANCE.createIBeanMethodSymbol(); @@ -449,100 +617,6 @@ public class IJavaTypeDescriptor2Impl extends ITypeDescriptorImpl implements IJa return methodSymbols; } - /** - * <!-- begin-user-doc --> - * @param featureID - * @param resolve - * @param coreType - * @return the value of featureID - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__TYPE: - return getType(); - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES: - return getBeanProperties(); - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS: - return getBeanMethods(); - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT: - return new Integer(getArrayCount()); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @param newValue - * <!-- end-user-doc --> - * @generated - */ - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__TYPE: - setType((IType)newValue); - return; - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES: - getBeanProperties().clear(); - getBeanProperties().addAll((Collection)newValue); - return; - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS: - getBeanMethods().clear(); - getBeanMethods().addAll((Collection)newValue); - return; - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT: - setArrayCount(((Integer)newValue).intValue()); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * <!-- end-user-doc --> - * @generated - */ - public void eUnset(int featureID) { - switch (featureID) { - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__TYPE: - setType(TYPE_EDEFAULT); - return; - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES: - getBeanProperties().clear(); - return; - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS: - getBeanMethods().clear(); - return; - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT: - setArrayCount(ARRAY_COUNT_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * @param featureID - * @return true if the feature is set - * <!-- end-user-doc --> - * @generated - */ - public boolean eIsSet(int featureID) { - switch (featureID) { - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__TYPE: - return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES: - return !getBeanProperties().isEmpty(); - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS: - return !getBeanMethods().isEmpty(); - case SymbolPackage.IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT: - return arrayCount != ARRAY_COUNT_EDEFAULT; - } - return super.eIsSet(featureID); - } /** * <!-- begin-user-doc --> diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IListTypeDescriptorImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IListTypeDescriptorImpl.java index a8697eb20..4148df950 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IListTypeDescriptorImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IListTypeDescriptorImpl.java @@ -2,7 +2,7 @@ * <copyright> * </copyright> * - * $Id: IListTypeDescriptorImpl.java,v 1.3 2007/04/26 00:20:19 cbateman Exp $ + * $Id: IListTypeDescriptorImpl.java,v 1.4 2007/05/07 17:30:20 cbateman Exp $ */ package org.eclipse.jst.jsf.context.symbol.internal.impl; @@ -39,8 +39,7 @@ public class IListTypeDescriptorImpl extends ITypeDescriptorImpl implements ILis * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * The default value of the '{@link #getListSource() <em>List Source</em>}' attribute. @@ -164,7 +163,7 @@ public class IListTypeDescriptorImpl extends ITypeDescriptorImpl implements ILis if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (listSource: "); + result.append(" (listSource: "); //$NON-NLS-1$ result.append(listSource); result.append(')'); return result.toString(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMapTypeDescriptorImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMapTypeDescriptorImpl.java index 6e5c1908d..31e61710e 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMapTypeDescriptorImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMapTypeDescriptorImpl.java @@ -24,6 +24,7 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.Signature; +import org.eclipse.jst.jsf.common.internal.types.TypeConstants; import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol; import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; import org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor; @@ -53,8 +54,7 @@ public class IMapTypeDescriptorImpl extends ITypeDescriptorImpl implements IMapT * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * The default value of the '{@link #getMapSource() <em>Map Source</em>}' attribute. @@ -175,7 +175,7 @@ public class IMapTypeDescriptorImpl extends ITypeDescriptorImpl implements IMapT } // otherwise use Map - return "Ljava.util.Map;"; + return TypeConstants.TYPE_MAP; } public EList getInterfaceTypeSignatures() { @@ -227,7 +227,7 @@ public class IMapTypeDescriptorImpl extends ITypeDescriptorImpl implements IMapT for (final Iterator it = keys.iterator(); it.hasNext();) { final String key = (String) it.next(); - final String segments[] = key.split("\\."); + final String segments[] = key.split("\\."); //$NON-NLS-1$ IPropertySymbol property = (IPropertySymbol) segmentMap.get(segments[0]); @@ -382,9 +382,9 @@ public class IMapTypeDescriptorImpl extends ITypeDescriptorImpl implements IMapT if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (mapSource: "); + result.append(" (mapSource: "); //$NON-NLS-1$ result.append(mapSource); - result.append(", immutable: "); + result.append(", immutable: "); //$NON-NLS-1$ result.append(immutable); result.append(')'); return result.toString(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMethodSymbolImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMethodSymbolImpl.java index 817805553..2e9a75ed6 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMethodSymbolImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IMethodSymbolImpl.java @@ -38,7 +38,7 @@ public class IMethodSymbolImpl extends EObjectImpl implements IMethodSymbol { * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * The default value of the '{@link #getName() <em>Name</em>}' attribute. @@ -228,9 +228,9 @@ public class IMethodSymbolImpl extends EObjectImpl implements IMethodSymbol { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); + result.append(" (name: "); //$NON-NLS-1$ result.append(name); - result.append(", signature: "); + result.append(", signature: "); //$NON-NLS-1$ result.append(signature); result.append(')'); return result.toString(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IPropertySymbolImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IPropertySymbolImpl.java index 5885bc29a..64d314e7e 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IPropertySymbolImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/IPropertySymbolImpl.java @@ -12,11 +12,13 @@ package org.eclipse.jst.jsf.context.symbol.internal.impl; import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; +import org.eclipse.jst.jsf.context.symbol.ISymbol; import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; import org.eclipse.jst.jsf.context.symbol.SymbolPackage; @@ -44,7 +46,7 @@ public class IPropertySymbolImpl extends EObjectImpl implements IPropertySymbol * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * The default value of the '{@link #getName() <em>Name</em>}' attribute. @@ -329,6 +331,17 @@ public class IPropertySymbolImpl extends EObjectImpl implements IPropertySymbol /** * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ISymbol call(String methodName, EList methodArguments, String symbolName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> * @param featureID * @param resolve * @param coreType @@ -441,13 +454,13 @@ public class IPropertySymbolImpl extends EObjectImpl implements IPropertySymbol if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); + result.append(" (name: "); //$NON-NLS-1$ result.append(name); - result.append(", readable: "); + result.append(", readable: "); //$NON-NLS-1$ result.append(readable); - result.append(", writable: "); + result.append(", writable: "); //$NON-NLS-1$ result.append(writable); - result.append(", intermediate: "); + result.append(", intermediate: "); //$NON-NLS-1$ result.append(intermediate); result.append(')'); return result.toString(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/ITypeDescriptorImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/ITypeDescriptorImpl.java index fc9bdc2ac..214adc313 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/ITypeDescriptorImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/ITypeDescriptorImpl.java @@ -19,8 +19,14 @@ import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EDataTypeEList; +import org.eclipse.jdt.core.IJavaElement; +import org.eclipse.jdt.core.IJavaProject; +import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.Signature; +import org.eclipse.jst.jsf.common.util.TypeUtil; import org.eclipse.jst.jsf.context.symbol.IObjectSymbol; +import org.eclipse.jst.jsf.context.symbol.ISymbol; import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; import org.eclipse.jst.jsf.context.symbol.SymbolPackage; @@ -48,7 +54,7 @@ public abstract class ITypeDescriptorImpl extends EObjectImpl implements ITypeDe * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * The default value of the '{@link #getTypeSignature() <em>Type Signature</em>}' attribute. @@ -58,7 +64,7 @@ public abstract class ITypeDescriptorImpl extends EObjectImpl implements ITypeDe * @generated * @ordered */ - protected static final String TYPE_SIGNATURE_EDEFAULT = ""; + protected static final String TYPE_SIGNATURE_EDEFAULT = ""; //$NON-NLS-1$ /** * The default value of the '{@link #getTypeSignatureDelegate() <em>Type Signature Delegate</em>}' attribute. @@ -81,6 +87,36 @@ public abstract class ITypeDescriptorImpl extends EObjectImpl implements ITypeDe protected String typeSignatureDelegate = TYPE_SIGNATURE_DELEGATE_EDEFAULT; /** + * The cached value of the '{@link #getTypeParameterSignatures() <em>Type Parameter Signatures</em>}' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTypeParameterSignatures() + * @generated + * @ordered + */ + protected EList typeParameterSignatures; + + /** + * The default value of the '{@link #getJdtContext() <em>Jdt Context</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getJdtContext() + * @generated + * @ordered + */ + protected static final IJavaElement JDT_CONTEXT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getJdtContext() <em>Jdt Context</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getJdtContext() + * @generated + * @ordered + */ + protected IJavaElement jdtContext = JDT_CONTEXT_EDEFAULT; + + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated @@ -166,6 +202,39 @@ public abstract class ITypeDescriptorImpl extends EObjectImpl implements ITypeDe /** * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList getTypeParameterSignatures() { + if (typeParameterSignatures == null) { + typeParameterSignatures = new EDataTypeEList(String.class, this, SymbolPackage.ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES); + } + return typeParameterSignatures; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IJavaElement getJdtContext() { + return jdtContext; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setJdtContext(IJavaElement newJdtContext) { + IJavaElement oldJdtContext = jdtContext; + jdtContext = newJdtContext; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SymbolPackage.ITYPE_DESCRIPTOR__JDT_CONTEXT, oldJdtContext, jdtContext)); + } + + /** + * <!-- begin-user-doc --> * Note about generics: * * This call mimics the runtime instanceOf to the degree possible. @@ -179,8 +248,8 @@ public abstract class ITypeDescriptorImpl extends EObjectImpl implements ITypeDe { final String typeErasedSignature = Signature.getTypeErasure(typeSignature); - if (getTypeSignature() != null - && getTypeSignature().equals(typeErasedSignature)) + if (Signature.getTypeErasure(getTypeSignature()) != null + && Signature.getTypeErasure(getTypeSignature()).equals(typeErasedSignature)) { return true; } @@ -189,7 +258,7 @@ public abstract class ITypeDescriptorImpl extends EObjectImpl implements ITypeDe { final String superType = (String) it.next(); - if (superType.equals(typeErasedSignature)) + if (Signature.getTypeErasure(superType).equals(typeErasedSignature)) { return true; } @@ -199,7 +268,7 @@ public abstract class ITypeDescriptorImpl extends EObjectImpl implements ITypeDe { final String superType = (String) it.next(); - if (superType.equals(typeErasedSignature)) + if (Signature.getTypeErasure(superType).equals(typeErasedSignature)) { return true; } @@ -229,7 +298,7 @@ public abstract class ITypeDescriptorImpl extends EObjectImpl implements ITypeDe { // sub-class of ITypeDescriptor must implement this if they which to provide // array element support - throw new UnsupportedOperationException("Base type descriptor does not support this function"); + throw new UnsupportedOperationException("Base type descriptor does not support this function"); //$NON-NLS-1$ } // shouldn't be called if not an array @@ -237,6 +306,51 @@ public abstract class ITypeDescriptorImpl extends EObjectImpl implements ITypeDe } /** + /** + * <!-- begin-user-doc --> + * + * Tries to load an IType for a fully resolved (i.e. starts with L not Q) + * type signature using the current jdtContext. + * + * @return the resolved IType or null if none could be resolved. + * + * <!-- end-user-doc --> + * @generated NOT + */ + public IType resolveType(String resolvedTypeSignature) + { + // we need to obtain an IJavaProject within which to resolve + // the type. + IJavaProject project = null; + + // see if a jdtContext hint has been set + if (getJdtContext() != null) + { + project = getJdtContext().getJavaProject(); + } + + if (project != null) + { + return TypeUtil.resolveType(project, resolvedTypeSignature); + } + + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated NOT + */ + public ISymbol calculateSyntheticCall(String methodName, EList methodArgs, String symbolName) { + // sub-classes need only implement if they have something meaningful + // the want to do here + // by default return null to indicate this type descriptor doesn't + // wish to handle calls + return null; + } + + /** * <!-- begin-user-doc --> * @param featureID * @param resolve @@ -357,7 +471,7 @@ public abstract class ITypeDescriptorImpl extends EObjectImpl implements ITypeDe if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (typeSignatureDelegate: "); + result.append(" (typeSignatureDelegate: "); //$NON-NLS-1$ result.append(typeSignatureDelegate); result.append(')'); return result.toString(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/SymbolFactoryImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/SymbolFactoryImpl.java index 00f3db159..83453e7b3 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/SymbolFactoryImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/SymbolFactoryImpl.java @@ -19,6 +19,7 @@ import org.eclipse.emf.ecore.impl.EFactoryImpl; import org.eclipse.emf.ecore.plugin.EcorePlugin; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IType; +import org.eclipse.jst.jsf.common.internal.types.ValueType; import org.eclipse.jst.jsf.context.symbol.ERuntimeSource; import org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol; import org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol; @@ -51,7 +52,7 @@ public class SymbolFactoryImpl extends EFactoryImpl implements SymbolFactory { * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * Creates the default factory implementation. @@ -62,7 +63,7 @@ public class SymbolFactoryImpl extends EFactoryImpl implements SymbolFactory { */ public static SymbolFactory init() { try { - SymbolFactory theSymbolFactory = (SymbolFactory)EPackage.Registry.INSTANCE.getEFactory("http:///org/eclipse/jst/jsf/context/symbol.ecore"); + SymbolFactory theSymbolFactory = (SymbolFactory)EPackage.Registry.INSTANCE.getEFactory("http:///org/eclipse/jst/jsf/context/symbol.ecore"); //$NON-NLS-1$ if (theSymbolFactory != null) { return theSymbolFactory; } @@ -107,7 +108,7 @@ public class SymbolFactoryImpl extends EFactoryImpl implements SymbolFactory { case SymbolPackage.ILIST_TYPE_DESCRIPTOR: return createIListTypeDescriptor(); case SymbolPackage.IBOUNDED_LIST_TYPE_DESCRIPTOR: return createIBoundedListTypeDescriptor(); default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ } } @@ -128,7 +129,7 @@ public class SymbolFactoryImpl extends EFactoryImpl implements SymbolFactory { case SymbolPackage.IJAVA_ELEMENT: return createIJavaElementFromString(eDataType, initialValue); default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ } } @@ -149,7 +150,7 @@ public class SymbolFactoryImpl extends EFactoryImpl implements SymbolFactory { case SymbolPackage.IJAVA_ELEMENT: return convertIJavaElementToString(eDataType, instanceValue); default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ } } @@ -312,7 +313,7 @@ public class SymbolFactoryImpl extends EFactoryImpl implements SymbolFactory { */ public ERuntimeSource createERuntimeSourceFromString(EDataType eDataType, String initialValue) { ERuntimeSource result = ERuntimeSource.get(initialValue); - if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ return result; } @@ -378,6 +379,24 @@ public class SymbolFactoryImpl extends EFactoryImpl implements SymbolFactory { /** * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ValueType createValueTypeFromString(EDataType eDataType, String initialValue) { + return (ValueType)super.createFromString(eDataType, initialValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertValueTypeToString(EDataType eDataType, Object instanceValue) { + return super.convertToString(eDataType, instanceValue); + } + + /** + * <!-- begin-user-doc --> * @return the symbol package * <!-- end-user-doc --> * @generated diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/SymbolPackageImpl.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/SymbolPackageImpl.java index dea6a4fbb..9dc0c42f1 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/SymbolPackageImpl.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/SymbolPackageImpl.java @@ -1,14 +1,9 @@ -/******************************************************************************* - * Copyright (c) 2006 Oracle Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html +/** + * <copyright> + * </copyright> * - * Contributors: - * Cameron Bateman/Oracle - initial API and implementation - * - ********************************************************************************/ + * $Id: SymbolPackageImpl.java,v 1.5 2007/05/07 17:30:20 cbateman Exp $ + */ package org.eclipse.jst.jsf.context.symbol.internal.impl; import org.eclipse.emf.ecore.EAttribute; @@ -18,9 +13,14 @@ import org.eclipse.emf.ecore.EEnum; import org.eclipse.emf.ecore.EOperation; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; + import org.eclipse.emf.ecore.impl.EPackageImpl; + import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IType; + +import org.eclipse.jst.jsf.common.internal.types.ValueType; + import org.eclipse.jst.jsf.context.symbol.ERuntimeSource; import org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol; import org.eclipse.jst.jsf.context.symbol.IBeanMethodSymbol; @@ -53,94 +53,94 @@ import org.eclipse.jst.jsf.context.symbol.SymbolPackage; public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - private EClass iBeanInstanceSymbolEClass = null; + private EClass iBeanInstanceSymbolEClass = null; /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - private EClass iBeanPropertySymbolEClass = null; + private EClass iBeanPropertySymbolEClass = null; /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - private EClass iInstanceSymbolEClass = null; + private EClass iInstanceSymbolEClass = null; /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - private EClass iJavaSymbolEClass = null; + private EClass iJavaSymbolEClass = null; /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - private EClass iSymbolEClass = null; + private EClass iSymbolEClass = null; /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - private EClass iTypeDescriptorEClass = null; + private EClass iTypeDescriptorEClass = null; /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - private EClass iDescribedInDetailEClass = null; + private EClass iDescribedInDetailEClass = null; /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - private EClass iJavaTypeDescriptor2EClass = null; + private EClass iJavaTypeDescriptor2EClass = null; /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - private EClass iBeanMethodSymbolEClass = null; + private EClass iBeanMethodSymbolEClass = null; /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - private EClass iComponentSymbolEClass = null; + private EClass iComponentSymbolEClass = null; /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - private EClass iPropertySymbolEClass = null; + private EClass iPropertySymbolEClass = null; /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - private EClass iMapTypeDescriptorEClass = null; + private EClass iMapTypeDescriptorEClass = null; /** * <!-- begin-user-doc --> @@ -200,17 +200,24 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EDataType iTypeEDataType = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> * @generated */ - private EDataType iTypeEDataType = null; + private EDataType iJavaElementEDataType = null; /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - private EDataType iJavaElementEDataType = null; + private EDataType valueTypeEDataType = null; /** * Creates an instance of the model <b>Package</b>, registered with @@ -221,22 +228,22 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { * initialization of the package, or returns the registered package, * if one already exists. * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @see org.eclipse.emf.ecore.EPackage.Registry * @see org.eclipse.jst.jsf.context.symbol.SymbolPackage#eNS_URI * @see #init() * @generated */ - private SymbolPackageImpl() { + private SymbolPackageImpl() { super(eNS_URI, SymbolFactory.eINSTANCE); } /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - private static boolean isInited = false; + private static boolean isInited = false; /** * Creates, registers, and initializes the <b>Package</b> for this @@ -254,14 +261,13 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { * <p>Invocation of this method will not affect any packages that have * already been initialized. * <!-- begin-user-doc --> - * @return a symbol package - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ - public static SymbolPackage init() { + public static SymbolPackage init() { if (isInited) return (SymbolPackage)EPackage.Registry.INSTANCE.getEPackage(SymbolPackage.eNS_URI); // Obtain or create and register package @@ -283,77 +289,69 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * @return eclass - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EClass getIBeanInstanceSymbol() { + public EClass getIBeanInstanceSymbol() { return iBeanInstanceSymbolEClass; } /** * <!-- begin-user-doc --> - * @return ereference - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EReference getIBeanInstanceSymbol_Properties() { + public EReference getIBeanInstanceSymbol_Properties() { return (EReference)iBeanInstanceSymbolEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> - * @return ereference - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EReference getIBeanInstanceSymbol_Methods() { + public EReference getIBeanInstanceSymbol_Methods() { return (EReference)iBeanInstanceSymbolEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> - * @return eclass * <!-- end-user-doc --> * @generated */ - public EClass getIBeanPropertySymbol() { + public EClass getIBeanPropertySymbol() { return iBeanPropertySymbolEClass; } /** * <!-- begin-user-doc --> - * @return ereference - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EReference getIBeanPropertySymbol_Owner() { + public EReference getIBeanPropertySymbol_Owner() { return (EReference)iBeanPropertySymbolEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> - * @return eclass - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EClass getIInstanceSymbol() { + public EClass getIInstanceSymbol() { return iInstanceSymbolEClass; } /** * <!-- begin-user-doc --> - * @return eattribute - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EAttribute getIInstanceSymbol_TypeResolved() { + public EAttribute getIInstanceSymbol_TypeResolved() { return (EAttribute)iInstanceSymbolEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> - * @return eattribute * <!-- end-user-doc --> * @generated */ @@ -363,67 +361,60 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * @return eclass - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EClass getIJavaSymbol() { + public EClass getIJavaSymbol() { return iJavaSymbolEClass; } /** * <!-- begin-user-doc --> - * @return eattribute - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EAttribute getIJavaSymbol_JavaElement() { + public EAttribute getIJavaSymbol_JavaElement() { return (EAttribute)iJavaSymbolEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> - * @return eclass - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EClass getISymbol() { + public EClass getISymbol() { return iSymbolEClass; } /** * <!-- begin-user-doc --> - * @return eattribute - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EAttribute getISymbol_Name() { + public EAttribute getISymbol_Name() { return (EAttribute)iSymbolEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> - * @return eclass - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EClass getITypeDescriptor() { + public EClass getITypeDescriptor() { return iTypeDescriptorEClass; } /** * <!-- begin-user-doc --> - * @return ereference - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EReference getITypeDescriptor_Properties() { + public EReference getITypeDescriptor_Properties() { return (EReference)iTypeDescriptorEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> - * @return the type signature eattribute * <!-- end-user-doc --> * @generated */ @@ -433,7 +424,6 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * @return the eattribute * <!-- end-user-doc --> * @generated */ @@ -443,7 +433,6 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * @return the eattribute * <!-- end-user-doc --> * @generated */ @@ -453,7 +442,6 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * @return the eattribute * <!-- end-user-doc --> * @generated */ @@ -463,7 +451,6 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * @return the ereference * <!-- end-user-doc --> * @generated */ @@ -473,51 +460,64 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * @return eclass - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EClass getIDescribedInDetail() { + public EAttribute getITypeDescriptor_TypeParameterSignatures() { + return (EAttribute)iTypeDescriptorEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getITypeDescriptor_JdtContext() { + return (EAttribute)iTypeDescriptorEClass.getEStructuralFeatures().get(7); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getIDescribedInDetail() { return iDescribedInDetailEClass; } /** * <!-- begin-user-doc --> - * @return eclass - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EClass getIJavaTypeDescriptor2() { + public EClass getIJavaTypeDescriptor2() { return iJavaTypeDescriptor2EClass; } /** * <!-- begin-user-doc --> - * @return eattribute - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EAttribute getIJavaTypeDescriptor2_Type() { + public EAttribute getIJavaTypeDescriptor2_Type() { return (EAttribute)iJavaTypeDescriptor2EClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> - * @return ereference - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EReference getIJavaTypeDescriptor2_BeanProperties() { + public EReference getIJavaTypeDescriptor2_BeanProperties() { return (EReference)iJavaTypeDescriptor2EClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> - * @return ereference - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EReference getIJavaTypeDescriptor2_BeanMethods() { + public EReference getIJavaTypeDescriptor2_BeanMethods() { return (EReference)iJavaTypeDescriptor2EClass.getEStructuralFeatures().get(2); } @@ -532,77 +532,69 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * @return eclass - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EClass getIBeanMethodSymbol() { + public EClass getIBeanMethodSymbol() { return iBeanMethodSymbolEClass; } /** * <!-- begin-user-doc --> - * @return ereference - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EReference getIBeanMethodSymbol_Owner() { + public EReference getIBeanMethodSymbol_Owner() { return (EReference)iBeanMethodSymbolEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> - * @return eclass - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EClass getIComponentSymbol() { + public EClass getIComponentSymbol() { return iComponentSymbolEClass; } /** * <!-- begin-user-doc --> - * @return eclass - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EClass getIPropertySymbol() { + public EClass getIPropertySymbol() { return iPropertySymbolEClass; } /** * <!-- begin-user-doc --> - * @return eattribute - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EAttribute getIPropertySymbol_Intermediate() { + public EAttribute getIPropertySymbol_Intermediate() { return (EAttribute)iPropertySymbolEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> - * @return eclass - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EClass getIMapTypeDescriptor() { + public EClass getIMapTypeDescriptor() { return iMapTypeDescriptorEClass; } /** * <!-- begin-user-doc --> - * @return eattribute - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EAttribute getIMapTypeDescriptor_MapSource() { + public EAttribute getIMapTypeDescriptor_MapSource() { return (EAttribute)iMapTypeDescriptorEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> - * @return the eattribute * <!-- end-user-doc --> * @generated */ @@ -612,7 +604,6 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * @return the eclass for a method symbol * <!-- end-user-doc --> * @generated */ @@ -622,7 +613,6 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * @return the signature attribute of the method symbol * <!-- end-user-doc --> * @generated */ @@ -632,7 +622,6 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * @return eclass * <!-- end-user-doc --> * @generated */ @@ -642,7 +631,6 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * @return ereference * <!-- end-user-doc --> * @generated */ @@ -652,7 +640,6 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * @return the eattribute * <!-- end-user-doc --> * @generated */ @@ -662,7 +649,6 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * @return the eattribute * <!-- end-user-doc --> * @generated */ @@ -726,7 +712,6 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * @return eenum * <!-- end-user-doc --> * @generated */ @@ -736,49 +721,55 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { /** * <!-- begin-user-doc --> - * @return edatatype - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EDataType getIType() { + public EDataType getIType() { return iTypeEDataType; } /** * <!-- begin-user-doc --> - * @return edatatype - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public EDataType getIJavaElement() { + public EDataType getIJavaElement() { return iJavaElementEDataType; } /** * <!-- begin-user-doc --> - * @return the symbol factory - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public SymbolFactory getSymbolFactory() { + public EDataType getValueType() { + return valueTypeEDataType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public SymbolFactory getSymbolFactory() { return (SymbolFactory)getEFactoryInstance(); } /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - private boolean isCreated = false; + private boolean isCreated = false; /** * Creates the meta-model objects for the package. This method is * guarded to have no affect on any invocation but its first. * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public void createPackageContents() { + public void createPackageContents() { if (isCreated) return; isCreated = true; @@ -807,6 +798,8 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { createEAttribute(iTypeDescriptorEClass, ITYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES); createEAttribute(iTypeDescriptorEClass, ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE); createEReference(iTypeDescriptorEClass, ITYPE_DESCRIPTOR__METHODS); + createEAttribute(iTypeDescriptorEClass, ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES); + createEAttribute(iTypeDescriptorEClass, ITYPE_DESCRIPTOR__JDT_CONTEXT); iDescribedInDetailEClass = createEClass(IDESCRIBED_IN_DETAIL); @@ -853,23 +846,24 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { // Create data types iTypeEDataType = createEDataType(ITYPE); iJavaElementEDataType = createEDataType(IJAVA_ELEMENT); + valueTypeEDataType = createEDataType(VALUE_TYPE); } /** * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - private boolean isInitialized = false; + private boolean isInitialized = false; /** * Complete the initialization of the package and its meta-model. This * method is guarded to have no affect on any invocation but its first. * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- end-user-doc --> * @generated */ - public void initializePackageContents() { + public void initializePackageContents() { if (isInitialized) return; isInitialized = true; @@ -904,105 +898,116 @@ public class SymbolPackageImpl extends EPackageImpl implements SymbolPackage { iBoundedListTypeDescriptorEClass.getESuperTypes().add(this.getIBoundedTypeDescriptor()); // Initialize classes and features; add operations and parameters - initEClass(iBeanInstanceSymbolEClass, IBeanInstanceSymbol.class, "IBeanInstanceSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getIBeanInstanceSymbol_Properties(), this.getIBeanPropertySymbol(), null, "properties", null, 0, -1, IBeanInstanceSymbol.class, !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getIBeanInstanceSymbol_Methods(), this.getIBeanMethodSymbol(), null, "methods", null, 0, -1, IBeanInstanceSymbol.class, !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(iBeanInstanceSymbolEClass, IBeanInstanceSymbol.class, "IBeanInstanceSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getIBeanInstanceSymbol_Properties(), this.getIBeanPropertySymbol(), null, "properties", null, 0, -1, IBeanInstanceSymbol.class, !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEReference(getIBeanInstanceSymbol_Methods(), this.getIBeanMethodSymbol(), null, "methods", null, 0, -1, IBeanInstanceSymbol.class, !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + + addEOperation(iBeanInstanceSymbolEClass, this.getIJavaTypeDescriptor2(), "getJavaTypeDescriptor", 0, 1); //$NON-NLS-1$ + + EOperation op = addEOperation(iBeanInstanceSymbolEClass, null, "setJavaTypeDescriptor"); //$NON-NLS-1$ + addEParameter(op, this.getIJavaTypeDescriptor2(), "newTypeDescriptor", 0, 1); //$NON-NLS-1$ - addEOperation(iBeanInstanceSymbolEClass, this.getIJavaTypeDescriptor2(), "getJavaTypeDescriptor", 0, 1); + initEClass(iBeanPropertySymbolEClass, IBeanPropertySymbol.class, "IBeanPropertySymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getIBeanPropertySymbol_Owner(), this.getIJavaTypeDescriptor2(), null, "owner", null, 0, 1, IBeanPropertySymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - EOperation op = addEOperation(iBeanInstanceSymbolEClass, null, "setJavaTypeDescriptor"); - addEParameter(op, this.getIJavaTypeDescriptor2(), "newTypeDescriptor", 0, 1); + initEClass(iInstanceSymbolEClass, IInstanceSymbol.class, "IInstanceSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getIInstanceSymbol_TypeResolved(), ecorePackage.getEBoolean(), "typeResolved", null, 0, 1, IInstanceSymbol.class, !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getIInstanceSymbol_RuntimeSource(), this.getERuntimeSource(), "runtimeSource", "TAG_INSTANTIATED_SYMBOL", 0, 1, IInstanceSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$ - initEClass(iBeanPropertySymbolEClass, IBeanPropertySymbol.class, "IBeanPropertySymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getIBeanPropertySymbol_Owner(), this.getIJavaTypeDescriptor2(), null, "owner", null, 0, 1, IBeanPropertySymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(iJavaSymbolEClass, IJavaSymbol.class, "IJavaSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getIJavaSymbol_JavaElement(), this.getIJavaElement(), "javaElement", null, 0, 1, IJavaSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEClass(iInstanceSymbolEClass, IInstanceSymbol.class, "IInstanceSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getIInstanceSymbol_TypeResolved(), ecorePackage.getEBoolean(), "typeResolved", null, 0, 1, IInstanceSymbol.class, !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getIInstanceSymbol_RuntimeSource(), this.getERuntimeSource(), "runtimeSource", "TAG_INSTANTIATED_SYMBOL", 0, 1, IInstanceSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(iSymbolEClass, ISymbol.class, "ISymbol", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getISymbol_Name(), ecorePackage.getEString(), "name", null, 0, 1, ISymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEClass(iJavaSymbolEClass, IJavaSymbol.class, "IJavaSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getIJavaSymbol_JavaElement(), this.getIJavaElement(), "javaElement", null, 0, 1, IJavaSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(iTypeDescriptorEClass, ITypeDescriptor.class, "ITypeDescriptor", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getITypeDescriptor_Properties(), this.getIPropertySymbol(), null, "properties", null, 0, -1, ITypeDescriptor.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getITypeDescriptor_TypeSignature(), ecorePackage.getEString(), "typeSignature", "", 0, 1, ITypeDescriptor.class, !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$ + initEAttribute(getITypeDescriptor_SuperTypeSignatures(), ecorePackage.getEString(), "superTypeSignatures", null, 0, -1, ITypeDescriptor.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getITypeDescriptor_InterfaceTypeSignatures(), ecorePackage.getEString(), "interfaceTypeSignatures", null, 0, -1, ITypeDescriptor.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getITypeDescriptor_TypeSignatureDelegate(), ecorePackage.getEString(), "typeSignatureDelegate", null, 0, 1, ITypeDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEReference(getITypeDescriptor_Methods(), this.getIMethodSymbol(), null, "methods", null, 0, -1, ITypeDescriptor.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getITypeDescriptor_TypeParameterSignatures(), ecorePackage.getEString(), "typeParameterSignatures", null, 0, -1, ITypeDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getITypeDescriptor_JdtContext(), this.getIJavaElement(), "jdtContext", null, 0, 1, ITypeDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEClass(iSymbolEClass, ISymbol.class, "ISymbol", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getISymbol_Name(), ecorePackage.getEString(), "name", null, 0, 1, ISymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + op = addEOperation(iTypeDescriptorEClass, ecorePackage.getEBoolean(), "instanceOf", 0, 1); //$NON-NLS-1$ + addEParameter(op, ecorePackage.getEString(), "typeSignature", 0, 1); //$NON-NLS-1$ - initEClass(iTypeDescriptorEClass, ITypeDescriptor.class, "ITypeDescriptor", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getITypeDescriptor_Properties(), this.getIPropertySymbol(), null, "properties", null, 0, -1, ITypeDescriptor.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getITypeDescriptor_TypeSignature(), ecorePackage.getEString(), "typeSignature", "", 0, 1, ITypeDescriptor.class, !IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getITypeDescriptor_SuperTypeSignatures(), ecorePackage.getEString(), "superTypeSignatures", null, 0, -1, ITypeDescriptor.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getITypeDescriptor_InterfaceTypeSignatures(), ecorePackage.getEString(), "interfaceTypeSignatures", null, 0, -1, ITypeDescriptor.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getITypeDescriptor_TypeSignatureDelegate(), ecorePackage.getEString(), "typeSignatureDelegate", null, 0, 1, ITypeDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getITypeDescriptor_Methods(), this.getIMethodSymbol(), null, "methods", null, 0, -1, ITypeDescriptor.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + addEOperation(iTypeDescriptorEClass, ecorePackage.getEBoolean(), "isArray", 0, 1); //$NON-NLS-1$ - op = addEOperation(iTypeDescriptorEClass, ecorePackage.getEBoolean(), "instanceOf", 0, 1); - addEParameter(op, ecorePackage.getEString(), "typeSignature", 0, 1); + addEOperation(iTypeDescriptorEClass, this.getIObjectSymbol(), "getArrayElement", 0, 1); //$NON-NLS-1$ - addEOperation(iTypeDescriptorEClass, ecorePackage.getEBoolean(), "isArray", 0, 1); + op = addEOperation(iTypeDescriptorEClass, this.getIType(), "resolveType", 0, 1); //$NON-NLS-1$ + addEParameter(op, ecorePackage.getEString(), "resolvedTypeSignature", 0, 1); //$NON-NLS-1$ - addEOperation(iTypeDescriptorEClass, this.getIObjectSymbol(), "getArrayElement", 0, 1); + initEClass(iDescribedInDetailEClass, IDescribedInDetail.class, "IDescribedInDetail", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEClass(iDescribedInDetailEClass, IDescribedInDetail.class, "IDescribedInDetail", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEClass(iJavaTypeDescriptor2EClass, IJavaTypeDescriptor2.class, "IJavaTypeDescriptor2", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getIJavaTypeDescriptor2_Type(), this.getIType(), "type", null, 0, 1, IJavaTypeDescriptor2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEReference(getIJavaTypeDescriptor2_BeanProperties(), this.getIBeanPropertySymbol(), null, "beanProperties", null, 0, -1, IJavaTypeDescriptor2.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEReference(getIJavaTypeDescriptor2_BeanMethods(), this.getIBeanPropertySymbol(), null, "beanMethods", null, 0, -1, IJavaTypeDescriptor2.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getIJavaTypeDescriptor2_ArrayCount(), ecorePackage.getEInt(), "arrayCount", null, 0, 1, IJavaTypeDescriptor2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEClass(iJavaTypeDescriptor2EClass, IJavaTypeDescriptor2.class, "IJavaTypeDescriptor2", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getIJavaTypeDescriptor2_Type(), this.getIType(), "type", null, 0, 1, IJavaTypeDescriptor2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getIJavaTypeDescriptor2_BeanProperties(), this.getIBeanPropertySymbol(), null, "beanProperties", null, 0, -1, IJavaTypeDescriptor2.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getIJavaTypeDescriptor2_BeanMethods(), this.getIBeanPropertySymbol(), null, "beanMethods", null, 0, -1, IJavaTypeDescriptor2.class, !IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getIJavaTypeDescriptor2_ArrayCount(), ecorePackage.getEInt(), "arrayCount", null, 0, 1, IJavaTypeDescriptor2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(iBeanMethodSymbolEClass, IBeanMethodSymbol.class, "IBeanMethodSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getIBeanMethodSymbol_Owner(), this.getIJavaTypeDescriptor2(), null, "owner", null, 0, 1, IBeanMethodSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEClass(iBeanMethodSymbolEClass, IBeanMethodSymbol.class, "IBeanMethodSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getIBeanMethodSymbol_Owner(), this.getIJavaTypeDescriptor2(), null, "owner", null, 0, 1, IBeanMethodSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(iComponentSymbolEClass, IComponentSymbol.class, "IComponentSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEClass(iComponentSymbolEClass, IComponentSymbol.class, "IComponentSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEClass(iPropertySymbolEClass, IPropertySymbol.class, "IPropertySymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getIPropertySymbol_Intermediate(), ecorePackage.getEBoolean(), "intermediate", null, 0, 1, IPropertySymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEClass(iPropertySymbolEClass, IPropertySymbol.class, "IPropertySymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getIPropertySymbol_Intermediate(), ecorePackage.getEBoolean(), "intermediate", null, 0, 1, IPropertySymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(iMapTypeDescriptorEClass, IMapTypeDescriptor.class, "IMapTypeDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getIMapTypeDescriptor_MapSource(), ecorePackage.getEMap(), "mapSource", null, 0, 1, IMapTypeDescriptor.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getIMapTypeDescriptor_Immutable(), ecorePackage.getEBoolean(), "immutable", "true", 0, 1, IMapTypeDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$ - initEClass(iMapTypeDescriptorEClass, IMapTypeDescriptor.class, "IMapTypeDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getIMapTypeDescriptor_MapSource(), ecorePackage.getEMap(), "mapSource", null, 0, 1, IMapTypeDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getIMapTypeDescriptor_Immutable(), ecorePackage.getEBoolean(), "immutable", "true", 0, 1, IMapTypeDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(iMethodSymbolEClass, IMethodSymbol.class, "IMethodSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getIMethodSymbol_Signature(), ecorePackage.getEString(), "signature", null, 0, 1, IMethodSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEClass(iMethodSymbolEClass, IMethodSymbol.class, "IMethodSymbol", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getIMethodSymbol_Signature(), ecorePackage.getEString(), "signature", null, 0, 1, IMethodSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(iObjectSymbolEClass, IObjectSymbol.class, "IObjectSymbol", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getIObjectSymbol_TypeDescriptor(), this.getITypeDescriptor(), null, "typeDescriptor", null, 0, 1, IObjectSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getIObjectSymbol_Readable(), ecorePackage.getEBoolean(), "readable", null, 0, 1, IObjectSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute(getIObjectSymbol_Writable(), ecorePackage.getEBoolean(), "writable", null, 0, 1, IObjectSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEClass(iObjectSymbolEClass, IObjectSymbol.class, "IObjectSymbol", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getIObjectSymbol_TypeDescriptor(), this.getITypeDescriptor(), null, "typeDescriptor", null, 0, 1, IObjectSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getIObjectSymbol_Readable(), ecorePackage.getEBoolean(), "readable", null, 0, 1, IObjectSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getIObjectSymbol_Writable(), ecorePackage.getEBoolean(), "writable", null, 0, 1, IObjectSymbol.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + op = addEOperation(iObjectSymbolEClass, ecorePackage.getEBoolean(), "supportsCoercion", 0, 1); //$NON-NLS-1$ + addEParameter(op, ecorePackage.getEString(), "typeSignature", 0, 1); //$NON-NLS-1$ - op = addEOperation(iObjectSymbolEClass, ecorePackage.getEBoolean(), "supportsCoercion", 0, 1); - addEParameter(op, ecorePackage.getEString(), "typeSignature", 0, 1); + op = addEOperation(iObjectSymbolEClass, this.getITypeDescriptor(), "coerce", 0, 1); //$NON-NLS-1$ + addEParameter(op, ecorePackage.getEString(), "typeSignature", 0, 1); //$NON-NLS-1$ - op = addEOperation(iObjectSymbolEClass, this.getITypeDescriptor(), "coerce", 0, 1); - addEParameter(op, ecorePackage.getEString(), "typeSignature", 0, 1); + op = addEOperation(iObjectSymbolEClass, this.getISymbol(), "call", 0, 1); //$NON-NLS-1$ + addEParameter(op, ecorePackage.getEString(), "methodName", 0, 1); //$NON-NLS-1$ + addEParameter(op, this.getValueType(), "methodArguments", 0, -1); //$NON-NLS-1$ + addEParameter(op, ecorePackage.getEString(), "symbolName", 0, 1); //$NON-NLS-1$ - initEClass(iBoundedTypeDescriptorEClass, IBoundedTypeDescriptor.class, "IBoundedTypeDescriptor", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEClass(iBoundedTypeDescriptorEClass, IBoundedTypeDescriptor.class, "IBoundedTypeDescriptor", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - op = addEOperation(iBoundedTypeDescriptorEClass, ecorePackage.getEBoolean(), "isUnboundedForType", 0, 1); - addEParameter(op, ecorePackage.getEString(), "typeSignature", 0, 1); + op = addEOperation(iBoundedTypeDescriptorEClass, ecorePackage.getEBoolean(), "isUnboundedForType", 0, 1); //$NON-NLS-1$ + addEParameter(op, ecorePackage.getEString(), "typeSignature", 0, 1); //$NON-NLS-1$ - op = addEOperation(iBoundedTypeDescriptorEClass, this.getISymbol(), "getUnboundedProperty", 0, 1); - addEParameter(op, ecorePackage.getEJavaObject(), "name", 0, 1); - addEParameter(op, ecorePackage.getEString(), "typeSignature", 0, 1); + op = addEOperation(iBoundedTypeDescriptorEClass, this.getISymbol(), "getUnboundedProperty", 0, 1); //$NON-NLS-1$ + addEParameter(op, ecorePackage.getEJavaObject(), "name", 0, 1); //$NON-NLS-1$ + addEParameter(op, ecorePackage.getEString(), "typeSignature", 0, 1); //$NON-NLS-1$ - initEClass(iBoundedMapTypeDescriptorEClass, IBoundedMapTypeDescriptor.class, "IBoundedMapTypeDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEClass(iBoundedMapTypeDescriptorEClass, IBoundedMapTypeDescriptor.class, "IBoundedMapTypeDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEClass(iBoundedJavaTypeDescriptorEClass, IBoundedJavaTypeDescriptor.class, "IBoundedJavaTypeDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEClass(iBoundedJavaTypeDescriptorEClass, IBoundedJavaTypeDescriptor.class, "IBoundedJavaTypeDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEClass(iListTypeDescriptorEClass, IListTypeDescriptor.class, "IListTypeDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getIListTypeDescriptor_ListSource(), ecorePackage.getEEList(), "listSource", null, 0, 1, IListTypeDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(iListTypeDescriptorEClass, IListTypeDescriptor.class, "IListTypeDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getIListTypeDescriptor_ListSource(), ecorePackage.getEEList(), "listSource", null, 0, 1, IListTypeDescriptor.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEClass(iBoundedListTypeDescriptorEClass, IBoundedListTypeDescriptor.class, "IBoundedListTypeDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEClass(iBoundedListTypeDescriptorEClass, IBoundedListTypeDescriptor.class, "IBoundedListTypeDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ // Initialize enums and add enum literals - initEEnum(eRuntimeSourceEEnum, ERuntimeSource.class, "ERuntimeSource"); + initEEnum(eRuntimeSourceEEnum, ERuntimeSource.class, "ERuntimeSource"); //$NON-NLS-1$ addEEnumLiteral(eRuntimeSourceEEnum, ERuntimeSource.BUILT_IN_SYMBOL_LITERAL); addEEnumLiteral(eRuntimeSourceEEnum, ERuntimeSource.MANAGED_BEAN_SYMBOL_LITERAL); addEEnumLiteral(eRuntimeSourceEEnum, ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL); addEEnumLiteral(eRuntimeSourceEEnum, ERuntimeSource.OTHER_LITERAL); // Initialize data types - initEDataType(iTypeEDataType, IType.class, "IType", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); - initEDataType(iJavaElementEDataType, IJavaElement.class, "IJavaElement", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + initEDataType(iTypeEDataType, IType.class, "IType", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEDataType(iJavaElementEDataType, IJavaElement.class, "IJavaElement", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEDataType(valueTypeEDataType, ValueType.class, "ValueType", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ // Create resource createResource(eNS_URI); diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/Util.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/Util.java new file mode 100644 index 000000000..d2fa68249 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/impl/Util.java @@ -0,0 +1,186 @@ +/******************************************************************************* + * Copyright (c) 2007 Oracle Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cameron Bateman/Oracle - initial API and implementation + * + ********************************************************************************/ +package org.eclipse.jst.jsf.context.symbol.internal.impl; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.jdt.core.IMethod; +import org.eclipse.jdt.core.IType; +import org.eclipse.jdt.core.JavaModelException; +import org.eclipse.jdt.core.Signature; +import org.eclipse.jst.jsf.common.JSFCommonPlugin; +import org.eclipse.jst.jsf.common.internal.types.TypeConstants; +import org.eclipse.jst.jsf.common.internal.types.ValueType; +import org.eclipse.jst.jsf.common.util.JDTBeanIntrospector; +import org.eclipse.jst.jsf.common.util.TypeUtil; +import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2; +import org.eclipse.jst.jsf.context.symbol.IPropertySymbol; +import org.eclipse.jst.jsf.context.symbol.ISymbol; +import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor; +import org.eclipse.jst.jsf.context.symbol.SymbolFactory; + +final class Util +{ + static ISymbol call(String methodName, EList methodArguments, + String symbolName, ITypeDescriptor typeDesc) + { + // first, see if the type descriptor wants to handle the call + ISymbol result = typeDesc.calculateSyntheticCall(methodName, methodArguments, symbolName); + + final IType type= typeDesc.resolveType(typeDesc.getTypeSignature()); + + // if the type is resolved and the typeDesc didn't already handle + // the call then do this the hard way... + if (type != null && result == null) + { + final JDTBeanIntrospector introspector = + new JDTBeanIntrospector(type); + + final IMethod callMethod = + Util.matchMethod(methodName, methodArguments, introspector.getAllMethods(),typeDesc.getTypeParameterSignatures()); + + if (callMethod != null) + { + try + { + // resolve the method's return type; don't erase parameters + String retTypeSignature = + TypeUtil.resolveTypeSignature + (type, callMethod.getReturnType(), false); + + if (Signature.getTypeSignatureKind(retTypeSignature) == Signature.TYPE_VARIABLE_SIGNATURE) + { + retTypeSignature = TypeUtil.matchTypeParameterToArgument + (type + , retTypeSignature, typeDesc.getTypeParameterSignatures()); + + if (retTypeSignature == null) + { + retTypeSignature = TypeConstants.TYPE_JAVAOBJECT; + } + } + + final IPropertySymbol propSymbol = + SymbolFactory.eINSTANCE.createIPropertySymbol(); + + // TODO: there is a possible problem here for non-string keyed maps + propSymbol.setName(symbolName.toString()); + propSymbol.setReadable(true); + + { + IJavaTypeDescriptor2 newTypeDesc = null; + + if (retTypeSignature.equals(TypeConstants.TYPE_JAVAOBJECT)) + { + newTypeDesc = SymbolFactory.eINSTANCE.createIBoundedJavaTypeDescriptor(); + } + else + { + newTypeDesc = SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2(); + } + + newTypeDesc.setArrayCount(Signature.getArrayCount(retTypeSignature)); + + // may be null + newTypeDesc.setType(typeDesc.resolveType(retTypeSignature)); + newTypeDesc.setTypeSignatureDelegate(retTypeSignature); + propSymbol.setTypeDescriptor(newTypeDesc); + } + + result = propSymbol; + } + catch (JavaModelException e) + { + JSFCommonPlugin.log(e); + // fall-through and return null result + } + } + } + + return result; + } + + static IMethod matchMethod(String methodName, List methodArguments, IMethod[] allMethods, List typeParameterSignatures) + { +// final List argSigs = convertArgsToSignatures(methodArguments); + IMethod matchedMethod = null; + + for (int i = 0; i < allMethods.length; i++) + { + final IMethod method = allMethods[i]; + + // check for names and argument count match + if (method.getParameterTypes().length == methodArguments.size() + && method.getElementName().equals(methodName)) + { + List<String> methods = resolveMethodParameters(method, typeParameterSignatures); + + // need to verify argument matches + boolean isMatched = true; + CHECK_ARGUMENTS: for (int j = 0; j < methods.size(); j++) + { + final ValueType valueType = (ValueType) methodArguments.get(j); + + // if the parameters match, or if the method expects an object + // and we have a class + // TODO: there are some cases not supported here like: + // - method name overloading + // - autoboxing primitives + // - certain kinds of parameterized args + if (!methods.get(j).equals(valueType.getSignature()) + && !(methods.get(j).equals(TypeConstants.TYPE_JAVAOBJECT) + && Signature.getTypeSignatureKind(valueType.getSignature())==Signature.CLASS_TYPE_SIGNATURE)) + { + // not a match + isMatched = false; + break CHECK_ARGUMENTS; + } + } + + if (isMatched) + { + return method; + } + } + } + + return matchedMethod; + } + + static List<String> resolveMethodParameters(IMethod method, List typeParametersSignatures) + { + List<String> resolved = new ArrayList<String>(); + String[] parameterTypes = method.getParameterTypes(); + for (String parameter : parameterTypes) + { + parameter = TypeUtil.resolveTypeSignature(method.getDeclaringType() + , parameter, false); + + if (Signature.getTypeSignatureKind(parameter) == Signature.TYPE_VARIABLE_SIGNATURE) + { + parameter = TypeUtil.matchTypeParameterToArgument + (method.getDeclaringType(), parameter, typeParametersSignatures); + } + + if (parameter == null) + { + parameter = TypeConstants.TYPE_JAVAOBJECT; + } + + resolved.add(parameter); + } + + return resolved; + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanInstanceSymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanInstanceSymbolItemProvider.java index 0d0e683ba..a2688980b 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanInstanceSymbolItemProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanInstanceSymbolItemProvider.java @@ -49,8 +49,7 @@ public class IBeanInstanceSymbolItemProvider * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * This constructs an instance from a factory and a notifier. @@ -93,8 +92,8 @@ public class IBeanInstanceSymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IBeanInstanceSymbol_properties_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IBeanInstanceSymbol_properties_feature", "_UI_IBeanInstanceSymbol_type"), + getString("_UI_IBeanInstanceSymbol_properties_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IBeanInstanceSymbol_properties_feature", "_UI_IBeanInstanceSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IBEAN_INSTANCE_SYMBOL__PROPERTIES, false, false, @@ -116,8 +115,8 @@ public class IBeanInstanceSymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IBeanInstanceSymbol_methods_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IBeanInstanceSymbol_methods_feature", "_UI_IBeanInstanceSymbol_type"), + getString("_UI_IBeanInstanceSymbol_methods_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IBeanInstanceSymbol_methods_feature", "_UI_IBeanInstanceSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IBEAN_INSTANCE_SYMBOL__METHODS, false, false, @@ -136,7 +135,7 @@ public class IBeanInstanceSymbolItemProvider * @generated */ public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IBeanInstanceSymbol")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/IBeanInstanceSymbol")); //$NON-NLS-1$ } /** @@ -150,7 +149,7 @@ public class IBeanInstanceSymbolItemProvider public String getText(Object object) { String label = ((IBeanInstanceSymbol)object).getName(); return label == null || label.length() == 0 ? - getString("_UI_IBeanInstanceSymbol_type") : + getString("_UI_IBeanInstanceSymbol_type") : //$NON-NLS-1$ label; } diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanMethodSymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanMethodSymbolItemProvider.java index 3e67b9d14..ed4eaae3a 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanMethodSymbolItemProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanMethodSymbolItemProvider.java @@ -58,7 +58,7 @@ public class IBeanMethodSymbolItemProvider * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * This constructs an instance from a factory and a notifier. @@ -102,8 +102,8 @@ public class IBeanMethodSymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_ISymbol_name_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ISymbol_name_feature", "_UI_ISymbol_type"), + getString("_UI_ISymbol_name_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ISymbol_name_feature", "_UI_ISymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.ISYMBOL__NAME, true, false, @@ -125,8 +125,8 @@ public class IBeanMethodSymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IMethodSymbol_signature_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IMethodSymbol_signature_feature", "_UI_IMethodSymbol_type"), + getString("_UI_IMethodSymbol_signature_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IMethodSymbol_signature_feature", "_UI_IMethodSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IMETHOD_SYMBOL__SIGNATURE, true, false, @@ -148,8 +148,8 @@ public class IBeanMethodSymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IBeanMethodSymbol_owner_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IBeanMethodSymbol_owner_feature", "_UI_IBeanMethodSymbol_type"), + getString("_UI_IBeanMethodSymbol_owner_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IBeanMethodSymbol_owner_feature", "_UI_IBeanMethodSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IBEAN_METHOD_SYMBOL__OWNER, true, false, @@ -168,7 +168,7 @@ public class IBeanMethodSymbolItemProvider * @generated */ public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IBeanMethodSymbol")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/IBeanMethodSymbol")); //$NON-NLS-1$ } /** @@ -182,7 +182,7 @@ public class IBeanMethodSymbolItemProvider public String getText(Object object) { String label = ((IBeanMethodSymbol)object).getName(); return label == null || label.length() == 0 ? - getString("_UI_IBeanMethodSymbol_type") : + getString("_UI_IBeanMethodSymbol_type") : //$NON-NLS-1$ label; } diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanPropertySymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanPropertySymbolItemProvider.java index 8f5a49217..d083574f3 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanPropertySymbolItemProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBeanPropertySymbolItemProvider.java @@ -46,8 +46,7 @@ public class IBeanPropertySymbolItemProvider * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * This constructs an instance from a factory and a notifier. @@ -90,8 +89,8 @@ public class IBeanPropertySymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IBeanPropertySymbol_owner_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IBeanPropertySymbol_owner_feature", "_UI_IBeanPropertySymbol_type"), + getString("_UI_IBeanPropertySymbol_owner_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IBeanPropertySymbol_owner_feature", "_UI_IBeanPropertySymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IBEAN_PROPERTY_SYMBOL__OWNER, true, false, @@ -110,7 +109,7 @@ public class IBeanPropertySymbolItemProvider * @generated */ public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IBeanPropertySymbol")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/IBeanPropertySymbol")); //$NON-NLS-1$ } /** @@ -124,8 +123,8 @@ public class IBeanPropertySymbolItemProvider public String getText(Object object) { String label = ((IBeanPropertySymbol)object).getName(); return label == null || label.length() == 0 ? - getString("_UI_IBeanPropertySymbol_type") : - getString("_UI_IBeanPropertySymbol_type") + " " + label; + getString("_UI_IBeanPropertySymbol_type") : //$NON-NLS-1$ + getString("_UI_IBeanPropertySymbol_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ } /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedJavaTypeDescriptorItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedJavaTypeDescriptorItemProvider.java index 66e9e79e1..ff7f56707 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedJavaTypeDescriptorItemProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedJavaTypeDescriptorItemProvider.java @@ -2,7 +2,7 @@ * <copyright> * </copyright> * - * $Id: IBoundedJavaTypeDescriptorItemProvider.java,v 1.5 2007/04/26 00:08:06 cbateman Exp $ + * $Id: IBoundedJavaTypeDescriptorItemProvider.java,v 1.6 2007/05/07 17:30:21 cbateman Exp $ */ package org.eclipse.jst.jsf.context.symbol.internal.provider; @@ -40,8 +40,7 @@ public class IBoundedJavaTypeDescriptorItemProvider * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * This constructs an instance from a factory and a notifier. @@ -75,7 +74,7 @@ public class IBoundedJavaTypeDescriptorItemProvider * @generated */ public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IBoundedJavaTypeDescriptor")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/IBoundedJavaTypeDescriptor")); //$NON-NLS-1$ } /** @@ -87,8 +86,8 @@ public class IBoundedJavaTypeDescriptorItemProvider public String getText(Object object) { String label = ((IBoundedJavaTypeDescriptor)object).getTypeSignature(); return label == null || label.length() == 0 ? - getString("_UI_IBoundedJavaTypeDescriptor_type") : - getString("_UI_IBoundedJavaTypeDescriptor_type") + " " + label; + getString("_UI_IBoundedJavaTypeDescriptor_type") : //$NON-NLS-1$ + getString("_UI_IBoundedJavaTypeDescriptor_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ } /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedListTypeDescriptorItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedListTypeDescriptorItemProvider.java new file mode 100644 index 000000000..0ee627cae --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedListTypeDescriptorItemProvider.java @@ -0,0 +1,135 @@ +/******************************************************************************* + * Copyright (c) 2007 Oracle Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cameron Bateman/Oracle - initial API and implementation + * + ********************************************************************************/ +package org.eclipse.jst.jsf.context.symbol.internal.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +import org.eclipse.jst.jsf.common.JSFCommonPlugin; + +import org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor; + +/** + * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ +public class IBoundedListTypeDescriptorItemProvider + extends IListTypeDescriptorItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ + + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param adapterFactory + * @generated + */ + public IBoundedListTypeDescriptorItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns IBoundedListTypeDescriptor.gif. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IBoundedListTypeDescriptor")); //$NON-NLS-1$ + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getText(Object object) { + String label = ((IBoundedListTypeDescriptor)object).getTypeSignature(); + return label == null || label.length() == 0 ? + getString("_UI_IBoundedListTypeDescriptor_type") : //$NON-NLS-1$ + getString("_UI_IBoundedListTypeDescriptor_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ResourceLocator getResourceLocator() { + return JSFCommonPlugin.INSTANCE; + } + +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedMapTypeDescriptorItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedMapTypeDescriptorItemProvider.java index 0b3e3bad0..c0c9da2ba 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedMapTypeDescriptorItemProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IBoundedMapTypeDescriptorItemProvider.java @@ -2,7 +2,7 @@ * <copyright> * </copyright> * - * $Id: IBoundedMapTypeDescriptorItemProvider.java,v 1.5 2007/04/26 00:08:06 cbateman Exp $ + * $Id: IBoundedMapTypeDescriptorItemProvider.java,v 1.6 2007/05/07 17:30:21 cbateman Exp $ */ package org.eclipse.jst.jsf.context.symbol.internal.provider; @@ -40,8 +40,7 @@ public class IBoundedMapTypeDescriptorItemProvider * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * This constructs an instance from a factory and a notifier. @@ -75,7 +74,7 @@ public class IBoundedMapTypeDescriptorItemProvider * @generated */ public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IBoundedMapTypeDescriptor")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/IBoundedMapTypeDescriptor")); //$NON-NLS-1$ } /** @@ -87,8 +86,8 @@ public class IBoundedMapTypeDescriptorItemProvider public String getText(Object object) { String label = ((IBoundedMapTypeDescriptor)object).getTypeSignature(); return label == null || label.length() == 0 ? - getString("_UI_IBoundedMapTypeDescriptor_type") : - getString("_UI_IBoundedMapTypeDescriptor_type") + " " + label; + getString("_UI_IBoundedMapTypeDescriptor_type") : //$NON-NLS-1$ + getString("_UI_IBoundedMapTypeDescriptor_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ } /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IComponentSymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IComponentSymbolItemProvider.java index d06acf37c..6f6723732 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IComponentSymbolItemProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IComponentSymbolItemProvider.java @@ -52,8 +52,7 @@ public class IComponentSymbolItemProvider * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * This constructs an instance from a factory and a notifier. @@ -91,7 +90,7 @@ public class IComponentSymbolItemProvider * @generated */ public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IComponentSymbol")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/IComponentSymbol")); //$NON-NLS-1$ } /** @@ -105,7 +104,7 @@ public class IComponentSymbolItemProvider public String getText(Object object) { String label = ((IComponentSymbol)object).getName(); return label == null || label.length() == 0 ? - getString("_UI_IComponentSymbol_type") : + getString("_UI_IComponentSymbol_type") : //$NON-NLS-1$ label; } diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IInstanceSymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IInstanceSymbolItemProvider.java index bc48d4b59..155bfb186 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IInstanceSymbolItemProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IInstanceSymbolItemProvider.java @@ -59,7 +59,7 @@ public class IInstanceSymbolItemProvider * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * This constructs an instance from a factory and a notifier. @@ -106,8 +106,8 @@ public class IInstanceSymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_ISymbol_name_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ISymbol_name_feature", "_UI_ISymbol_type"), + getString("_UI_ISymbol_name_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ISymbol_name_feature", "_UI_ISymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.ISYMBOL__NAME, true, false, @@ -129,8 +129,8 @@ public class IInstanceSymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IObjectSymbol_typeDescriptor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_typeDescriptor_feature", "_UI_IObjectSymbol_type"), + getString("_UI_IObjectSymbol_typeDescriptor_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_typeDescriptor_feature", "_UI_IObjectSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IOBJECT_SYMBOL__TYPE_DESCRIPTOR, true, false, @@ -152,8 +152,8 @@ public class IInstanceSymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IObjectSymbol_readable_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_readable_feature", "_UI_IObjectSymbol_type"), + getString("_UI_IObjectSymbol_readable_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_readable_feature", "_UI_IObjectSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IOBJECT_SYMBOL__READABLE, true, false, @@ -175,8 +175,8 @@ public class IInstanceSymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IObjectSymbol_writable_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_writable_feature", "_UI_IObjectSymbol_type"), + getString("_UI_IObjectSymbol_writable_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_writable_feature", "_UI_IObjectSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IOBJECT_SYMBOL__WRITABLE, true, false, @@ -198,8 +198,8 @@ public class IInstanceSymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IInstanceSymbol_typeResolved_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IInstanceSymbol_typeResolved_feature", "_UI_IInstanceSymbol_type"), + getString("_UI_IInstanceSymbol_typeResolved_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IInstanceSymbol_typeResolved_feature", "_UI_IInstanceSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IINSTANCE_SYMBOL__TYPE_RESOLVED, false, false, @@ -221,8 +221,8 @@ public class IInstanceSymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IInstanceSymbol_runtimeSource_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IInstanceSymbol_runtimeSource_feature", "_UI_IInstanceSymbol_type"), + getString("_UI_IInstanceSymbol_runtimeSource_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IInstanceSymbol_runtimeSource_feature", "_UI_IInstanceSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IINSTANCE_SYMBOL__RUNTIME_SOURCE, true, false, @@ -241,7 +241,7 @@ public class IInstanceSymbolItemProvider * @generated */ public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IInstanceSymbol")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/IInstanceSymbol")); //$NON-NLS-1$ } /** @@ -255,7 +255,7 @@ public class IInstanceSymbolItemProvider public String getText(Object object) { String label = ((IInstanceSymbol)object).getName(); return label == null || label.length() == 0 ? - getString("_UI_IInstanceSymbol_type") : + getString("_UI_IInstanceSymbol_type") : //$NON-NLS-1$ label; } diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IJavaSymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IJavaSymbolItemProvider.java index 5164cab5f..021cd5bed 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IJavaSymbolItemProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IJavaSymbolItemProvider.java @@ -53,7 +53,7 @@ public class IJavaSymbolItemProvider * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * This constructs an instance from a factory and a notifier. @@ -96,8 +96,8 @@ public class IJavaSymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_ISymbol_name_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ISymbol_name_feature", "_UI_ISymbol_type"), + getString("_UI_ISymbol_name_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ISymbol_name_feature", "_UI_ISymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.ISYMBOL__NAME, true, false, @@ -119,8 +119,8 @@ public class IJavaSymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IJavaSymbol_javaElement_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IJavaSymbol_javaElement_feature", "_UI_IJavaSymbol_type"), + getString("_UI_IJavaSymbol_javaElement_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IJavaSymbol_javaElement_feature", "_UI_IJavaSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IJAVA_SYMBOL__JAVA_ELEMENT, true, false, @@ -139,7 +139,7 @@ public class IJavaSymbolItemProvider * @generated */ public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IJavaSymbol")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/IJavaSymbol")); //$NON-NLS-1$ } /** @@ -153,8 +153,8 @@ public class IJavaSymbolItemProvider public String getText(Object object) { String label = ((IJavaSymbol)object).getName(); return label == null || label.length() == 0 ? - getString("_UI_IJavaSymbol_type") : - getString("_UI_IJavaSymbol_type") + " " + label; + getString("_UI_IJavaSymbol_type") : //$NON-NLS-1$ + getString("_UI_IJavaSymbol_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ } /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IJavaTypeDescriptor2ItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IJavaTypeDescriptor2ItemProvider.java index 3ccbf2cdd..1f24e8de5 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IJavaTypeDescriptor2ItemProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IJavaTypeDescriptor2ItemProvider.java @@ -51,8 +51,7 @@ public class IJavaTypeDescriptor2ItemProvider * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * This constructs an instance from a factory and a notifier. @@ -96,8 +95,8 @@ public class IJavaTypeDescriptor2ItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IJavaTypeDescriptor2_type_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IJavaTypeDescriptor2_type_feature", "_UI_IJavaTypeDescriptor2_type"), + getString("_UI_IJavaTypeDescriptor2_type_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IJavaTypeDescriptor2_type_feature", "_UI_IJavaTypeDescriptor2_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IJAVA_TYPE_DESCRIPTOR2__TYPE, true, false, @@ -119,8 +118,8 @@ public class IJavaTypeDescriptor2ItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IJavaTypeDescriptor2_beanProperties_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IJavaTypeDescriptor2_beanProperties_feature", "_UI_IJavaTypeDescriptor2_type"), + getString("_UI_IJavaTypeDescriptor2_beanProperties_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IJavaTypeDescriptor2_beanProperties_feature", "_UI_IJavaTypeDescriptor2_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IJAVA_TYPE_DESCRIPTOR2__BEAN_PROPERTIES, true, false, @@ -142,8 +141,8 @@ public class IJavaTypeDescriptor2ItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IJavaTypeDescriptor2_beanMethods_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IJavaTypeDescriptor2_beanMethods_feature", "_UI_IJavaTypeDescriptor2_type"), + getString("_UI_IJavaTypeDescriptor2_beanMethods_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IJavaTypeDescriptor2_beanMethods_feature", "_UI_IJavaTypeDescriptor2_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IJAVA_TYPE_DESCRIPTOR2__BEAN_METHODS, true, false, @@ -154,6 +153,29 @@ public class IJavaTypeDescriptor2ItemProvider } /** + * This adds a property descriptor for the Array Count feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addArrayCountPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_IJavaTypeDescriptor2_arrayCount_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IJavaTypeDescriptor2_arrayCount_feature", "_UI_IJavaTypeDescriptor2_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + SymbolPackage.Literals.IJAVA_TYPE_DESCRIPTOR2__ARRAY_COUNT, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + + /** * This returns IJavaTypeDescriptor2.gif. * <!-- begin-user-doc --> * @param object @@ -162,7 +184,7 @@ public class IJavaTypeDescriptor2ItemProvider * @generated */ public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IJavaTypeDescriptor2")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/IJavaTypeDescriptor2")); //$NON-NLS-1$ } /** @@ -176,8 +198,8 @@ public class IJavaTypeDescriptor2ItemProvider public String getText(Object object) { String label = ((IJavaTypeDescriptor2)object).getTypeSignature(); return label == null || label.length() == 0 ? - getString("_UI_IJavaTypeDescriptor2_type") : - getString("_UI_IJavaTypeDescriptor2_type") + " " + label; + getString("_UI_IJavaTypeDescriptor2_type") : //$NON-NLS-1$ + getString("_UI_IJavaTypeDescriptor2_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ } /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IListTypeDescriptorItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IListTypeDescriptorItemProvider.java new file mode 100644 index 000000000..45a3cf162 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IListTypeDescriptorItemProvider.java @@ -0,0 +1,169 @@ +/******************************************************************************* + * Copyright (c) 2007 Oracle Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Cameron Bateman/Oracle - initial API and implementation + * + ********************************************************************************/ +package org.eclipse.jst.jsf.context.symbol.internal.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.jst.jsf.common.JSFCommonPlugin; + +import org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor; +import org.eclipse.jst.jsf.context.symbol.SymbolPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ +public class IListTypeDescriptorItemProvider + extends ITypeDescriptorItemProvider + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ + + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> + * @param adapterFactory + * <!-- end-user-doc --> + * @generated + */ + public IListTypeDescriptorItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addListSourcePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the List Source feature. + * <!-- begin-user-doc --> + * @param object + * <!-- end-user-doc --> + * @generated + */ + protected void addListSourcePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_IListTypeDescriptor_listSource_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IListTypeDescriptor_listSource_feature", "_UI_IListTypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + SymbolPackage.Literals.ILIST_TYPE_DESCRIPTOR__LIST_SOURCE, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns IListTypeDescriptor.gif. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IListTypeDescriptor")); //$NON-NLS-1$ + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getText(Object object) { + String label = ((IListTypeDescriptor)object).getTypeSignature(); + return label == null || label.length() == 0 ? + getString("_UI_IListTypeDescriptor_type") : //$NON-NLS-1$ + getString("_UI_IListTypeDescriptor_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * This handles model notifications by calling {@link #updateChildren(Notification)} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged(Notification)}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(IListTypeDescriptor.class)) { + case SymbolPackage.ILIST_TYPE_DESCRIPTOR__LIST_SOURCE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ResourceLocator getResourceLocator() { + return JSFCommonPlugin.INSTANCE; + } + +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IMapTypeDescriptorItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IMapTypeDescriptorItemProvider.java index 9fc6073a3..aab70d850 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IMapTypeDescriptorItemProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IMapTypeDescriptorItemProvider.java @@ -51,8 +51,7 @@ public class IMapTypeDescriptorItemProvider * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * This constructs an instance from a factory and a notifier. @@ -95,8 +94,8 @@ public class IMapTypeDescriptorItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IMapTypeDescriptor_mapSource_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IMapTypeDescriptor_mapSource_feature", "_UI_IMapTypeDescriptor_type"), + getString("_UI_IMapTypeDescriptor_mapSource_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IMapTypeDescriptor_mapSource_feature", "_UI_IMapTypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IMAP_TYPE_DESCRIPTOR__MAP_SOURCE, true, false, @@ -118,8 +117,8 @@ public class IMapTypeDescriptorItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IMapTypeDescriptor_immutable_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IMapTypeDescriptor_immutable_feature", "_UI_IMapTypeDescriptor_type"), + getString("_UI_IMapTypeDescriptor_immutable_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IMapTypeDescriptor_immutable_feature", "_UI_IMapTypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IMAP_TYPE_DESCRIPTOR__IMMUTABLE, true, false, @@ -138,7 +137,7 @@ public class IMapTypeDescriptorItemProvider * @generated */ public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IMapTypeDescriptor")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/IMapTypeDescriptor")); //$NON-NLS-1$ } /** @@ -152,8 +151,8 @@ public class IMapTypeDescriptorItemProvider public String getText(Object object) { String label = ((IMapTypeDescriptor)object).getTypeSignature(); return label == null || label.length() == 0 ? - getString("_UI_IMapTypeDescriptor_type") : - getString("_UI_IMapTypeDescriptor_type") + " " + label; + getString("_UI_IMapTypeDescriptor_type") : //$NON-NLS-1$ + getString("_UI_IMapTypeDescriptor_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ } /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IMethodSymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IMethodSymbolItemProvider.java index ea180689e..0d2902168 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IMethodSymbolItemProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IMethodSymbolItemProvider.java @@ -50,7 +50,7 @@ public class IMethodSymbolItemProvider * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * This constructs an instance from a factory and a notifier. @@ -93,8 +93,8 @@ public class IMethodSymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_ISymbol_name_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ISymbol_name_feature", "_UI_ISymbol_type"), + getString("_UI_ISymbol_name_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ISymbol_name_feature", "_UI_ISymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.ISYMBOL__NAME, true, false, @@ -116,8 +116,8 @@ public class IMethodSymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IMethodSymbol_signature_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IMethodSymbol_signature_feature", "_UI_IMethodSymbol_type"), + getString("_UI_IMethodSymbol_signature_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IMethodSymbol_signature_feature", "_UI_IMethodSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IMETHOD_SYMBOL__SIGNATURE, true, false, @@ -136,7 +136,7 @@ public class IMethodSymbolItemProvider * @generated */ public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IMethodSymbol")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/IMethodSymbol")); //$NON-NLS-1$ } /** @@ -150,8 +150,8 @@ public class IMethodSymbolItemProvider public String getText(Object object) { String label = ((IMethodSymbol)object).getName(); return label == null || label.length() == 0 ? - getString("_UI_IMethodSymbol_type") : - getString("_UI_IMethodSymbol_type") + " " + label; + getString("_UI_IMethodSymbol_type") : //$NON-NLS-1$ + getString("_UI_IMethodSymbol_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ } /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IPropertySymbolItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IPropertySymbolItemProvider.java index 1e6664fa1..b142f7a77 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IPropertySymbolItemProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/IPropertySymbolItemProvider.java @@ -61,7 +61,7 @@ public class IPropertySymbolItemProvider * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * This constructs an instance from a factory and a notifier. @@ -107,8 +107,8 @@ public class IPropertySymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_ISymbol_name_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ISymbol_name_feature", "_UI_ISymbol_type"), + getString("_UI_ISymbol_name_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ISymbol_name_feature", "_UI_ISymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.ISYMBOL__NAME, true, false, @@ -130,8 +130,8 @@ public class IPropertySymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IObjectSymbol_typeDescriptor_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_typeDescriptor_feature", "_UI_IObjectSymbol_type"), + getString("_UI_IObjectSymbol_typeDescriptor_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_typeDescriptor_feature", "_UI_IObjectSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IOBJECT_SYMBOL__TYPE_DESCRIPTOR, true, false, @@ -153,8 +153,8 @@ public class IPropertySymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IObjectSymbol_readable_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_readable_feature", "_UI_IObjectSymbol_type"), + getString("_UI_IObjectSymbol_readable_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_readable_feature", "_UI_IObjectSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IOBJECT_SYMBOL__READABLE, true, false, @@ -176,8 +176,8 @@ public class IPropertySymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IObjectSymbol_writable_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_writable_feature", "_UI_IObjectSymbol_type"), + getString("_UI_IObjectSymbol_writable_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IObjectSymbol_writable_feature", "_UI_IObjectSymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IOBJECT_SYMBOL__WRITABLE, true, false, @@ -199,8 +199,8 @@ public class IPropertySymbolItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_IPropertySymbol_intermediate_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_IPropertySymbol_intermediate_feature", "_UI_IPropertySymbol_type"), + getString("_UI_IPropertySymbol_intermediate_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_IPropertySymbol_intermediate_feature", "_UI_IPropertySymbol_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.IPROPERTY_SYMBOL__INTERMEDIATE, true, false, @@ -219,7 +219,7 @@ public class IPropertySymbolItemProvider * @generated */ public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/IPropertySymbol")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/IPropertySymbol")); //$NON-NLS-1$ } /** @@ -233,7 +233,7 @@ public class IPropertySymbolItemProvider public String getText(Object object) { String label = ((IPropertySymbol)object).getName(); return label == null || label.length() == 0 ? - getString("_UI_IPropertySymbol_type") : + getString("_UI_IPropertySymbol_type") : //$NON-NLS-1$ label; } @@ -298,7 +298,7 @@ public class IPropertySymbolItemProvider */ public ICompletionProposal[] getProposals(Object target1, IProposalCreationFactory proposalFactory) { - return getProposalsInternal((IPropertySymbol) target1, proposalFactory, ""); + return getProposalsInternal((IPropertySymbol) target1, proposalFactory, ""); //$NON-NLS-1$ } private ICompletionProposal[] getProposalsInternal(IPropertySymbol symbol, IProposalCreationFactory proposalFactory, String intermediatePrefix) @@ -318,7 +318,7 @@ public class IPropertySymbolItemProvider if (!propSymbol.isIntermediate()) { - final String replacementText = "['" + intermediatePrefix + symbol.getName() + "." + propSymbol.getName() + "']"; + final String replacementText = "['" + intermediatePrefix + symbol.getName() + "." + propSymbol.getName() + "']"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ completions.add(proposalFactory.createProposal( replacementText, replacementText, @@ -327,7 +327,7 @@ public class IPropertySymbolItemProvider } else { - completions.addAll(Arrays.asList(getProposalsInternal(propSymbol, proposalFactory, intermediatePrefix+symbol.getName()+"."))); + completions.addAll(Arrays.asList(getProposalsInternal(propSymbol, proposalFactory, intermediatePrefix+symbol.getName()+"."))); //$NON-NLS-1$ } } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/ITypeDescriptorItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/ITypeDescriptorItemProvider.java index 321c15e33..21986e5c4 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/ITypeDescriptorItemProvider.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/ITypeDescriptorItemProvider.java @@ -53,7 +53,7 @@ public class ITypeDescriptorItemProvider * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * This constructs an instance from a factory and a notifier. @@ -100,8 +100,8 @@ public class ITypeDescriptorItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_ITypeDescriptor_properties_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_properties_feature", "_UI_ITypeDescriptor_type"), + getString("_UI_ITypeDescriptor_properties_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_properties_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.ITYPE_DESCRIPTOR__PROPERTIES, true, false, @@ -123,8 +123,8 @@ public class ITypeDescriptorItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_ITypeDescriptor_typeSignature_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_typeSignature_feature", "_UI_ITypeDescriptor_type"), + getString("_UI_ITypeDescriptor_typeSignature_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_typeSignature_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.ITYPE_DESCRIPTOR__TYPE_SIGNATURE, false, false, @@ -146,8 +146,8 @@ public class ITypeDescriptorItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_ITypeDescriptor_superTypeSignatures_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_superTypeSignatures_feature", "_UI_ITypeDescriptor_type"), + getString("_UI_ITypeDescriptor_superTypeSignatures_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_superTypeSignatures_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.ITYPE_DESCRIPTOR__SUPER_TYPE_SIGNATURES, true, false, @@ -169,8 +169,8 @@ public class ITypeDescriptorItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_ITypeDescriptor_interfaceTypeSignatures_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_interfaceTypeSignatures_feature", "_UI_ITypeDescriptor_type"), + getString("_UI_ITypeDescriptor_interfaceTypeSignatures_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_interfaceTypeSignatures_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.ITYPE_DESCRIPTOR__INTERFACE_TYPE_SIGNATURES, true, false, @@ -192,8 +192,8 @@ public class ITypeDescriptorItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_ITypeDescriptor_typeSignatureDelegate_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_typeSignatureDelegate_feature", "_UI_ITypeDescriptor_type"), + getString("_UI_ITypeDescriptor_typeSignatureDelegate_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_typeSignatureDelegate_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.ITYPE_DESCRIPTOR__TYPE_SIGNATURE_DELEGATE, true, false, @@ -215,8 +215,8 @@ public class ITypeDescriptorItemProvider (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_ITypeDescriptor_methods_feature"), - getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_methods_feature", "_UI_ITypeDescriptor_type"), + getString("_UI_ITypeDescriptor_methods_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_methods_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SymbolPackage.Literals.ITYPE_DESCRIPTOR__METHODS, true, false, @@ -227,6 +227,50 @@ public class ITypeDescriptorItemProvider } /** + * This adds a property descriptor for the Type Parameter Signatures feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addTypeParameterSignaturesPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ITypeDescriptor_typeParameterSignatures_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_typeParameterSignatures_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + SymbolPackage.Literals.ITYPE_DESCRIPTOR__TYPE_PARAMETER_SIGNATURES, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Jdt Context feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addJdtContextPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ITypeDescriptor_jdtContext_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ITypeDescriptor_jdtContext_feature", "_UI_ITypeDescriptor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + SymbolPackage.Literals.ITYPE_DESCRIPTOR__JDT_CONTEXT, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** * This returns ITypeDescriptor.gif. * <!-- begin-user-doc --> * @param object @@ -235,7 +279,7 @@ public class ITypeDescriptorItemProvider * @generated */ public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/ITypeDescriptor")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/ITypeDescriptor")); //$NON-NLS-1$ } /** @@ -249,8 +293,8 @@ public class ITypeDescriptorItemProvider public String getText(Object object) { String label = ((ITypeDescriptor)object).getTypeSignature(); return label == null || label.length() == 0 ? - getString("_UI_ITypeDescriptor_type") : - getString("_UI_ITypeDescriptor_type") + " " + label; + getString("_UI_ITypeDescriptor_type") : //$NON-NLS-1$ + getString("_UI_ITypeDescriptor_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ } /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/SymbolItemProviderAdapterFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/SymbolItemProviderAdapterFactory.java index 79f1e0249..cf7f6a0cd 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/SymbolItemProviderAdapterFactory.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/provider/SymbolItemProviderAdapterFactory.java @@ -46,8 +46,7 @@ public class SymbolItemProviderAdapterFactory extends SymbolAdapterFactory imple * <!-- end-user-doc --> * @generated */ - @SuppressWarnings("hiding") - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * This keeps track of the root adapter factory that delegates to this adapter factory. @@ -365,6 +364,50 @@ public class SymbolItemProviderAdapterFactory extends SymbolAdapterFactory imple } /** + * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected IListTypeDescriptorItemProvider iListTypeDescriptorItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.jst.jsf.context.symbol.IListTypeDescriptor}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Adapter createIListTypeDescriptorAdapter() { + if (iListTypeDescriptorItemProvider == null) { + iListTypeDescriptorItemProvider = new IListTypeDescriptorItemProvider(this); + } + + return iListTypeDescriptorItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected IBoundedListTypeDescriptorItemProvider iBoundedListTypeDescriptorItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.jst.jsf.context.symbol.IBoundedListTypeDescriptor}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Adapter createIBoundedListTypeDescriptorAdapter() { + if (iBoundedListTypeDescriptorItemProvider == null) { + iBoundedListTypeDescriptorItemProvider = new IBoundedListTypeDescriptorItemProvider(this); + } + + return iBoundedListTypeDescriptorItemProvider; + } + + /** * This returns the root adapter factory that contains this factory. * <!-- begin-user-doc --> * @return the adapter factory diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/IObjectSymbolBasedValueType.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/IObjectSymbolBasedValueType.java index 622a6bccd..70d049ea1 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/IObjectSymbolBasedValueType.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/IObjectSymbolBasedValueType.java @@ -48,6 +48,7 @@ public class IObjectSymbolBasedValueType extends ValueType public IObjectSymbolBasedValueType(final IInstanceSymbol symbol) { this(symbol.getTypeDescriptor().getTypeSignature(), + (String[])symbol.getTypeDescriptor().getTypeParameterSignatures().toArray(EMPTY_STRING_ARRAY), (String[])symbol.getTypeDescriptor().getSuperTypeSignatures().toArray(EMPTY_STRING_ARRAY), (String[])symbol.getTypeDescriptor().getInterfaceTypeSignatures().toArray(EMPTY_STRING_ARRAY), IAssignable.ASSIGNMENT_TYPE_RHS /* variables are not assignable */ @@ -62,19 +63,21 @@ public class IObjectSymbolBasedValueType extends ValueType public IObjectSymbolBasedValueType(final IPropertySymbol symbol) { this(symbol.getTypeDescriptor().getTypeSignature(), - (String[])symbol.getTypeDescriptor().getSuperTypeSignatures().toArray(EMPTY_STRING_ARRAY), - (String[])symbol.getTypeDescriptor().getInterfaceTypeSignatures().toArray(EMPTY_STRING_ARRAY), - ASSIGNMENT_TYPE_NONE | (symbol.isReadable()?IAssignable.ASSIGNMENT_TYPE_RHS:ASSIGNMENT_TYPE_NONE)|(symbol.isWritable()?IAssignable.ASSIGNMENT_TYPE_LHS:ASSIGNMENT_TYPE_NONE) + (String[])symbol.getTypeDescriptor().getTypeParameterSignatures().toArray(EMPTY_STRING_ARRAY), + (String[])symbol.getTypeDescriptor().getSuperTypeSignatures().toArray(EMPTY_STRING_ARRAY), + (String[])symbol.getTypeDescriptor().getInterfaceTypeSignatures().toArray(EMPTY_STRING_ARRAY), + ASSIGNMENT_TYPE_NONE | (symbol.isReadable()?IAssignable.ASSIGNMENT_TYPE_RHS:ASSIGNMENT_TYPE_NONE)|(symbol.isWritable()?IAssignable.ASSIGNMENT_TYPE_LHS:ASSIGNMENT_TYPE_NONE) , symbol); } private IObjectSymbolBasedValueType(final String signature, + final String[] typeArgs, final String[] superTypes, final String[] interfaceTypes, final int assignmentMask, final IObjectSymbol symbol) { - super(signature, superTypes, interfaceTypes, assignmentMask); + super(signature, typeArgs, superTypes, interfaceTypes, assignmentMask); _symbol = symbol; } diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/SymbolAdapterFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/SymbolAdapterFactory.java index a73ea68dd..dcecf364a 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/SymbolAdapterFactory.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/SymbolAdapterFactory.java @@ -52,7 +52,7 @@ public class SymbolAdapterFactory extends AdapterFactoryImpl { * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * The cached model package. diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/SymbolSwitch.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/SymbolSwitch.java index 1deafc17a..92c774619 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/SymbolSwitch.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/internal/util/SymbolSwitch.java @@ -57,7 +57,7 @@ public class SymbolSwitch { * <!-- end-user-doc --> * @generated */ - public static final String copyright = "Copyright 2006 Oracle"; + public static final String copyright = "Copyright 2006 Oracle"; //$NON-NLS-1$ /** * The cached model package diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/AbstractContextSymbolFactory.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/AbstractContextSymbolFactory.java index 0be352b01..831d8c816 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/AbstractContextSymbolFactory.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/AbstractContextSymbolFactory.java @@ -41,11 +41,11 @@ public abstract class AbstractContextSymbolFactory { if (!supports(context)) { - throw new IllegalArgumentException("Unsupported context"); + throw new IllegalArgumentException("Unsupported context"); //$NON-NLS-1$ } else if (!ISymbolConstants.isValid(scope)) { - throw new IllegalArgumentException("Unsupported symbol constant:"+scope); + throw new IllegalArgumentException("Unsupported symbol constant:"+scope); //$NON-NLS-1$ } return internalCreate(symbolName, scope, context, problems); diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/ISymbolConstants.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/ISymbolConstants.java index 619b08093..790a42d40 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/ISymbolConstants.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/symbol/source/ISymbolConstants.java @@ -51,23 +51,23 @@ public class ISymbolConstants { /** * the string representation for request scope */ - public final static String SYMBOL_SCOPE_REQUEST_STRING = "request"; + public final static String SYMBOL_SCOPE_REQUEST_STRING = "request"; //$NON-NLS-1$ /** * the string representation for session scope */ - public final static String SYMBOL_SCOPE_SESSION_STRING = "session"; + public final static String SYMBOL_SCOPE_SESSION_STRING = "session"; //$NON-NLS-1$ /** * the string representation for application scope */ - public final static String SYMBOL_SCOPE_APPLICATION_STRING = "application"; + public final static String SYMBOL_SCOPE_APPLICATION_STRING = "application"; //$NON-NLS-1$ /** * the string representation for none scope */ - public final static String SYMBOL_SCOPE_NONE_STRING = "none"; + public final static String SYMBOL_SCOPE_NONE_STRING = "none"; //$NON-NLS-1$ /** * @param scope |