summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsefftinge2008-03-07 09:21:05 (EST)
committer sefftinge2008-03-07 09:21:05 (EST)
commit1b5d2c26e3551cb0b3ef449b1eed0e27120c1df0 (patch)
tree1b4868ade3e1be6cd65c2a75a15c4b4a9338e901
parent25fda923f26f3f39d51ff91b037bb8c4d1815c42 (diff)
downloadorg.eclipse.xpand-1b5d2c26e3551cb0b3ef449b1eed0e27120c1df0.zip
org.eclipse.xpand-1b5d2c26e3551cb0b3ef449b1eed0e27120c1df0.tar.gz
org.eclipse.xpand-1b5d2c26e3551cb0b3ef449b1eed0e27120c1df0.tar.bz2
built-in typesystem
-rw-r--r--plugins/org.eclipse.xpand3/.project6
-rw-r--r--plugins/org.eclipse.xpand3/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/AbstractNamedElement.java2
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/AbstractTypeReference.java2
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredFunction.java12
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredParameter.java12
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredProperty.java39
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredStaticProperty.java12
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredType.java21
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredTypeParameter.java8
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/FunctionType.java8
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/Model.java46
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/StaticTypesystemFactory.java11
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/StaticTypesystemPackage.java201
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/Type.java8
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/TypeVariable.java2
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/VoidType.java2
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/WildcardType.java14
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/AbstractNamedElementImpl.java2
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/AbstractTypeReferenceImpl.java2
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredFunctionImpl.java42
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredParameterImpl.java55
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredPropertyImpl.java120
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredStaticPropertyImpl.java55
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredTypeImpl.java44
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredTypeParameterImpl.java24
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/FunctionTypeImpl.java23
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/ModelImpl.java156
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/StaticTypesystemFactoryImpl.java16
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/StaticTypesystemPackageImpl.java77
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/TypeImpl.java23
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/TypeVariableImpl.java3
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/VoidTypeImpl.java2
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/WildcardTypeImpl.java30
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/util/StaticTypesystemAdapterFactory.java20
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/util/StaticTypesystemSwitch.java23
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/AbstractNamedElementValidator.java20
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/AbstractTypeReferenceValidator.java19
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredFunctionValidator.java27
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredParameterValidator.java21
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredPropertyValidator.java21
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredStaticPropertyValidator.java21
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredTypeParameterValidator.java23
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredTypeValidator.java27
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/FunctionTypeValidator.java25
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/TypeValidator.java25
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/TypeVariableValidator.java21
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/VoidTypeValidator.java19
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/WildcardTypeValidator.java24
-rw-r--r--plugins/org.eclipse.xpand3/src/built-in.xmi75
-rw-r--r--plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/TypeSystem.java32
-rw-r--r--plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/TypeSystemImpl.java2
-rw-r--r--plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/builtin/BuiltinDeclarationsContributor.java8
-rw-r--r--plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/builtin/BuiltinTypeSystem.java85
-rw-r--r--plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/java/JavaDeclarationsContributor.java185
-rw-r--r--plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/java/JavaMapped.example.txt45
-rw-r--r--plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/xpand3/Xpand3ResourceDeclarationsContributor.java3
-rw-r--r--plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/util/ClassLoaderLoaderImpl.java55
-rw-r--r--plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/util/Loader.java19
-rw-r--r--plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/util/LoaderFactory.java40
-rw-r--r--plugins/org.eclipse.xpand3/src/staticTypesystem/Presentation.ext32
-rw-r--r--plugins/org.eclipse.xpand3/src/static_typesystem.ecore29
-rw-r--r--tests/org.eclipse.xpand3.tests/src/org/eclipse/xpand3/analyzation/TypeSystemTest.java (renamed from plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/CompositeXpand3TypeSystem.java)12
63 files changed, 1522 insertions, 519 deletions
diff --git a/plugins/org.eclipse.xpand3/.project b/plugins/org.eclipse.xpand3/.project
index 93fe7e9..3bdc4df 100644
--- a/plugins/org.eclipse.xpand3/.project
+++ b/plugins/org.eclipse.xpand3/.project
@@ -20,9 +20,15 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.openarchitectureware.base.oawBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.openarchitectureware.base.oawNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.xpand3/META-INF/MANIFEST.MF b/plugins/org.eclipse.xpand3/META-INF/MANIFEST.MF
index 98f8410..9359613 100644
--- a/plugins/org.eclipse.xpand3/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.xpand3/META-INF/MANIFEST.MF
@@ -11,7 +11,8 @@ Require-Bundle: org.antlr.patched;bundle-version="3.0.0",
org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.xtend.backend;bundle-version="0.7.0",
- org.junit
+ org.junit,
+ org.eclipse.emf.ecore.xmi;bundle-version="2.3.0"
Export-Package: org.eclipse.xpand3.analyzation,
org.eclipse.xpand3,
org.eclipse.xpand3.analyzation.typesystem,
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/AbstractNamedElement.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/AbstractNamedElement.java
index 9d1c6c3..0ab644c 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/AbstractNamedElement.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/AbstractNamedElement.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: AbstractNamedElement.java,v 1.4 2008/03/07 11:10:33 jkohnlein Exp $
+ * $Id: AbstractNamedElement.java,v 1.5 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem;
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/AbstractTypeReference.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/AbstractTypeReference.java
index 74f1486..ba842bd 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/AbstractTypeReference.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/AbstractTypeReference.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: AbstractTypeReference.java,v 1.4 2008/03/07 11:10:33 jkohnlein Exp $
+ * $Id: AbstractTypeReference.java,v 1.5 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem;
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredFunction.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredFunction.java
index 3d0c246..8b6e7ff 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredFunction.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredFunction.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: DeclaredFunction.java,v 1.3 2008/03/07 11:10:33 jkohnlein Exp $
+ * $Id: DeclaredFunction.java,v 1.4 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem;
@@ -60,26 +60,26 @@ public interface DeclaredFunction extends AbstractNamedElement {
EList<DeclaredTypeParameter> getDeclaredTypeParameters();
/**
- * Returns the value of the '<em><b>Return Type</b></em>' reference.
+ * Returns the value of the '<em><b>Return Type</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Return Type</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Return Type</em>' reference.
+ * @return the value of the '<em>Return Type</em>' containment reference.
* @see #setReturnType(AbstractTypeReference)
* @see org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage#getDeclaredFunction_ReturnType()
- * @model
+ * @model containment="true"
* @generated
*/
AbstractTypeReference getReturnType();
/**
- * Sets the value of the '{@link org.eclipse.xpand3.staticTypesystem.DeclaredFunction#getReturnType <em>Return Type</em>}' reference.
+ * Sets the value of the '{@link org.eclipse.xpand3.staticTypesystem.DeclaredFunction#getReturnType <em>Return Type</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Return Type</em>' reference.
+ * @param value the new value of the '<em>Return Type</em>' containment reference.
* @see #getReturnType()
* @generated
*/
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredParameter.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredParameter.java
index 03f381c..3c1a2d7 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredParameter.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredParameter.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: DeclaredParameter.java,v 1.3 2008/03/07 11:10:32 jkohnlein Exp $
+ * $Id: DeclaredParameter.java,v 1.4 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem;
@@ -25,26 +25,26 @@ package org.eclipse.xpand3.staticTypesystem;
*/
public interface DeclaredParameter extends AbstractNamedElement {
/**
- * Returns the value of the '<em><b>Type</b></em>' reference.
+ * Returns the value of the '<em><b>Type</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Type</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Type</em>' reference.
+ * @return the value of the '<em>Type</em>' containment reference.
* @see #setType(AbstractTypeReference)
* @see org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage#getDeclaredParameter_Type()
- * @model required="true"
+ * @model containment="true" required="true"
* @generated
*/
AbstractTypeReference getType();
/**
- * Sets the value of the '{@link org.eclipse.xpand3.staticTypesystem.DeclaredParameter#getType <em>Type</em>}' reference.
+ * Sets the value of the '{@link org.eclipse.xpand3.staticTypesystem.DeclaredParameter#getType <em>Type</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Type</em>' reference.
+ * @param value the new value of the '<em>Type</em>' containment reference.
* @see #getType()
* @generated
*/
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredProperty.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredProperty.java
index 0d4a1b1..55e4d98 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredProperty.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredProperty.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: DeclaredProperty.java,v 1.3 2008/03/07 11:10:33 jkohnlein Exp $
+ * $Id: DeclaredProperty.java,v 1.4 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem;
@@ -16,6 +16,7 @@ package org.eclipse.xpand3.staticTypesystem;
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.xpand3.staticTypesystem.DeclaredProperty#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.xpand3.staticTypesystem.DeclaredProperty#isReadOnly <em>Read Only</em>}</li>
* </ul>
* </p>
*
@@ -25,29 +26,55 @@ package org.eclipse.xpand3.staticTypesystem;
*/
public interface DeclaredProperty extends AbstractNamedElement {
/**
- * Returns the value of the '<em><b>Type</b></em>' reference.
+ * Returns the value of the '<em><b>Type</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Type</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Type</em>' reference.
+ * @return the value of the '<em>Type</em>' containment reference.
* @see #setType(AbstractTypeReference)
* @see org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage#getDeclaredProperty_Type()
- * @model required="true"
+ * @model containment="true" required="true"
* @generated
*/
AbstractTypeReference getType();
/**
- * Sets the value of the '{@link org.eclipse.xpand3.staticTypesystem.DeclaredProperty#getType <em>Type</em>}' reference.
+ * Sets the value of the '{@link org.eclipse.xpand3.staticTypesystem.DeclaredProperty#getType <em>Type</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Type</em>' reference.
+ * @param value the new value of the '<em>Type</em>' containment reference.
* @see #getType()
* @generated
*/
void setType(AbstractTypeReference value);
+ /**
+ * Returns the value of the '<em><b>Read Only</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Read Only</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Read Only</em>' attribute.
+ * @see #setReadOnly(boolean)
+ * @see org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage#getDeclaredProperty_ReadOnly()
+ * @model
+ * @generated
+ */
+ boolean isReadOnly();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xpand3.staticTypesystem.DeclaredProperty#isReadOnly <em>Read Only</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Read Only</em>' attribute.
+ * @see #isReadOnly()
+ * @generated
+ */
+ void setReadOnly(boolean value);
+
} // DeclaredProperty
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredStaticProperty.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredStaticProperty.java
index aa90c06..ae922e0 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredStaticProperty.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredStaticProperty.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: DeclaredStaticProperty.java,v 1.3 2008/03/07 11:10:33 jkohnlein Exp $
+ * $Id: DeclaredStaticProperty.java,v 1.4 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem;
@@ -25,26 +25,26 @@ package org.eclipse.xpand3.staticTypesystem;
*/
public interface DeclaredStaticProperty extends AbstractNamedElement {
/**
- * Returns the value of the '<em><b>Type</b></em>' reference.
+ * Returns the value of the '<em><b>Type</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Type</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Type</em>' reference.
+ * @return the value of the '<em>Type</em>' containment reference.
* @see #setType(Type)
* @see org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage#getDeclaredStaticProperty_Type()
- * @model required="true"
+ * @model containment="true" required="true"
* @generated
*/
Type getType();
/**
- * Sets the value of the '{@link org.eclipse.xpand3.staticTypesystem.DeclaredStaticProperty#getType <em>Type</em>}' reference.
+ * Sets the value of the '{@link org.eclipse.xpand3.staticTypesystem.DeclaredStaticProperty#getType <em>Type</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Type</em>' reference.
+ * @param value the new value of the '<em>Type</em>' containment reference.
* @see #getType()
* @generated
*/
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredType.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredType.java
index 8cd240b..1d59e02 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredType.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredType.java
@@ -2,12 +2,14 @@
* <copyright>
* </copyright>
*
- * $Id: DeclaredType.java,v 1.4 2008/03/07 11:10:32 jkohnlein Exp $
+ * $Id: DeclaredType.java,v 1.5 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem;
import org.eclipse.emf.common.util.EList;
+import org.eclipse.xtend.backend.common.BackendType;
+
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Declared Type</b></em>'.
@@ -19,6 +21,7 @@ import org.eclipse.emf.common.util.EList;
* <li>{@link org.eclipse.xpand3.staticTypesystem.DeclaredType#getStaticProperties <em>Static Properties</em>}</li>
* <li>{@link org.eclipse.xpand3.staticTypesystem.DeclaredType#getProperties <em>Properties</em>}</li>
* <li>{@link org.eclipse.xpand3.staticTypesystem.DeclaredType#getDeclaredTypeParameters <em>Declared Type Parameters</em>}</li>
+ * <li>{@link org.eclipse.xpand3.staticTypesystem.DeclaredType#getSuperTypes <em>Super Types</em>}</li>
* </ul>
* </p>
*
@@ -75,4 +78,20 @@ public interface DeclaredType extends AbstractNamedElement {
*/
EList<DeclaredTypeParameter> getDeclaredTypeParameters();
+ /**
+ * Returns the value of the '<em><b>Super Types</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.xpand3.staticTypesystem.AbstractTypeReference}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Super Types</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Super Types</em>' containment reference list.
+ * @see org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage#getDeclaredType_SuperTypes()
+ * @model containment="true"
+ * @generated
+ */
+ EList<AbstractTypeReference> getSuperTypes();
+
} // DeclaredType
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredTypeParameter.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredTypeParameter.java
index 9db4177..ca136c7 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredTypeParameter.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/DeclaredTypeParameter.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: DeclaredTypeParameter.java,v 1.3 2008/03/07 11:10:32 jkohnlein Exp $
+ * $Id: DeclaredTypeParameter.java,v 1.4 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem;
@@ -26,7 +26,7 @@ import org.eclipse.emf.common.util.EList;
*/
public interface DeclaredTypeParameter extends AbstractNamedElement {
/**
- * Returns the value of the '<em><b>Upper Bounds</b></em>' reference list.
+ * Returns the value of the '<em><b>Upper Bounds</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.xpand3.staticTypesystem.AbstractTypeReference}.
* <!-- begin-user-doc -->
* <p>
@@ -34,9 +34,9 @@ public interface DeclaredTypeParameter extends AbstractNamedElement {
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Upper Bounds</em>' reference list.
+ * @return the value of the '<em>Upper Bounds</em>' containment reference list.
* @see org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage#getDeclaredTypeParameter_UpperBounds()
- * @model
+ * @model containment="true"
* @generated
*/
EList<AbstractTypeReference> getUpperBounds();
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/FunctionType.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/FunctionType.java
index 7e04666..6296f59 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/FunctionType.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/FunctionType.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: FunctionType.java,v 1.4 2008/03/07 11:10:32 jkohnlein Exp $
+ * $Id: FunctionType.java,v 1.5 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem;
@@ -53,7 +53,7 @@ public interface FunctionType extends AbstractTypeReference {
void setDeclaredFunction(DeclaredFunction value);
/**
- * Returns the value of the '<em><b>Actual Type Arguments</b></em>' reference list.
+ * Returns the value of the '<em><b>Actual Type Arguments</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.xpand3.staticTypesystem.AbstractTypeReference}.
* <!-- begin-user-doc -->
* <p>
@@ -61,9 +61,9 @@ public interface FunctionType extends AbstractTypeReference {
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Actual Type Arguments</em>' reference list.
+ * @return the value of the '<em>Actual Type Arguments</em>' containment reference list.
* @see org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage#getFunctionType_ActualTypeArguments()
- * @model
+ * @model containment="true"
* @generated
*/
EList<AbstractTypeReference> getActualTypeArguments();
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/Model.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/Model.java
new file mode 100644
index 0000000..fd4c050
--- /dev/null
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/Model.java
@@ -0,0 +1,46 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Model.java,v 1.1 2008/03/07 14:21:08 sefftinge Exp $
+ */
+package org.eclipse.xpand3.staticTypesystem;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Model</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.xpand3.staticTypesystem.Model#getDeclarations <em>Declarations</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage#getModel()
+ * @model
+ * @generated
+ */
+public interface Model extends EObject {
+ /**
+ * Returns the value of the '<em><b>Declarations</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.xpand3.staticTypesystem.DeclaredType}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Declarations</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Declarations</em>' containment reference list.
+ * @see org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage#getModel_Declarations()
+ * @model containment="true"
+ * @generated
+ */
+ EList<DeclaredType> getDeclarations();
+
+} // Model
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/StaticTypesystemFactory.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/StaticTypesystemFactory.java
index 77cb956..b936ed3 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/StaticTypesystemFactory.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/StaticTypesystemFactory.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: StaticTypesystemFactory.java,v 1.4 2008/03/07 11:10:33 jkohnlein Exp $
+ * $Id: StaticTypesystemFactory.java,v 1.5 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem;
@@ -125,6 +125,15 @@ public interface StaticTypesystemFactory extends EFactory {
DeclaredParameter createDeclaredParameter();
/**
+ * Returns a new object of class '<em>Model</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Model</em>'.
+ * @generated
+ */
+ Model createModel();
+
+ /**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/StaticTypesystemPackage.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/StaticTypesystemPackage.java
index 4a2163e..a9c1911 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/StaticTypesystemPackage.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/StaticTypesystemPackage.java
@@ -2,12 +2,13 @@
* <copyright>
* </copyright>
*
- * $Id: StaticTypesystemPackage.java,v 1.6 2008/03/07 11:10:33 jkohnlein Exp $
+ * $Id: StaticTypesystemPackage.java,v 1.7 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
@@ -126,7 +127,7 @@ public interface StaticTypesystemPackage extends EPackage {
int TYPE__DECLARED_TYPE = ABSTRACT_TYPE_REFERENCE_FEATURE_COUNT + 0;
/**
- * The feature id for the '<em><b>Actual Type Arguments</b></em>' reference list.
+ * The feature id for the '<em><b>Actual Type Arguments</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -201,7 +202,7 @@ public interface StaticTypesystemPackage extends EPackage {
int WILDCARD_TYPE = 5;
/**
- * The feature id for the '<em><b>Lower Bounds</b></em>' reference list.
+ * The feature id for the '<em><b>Lower Bounds</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -210,7 +211,7 @@ public interface StaticTypesystemPackage extends EPackage {
int WILDCARD_TYPE__LOWER_BOUNDS = ABSTRACT_TYPE_REFERENCE_FEATURE_COUNT + 0;
/**
- * The feature id for the '<em><b>Upper Bounds</b></em>' reference list.
+ * The feature id for the '<em><b>Upper Bounds</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -247,7 +248,7 @@ public interface StaticTypesystemPackage extends EPackage {
int FUNCTION_TYPE__DECLARED_FUNCTION = ABSTRACT_TYPE_REFERENCE_FEATURE_COUNT + 0;
/**
- * The feature id for the '<em><b>Actual Type Arguments</b></em>' reference list.
+ * The feature id for the '<em><b>Actual Type Arguments</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -311,13 +312,22 @@ public interface StaticTypesystemPackage extends EPackage {
int DECLARED_TYPE__DECLARED_TYPE_PARAMETERS = ABSTRACT_NAMED_ELEMENT_FEATURE_COUNT + 2;
/**
+ * The feature id for the '<em><b>Super Types</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DECLARED_TYPE__SUPER_TYPES = ABSTRACT_NAMED_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
* The number of structural features of the '<em>Declared Type</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int DECLARED_TYPE_FEATURE_COUNT = ABSTRACT_NAMED_ELEMENT_FEATURE_COUNT + 3;
+ int DECLARED_TYPE_FEATURE_COUNT = ABSTRACT_NAMED_ELEMENT_FEATURE_COUNT + 4;
/**
* The meta object id for the '{@link org.eclipse.xpand3.staticTypesystem.impl.DeclaredFunctionImpl <em>Declared Function</em>}' class.
@@ -357,7 +367,7 @@ public interface StaticTypesystemPackage extends EPackage {
int DECLARED_FUNCTION__DECLARED_TYPE_PARAMETERS = ABSTRACT_NAMED_ELEMENT_FEATURE_COUNT + 1;
/**
- * The feature id for the '<em><b>Return Type</b></em>' reference.
+ * The feature id for the '<em><b>Return Type</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -394,7 +404,7 @@ public interface StaticTypesystemPackage extends EPackage {
int DECLARED_PROPERTY__NAME = ABSTRACT_NAMED_ELEMENT__NAME;
/**
- * The feature id for the '<em><b>Type</b></em>' reference.
+ * The feature id for the '<em><b>Type</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -403,13 +413,22 @@ public interface StaticTypesystemPackage extends EPackage {
int DECLARED_PROPERTY__TYPE = ABSTRACT_NAMED_ELEMENT_FEATURE_COUNT + 0;
/**
+ * The feature id for the '<em><b>Read Only</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DECLARED_PROPERTY__READ_ONLY = ABSTRACT_NAMED_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
* The number of structural features of the '<em>Declared Property</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int DECLARED_PROPERTY_FEATURE_COUNT = ABSTRACT_NAMED_ELEMENT_FEATURE_COUNT + 1;
+ int DECLARED_PROPERTY_FEATURE_COUNT = ABSTRACT_NAMED_ELEMENT_FEATURE_COUNT + 2;
/**
* The meta object id for the '{@link org.eclipse.xpand3.staticTypesystem.impl.DeclaredStaticPropertyImpl <em>Declared Static Property</em>}' class.
@@ -431,7 +450,7 @@ public interface StaticTypesystemPackage extends EPackage {
int DECLARED_STATIC_PROPERTY__NAME = ABSTRACT_NAMED_ELEMENT__NAME;
/**
- * The feature id for the '<em><b>Type</b></em>' reference.
+ * The feature id for the '<em><b>Type</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -468,7 +487,7 @@ public interface StaticTypesystemPackage extends EPackage {
int DECLARED_TYPE_PARAMETER__NAME = ABSTRACT_NAMED_ELEMENT__NAME;
/**
- * The feature id for the '<em><b>Upper Bounds</b></em>' reference list.
+ * The feature id for the '<em><b>Upper Bounds</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -505,7 +524,7 @@ public interface StaticTypesystemPackage extends EPackage {
int DECLARED_PARAMETER__NAME = ABSTRACT_NAMED_ELEMENT__NAME;
/**
- * The feature id for the '<em><b>Type</b></em>' reference.
+ * The feature id for the '<em><b>Type</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -522,6 +541,33 @@ public interface StaticTypesystemPackage extends EPackage {
*/
int DECLARED_PARAMETER_FEATURE_COUNT = ABSTRACT_NAMED_ELEMENT_FEATURE_COUNT + 1;
+ /**
+ * The meta object id for the '{@link org.eclipse.xpand3.staticTypesystem.impl.ModelImpl <em>Model</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xpand3.staticTypesystem.impl.ModelImpl
+ * @see org.eclipse.xpand3.staticTypesystem.impl.StaticTypesystemPackageImpl#getModel()
+ * @generated
+ */
+ int MODEL = 13;
+
+ /**
+ * The feature id for the '<em><b>Declarations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL__DECLARATIONS = 0;
+
+ /**
+ * The number of structural features of the '<em>Model</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_FEATURE_COUNT = 1;
/**
* Returns the meta object for class '{@link org.eclipse.xpand3.staticTypesystem.AbstractNamedElement <em>Abstract Named Element</em>}'.
@@ -576,10 +622,10 @@ public interface StaticTypesystemPackage extends EPackage {
EReference getType_DeclaredType();
/**
- * Returns the meta object for the reference list '{@link org.eclipse.xpand3.staticTypesystem.Type#getActualTypeArguments <em>Actual Type Arguments</em>}'.
+ * Returns the meta object for the containment reference list '{@link org.eclipse.xpand3.staticTypesystem.Type#getActualTypeArguments <em>Actual Type Arguments</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Actual Type Arguments</em>'.
+ * @return the meta object for the containment reference list '<em>Actual Type Arguments</em>'.
* @see org.eclipse.xpand3.staticTypesystem.Type#getActualTypeArguments()
* @see #getType()
* @generated
@@ -628,10 +674,10 @@ public interface StaticTypesystemPackage extends EPackage {
EClass getWildcardType();
/**
- * Returns the meta object for the reference list '{@link org.eclipse.xpand3.staticTypesystem.WildcardType#getLowerBounds <em>Lower Bounds</em>}'.
+ * Returns the meta object for the containment reference list '{@link org.eclipse.xpand3.staticTypesystem.WildcardType#getLowerBounds <em>Lower Bounds</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Lower Bounds</em>'.
+ * @return the meta object for the containment reference list '<em>Lower Bounds</em>'.
* @see org.eclipse.xpand3.staticTypesystem.WildcardType#getLowerBounds()
* @see #getWildcardType()
* @generated
@@ -639,10 +685,10 @@ public interface StaticTypesystemPackage extends EPackage {
EReference getWildcardType_LowerBounds();
/**
- * Returns the meta object for the reference list '{@link org.eclipse.xpand3.staticTypesystem.WildcardType#getUpperBounds <em>Upper Bounds</em>}'.
+ * Returns the meta object for the containment reference list '{@link org.eclipse.xpand3.staticTypesystem.WildcardType#getUpperBounds <em>Upper Bounds</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Upper Bounds</em>'.
+ * @return the meta object for the containment reference list '<em>Upper Bounds</em>'.
* @see org.eclipse.xpand3.staticTypesystem.WildcardType#getUpperBounds()
* @see #getWildcardType()
* @generated
@@ -671,10 +717,10 @@ public interface StaticTypesystemPackage extends EPackage {
EReference getFunctionType_DeclaredFunction();
/**
- * Returns the meta object for the reference list '{@link org.eclipse.xpand3.staticTypesystem.FunctionType#getActualTypeArguments <em>Actual Type Arguments</em>}'.
+ * Returns the meta object for the containment reference list '{@link org.eclipse.xpand3.staticTypesystem.FunctionType#getActualTypeArguments <em>Actual Type Arguments</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Actual Type Arguments</em>'.
+ * @return the meta object for the containment reference list '<em>Actual Type Arguments</em>'.
* @see org.eclipse.xpand3.staticTypesystem.FunctionType#getActualTypeArguments()
* @see #getFunctionType()
* @generated
@@ -725,6 +771,17 @@ public interface StaticTypesystemPackage extends EPackage {
EReference getDeclaredType_DeclaredTypeParameters();
/**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.xpand3.staticTypesystem.DeclaredType#getSuperTypes <em>Super Types</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Super Types</em>'.
+ * @see org.eclipse.xpand3.staticTypesystem.DeclaredType#getSuperTypes()
+ * @see #getDeclaredType()
+ * @generated
+ */
+ EReference getDeclaredType_SuperTypes();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.xpand3.staticTypesystem.DeclaredFunction <em>Declared Function</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -757,10 +814,10 @@ public interface StaticTypesystemPackage extends EPackage {
EReference getDeclaredFunction_DeclaredTypeParameters();
/**
- * Returns the meta object for the reference '{@link org.eclipse.xpand3.staticTypesystem.DeclaredFunction#getReturnType <em>Return Type</em>}'.
+ * Returns the meta object for the containment reference '{@link org.eclipse.xpand3.staticTypesystem.DeclaredFunction#getReturnType <em>Return Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Return Type</em>'.
+ * @return the meta object for the containment reference '<em>Return Type</em>'.
* @see org.eclipse.xpand3.staticTypesystem.DeclaredFunction#getReturnType()
* @see #getDeclaredFunction()
* @generated
@@ -778,10 +835,10 @@ public interface StaticTypesystemPackage extends EPackage {
EClass getDeclaredProperty();
/**
- * Returns the meta object for the reference '{@link org.eclipse.xpand3.staticTypesystem.DeclaredProperty#getType <em>Type</em>}'.
+ * Returns the meta object for the containment reference '{@link org.eclipse.xpand3.staticTypesystem.DeclaredProperty#getType <em>Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Type</em>'.
+ * @return the meta object for the containment reference '<em>Type</em>'.
* @see org.eclipse.xpand3.staticTypesystem.DeclaredProperty#getType()
* @see #getDeclaredProperty()
* @generated
@@ -789,6 +846,17 @@ public interface StaticTypesystemPackage extends EPackage {
EReference getDeclaredProperty_Type();
/**
+ * Returns the meta object for the attribute '{@link org.eclipse.xpand3.staticTypesystem.DeclaredProperty#isReadOnly <em>Read Only</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Read Only</em>'.
+ * @see org.eclipse.xpand3.staticTypesystem.DeclaredProperty#isReadOnly()
+ * @see #getDeclaredProperty()
+ * @generated
+ */
+ EAttribute getDeclaredProperty_ReadOnly();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.xpand3.staticTypesystem.DeclaredStaticProperty <em>Declared Static Property</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -799,10 +867,10 @@ public interface StaticTypesystemPackage extends EPackage {
EClass getDeclaredStaticProperty();
/**
- * Returns the meta object for the reference '{@link org.eclipse.xpand3.staticTypesystem.DeclaredStaticProperty#getType <em>Type</em>}'.
+ * Returns the meta object for the containment reference '{@link org.eclipse.xpand3.staticTypesystem.DeclaredStaticProperty#getType <em>Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Type</em>'.
+ * @return the meta object for the containment reference '<em>Type</em>'.
* @see org.eclipse.xpand3.staticTypesystem.DeclaredStaticProperty#getType()
* @see #getDeclaredStaticProperty()
* @generated
@@ -820,10 +888,10 @@ public interface StaticTypesystemPackage extends EPackage {
EClass getDeclaredTypeParameter();
/**
- * Returns the meta object for the reference list '{@link org.eclipse.xpand3.staticTypesystem.DeclaredTypeParameter#getUpperBounds <em>Upper Bounds</em>}'.
+ * Returns the meta object for the containment reference list '{@link org.eclipse.xpand3.staticTypesystem.DeclaredTypeParameter#getUpperBounds <em>Upper Bounds</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Upper Bounds</em>'.
+ * @return the meta object for the containment reference list '<em>Upper Bounds</em>'.
* @see org.eclipse.xpand3.staticTypesystem.DeclaredTypeParameter#getUpperBounds()
* @see #getDeclaredTypeParameter()
* @generated
@@ -841,10 +909,10 @@ public interface StaticTypesystemPackage extends EPackage {
EClass getDeclaredParameter();
/**
- * Returns the meta object for the reference '{@link org.eclipse.xpand3.staticTypesystem.DeclaredParameter#getType <em>Type</em>}'.
+ * Returns the meta object for the containment reference '{@link org.eclipse.xpand3.staticTypesystem.DeclaredParameter#getType <em>Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Type</em>'.
+ * @return the meta object for the containment reference '<em>Type</em>'.
* @see org.eclipse.xpand3.staticTypesystem.DeclaredParameter#getType()
* @see #getDeclaredParameter()
* @generated
@@ -852,6 +920,27 @@ public interface StaticTypesystemPackage extends EPackage {
EReference getDeclaredParameter_Type();
/**
+ * Returns the meta object for class '{@link org.eclipse.xpand3.staticTypesystem.Model <em>Model</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Model</em>'.
+ * @see org.eclipse.xpand3.staticTypesystem.Model
+ * @generated
+ */
+ EClass getModel();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.xpand3.staticTypesystem.Model#getDeclarations <em>Declarations</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Declarations</em>'.
+ * @see org.eclipse.xpand3.staticTypesystem.Model#getDeclarations()
+ * @see #getModel()
+ * @generated
+ */
+ EReference getModel_Declarations();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -920,7 +1009,7 @@ public interface StaticTypesystemPackage extends EPackage {
EReference TYPE__DECLARED_TYPE = eINSTANCE.getType_DeclaredType();
/**
- * The meta object literal for the '<em><b>Actual Type Arguments</b></em>' reference list feature.
+ * The meta object literal for the '<em><b>Actual Type Arguments</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -966,7 +1055,7 @@ public interface StaticTypesystemPackage extends EPackage {
EClass WILDCARD_TYPE = eINSTANCE.getWildcardType();
/**
- * The meta object literal for the '<em><b>Lower Bounds</b></em>' reference list feature.
+ * The meta object literal for the '<em><b>Lower Bounds</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -974,7 +1063,7 @@ public interface StaticTypesystemPackage extends EPackage {
EReference WILDCARD_TYPE__LOWER_BOUNDS = eINSTANCE.getWildcardType_LowerBounds();
/**
- * The meta object literal for the '<em><b>Upper Bounds</b></em>' reference list feature.
+ * The meta object literal for the '<em><b>Upper Bounds</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -1000,7 +1089,7 @@ public interface StaticTypesystemPackage extends EPackage {
EReference FUNCTION_TYPE__DECLARED_FUNCTION = eINSTANCE.getFunctionType_DeclaredFunction();
/**
- * The meta object literal for the '<em><b>Actual Type Arguments</b></em>' reference list feature.
+ * The meta object literal for the '<em><b>Actual Type Arguments</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -1042,6 +1131,14 @@ public interface StaticTypesystemPackage extends EPackage {
EReference DECLARED_TYPE__DECLARED_TYPE_PARAMETERS = eINSTANCE.getDeclaredType_DeclaredTypeParameters();
/**
+ * The meta object literal for the '<em><b>Super Types</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DECLARED_TYPE__SUPER_TYPES = eINSTANCE.getDeclaredType_SuperTypes();
+
+ /**
* The meta object literal for the '{@link org.eclipse.xpand3.staticTypesystem.impl.DeclaredFunctionImpl <em>Declared Function</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1068,7 +1165,7 @@ public interface StaticTypesystemPackage extends EPackage {
EReference DECLARED_FUNCTION__DECLARED_TYPE_PARAMETERS = eINSTANCE.getDeclaredFunction_DeclaredTypeParameters();
/**
- * The meta object literal for the '<em><b>Return Type</b></em>' reference feature.
+ * The meta object literal for the '<em><b>Return Type</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -1086,7 +1183,7 @@ public interface StaticTypesystemPackage extends EPackage {
EClass DECLARED_PROPERTY = eINSTANCE.getDeclaredProperty();
/**
- * The meta object literal for the '<em><b>Type</b></em>' reference feature.
+ * The meta object literal for the '<em><b>Type</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -1094,6 +1191,14 @@ public interface StaticTypesystemPackage extends EPackage {
EReference DECLARED_PROPERTY__TYPE = eINSTANCE.getDeclaredProperty_Type();
/**
+ * The meta object literal for the '<em><b>Read Only</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DECLARED_PROPERTY__READ_ONLY = eINSTANCE.getDeclaredProperty_ReadOnly();
+
+ /**
* The meta object literal for the '{@link org.eclipse.xpand3.staticTypesystem.impl.DeclaredStaticPropertyImpl <em>Declared Static Property</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1104,7 +1209,7 @@ public interface StaticTypesystemPackage extends EPackage {
EClass DECLARED_STATIC_PROPERTY = eINSTANCE.getDeclaredStaticProperty();
/**
- * The meta object literal for the '<em><b>Type</b></em>' reference feature.
+ * The meta object literal for the '<em><b>Type</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -1122,7 +1227,7 @@ public interface StaticTypesystemPackage extends EPackage {
EClass DECLARED_TYPE_PARAMETER = eINSTANCE.getDeclaredTypeParameter();
/**
- * The meta object literal for the '<em><b>Upper Bounds</b></em>' reference list feature.
+ * The meta object literal for the '<em><b>Upper Bounds</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -1140,13 +1245,31 @@ public interface StaticTypesystemPackage extends EPackage {
EClass DECLARED_PARAMETER = eINSTANCE.getDeclaredParameter();
/**
- * The meta object literal for the '<em><b>Type</b></em>' reference feature.
+ * The meta object literal for the '<em><b>Type</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference DECLARED_PARAMETER__TYPE = eINSTANCE.getDeclaredParameter_Type();
+ /**
+ * The meta object literal for the '{@link org.eclipse.xpand3.staticTypesystem.impl.ModelImpl <em>Model</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.xpand3.staticTypesystem.impl.ModelImpl
+ * @see org.eclipse.xpand3.staticTypesystem.impl.StaticTypesystemPackageImpl#getModel()
+ * @generated
+ */
+ EClass MODEL = eINSTANCE.getModel();
+
+ /**
+ * The meta object literal for the '<em><b>Declarations</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MODEL__DECLARATIONS = eINSTANCE.getModel_Declarations();
+
}
} //StaticTypesystemPackage
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/Type.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/Type.java
index 1552386..898548e 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/Type.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/Type.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: Type.java,v 1.4 2008/03/07 11:10:33 jkohnlein Exp $
+ * $Id: Type.java,v 1.5 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem;
@@ -53,7 +53,7 @@ public interface Type extends AbstractTypeReference {
void setDeclaredType(DeclaredType value);
/**
- * Returns the value of the '<em><b>Actual Type Arguments</b></em>' reference list.
+ * Returns the value of the '<em><b>Actual Type Arguments</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.xpand3.staticTypesystem.AbstractTypeReference}.
* <!-- begin-user-doc -->
* <p>
@@ -61,9 +61,9 @@ public interface Type extends AbstractTypeReference {
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Actual Type Arguments</em>' reference list.
+ * @return the value of the '<em>Actual Type Arguments</em>' containment reference list.
* @see org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage#getType_ActualTypeArguments()
- * @model
+ * @model containment="true"
* @generated
*/
EList<AbstractTypeReference> getActualTypeArguments();
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/TypeVariable.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/TypeVariable.java
index c18bca2..f236849 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/TypeVariable.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/TypeVariable.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: TypeVariable.java,v 1.4 2008/03/07 11:10:32 jkohnlein Exp $
+ * $Id: TypeVariable.java,v 1.5 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem;
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/VoidType.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/VoidType.java
index 0469774..649896b 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/VoidType.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/VoidType.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: VoidType.java,v 1.4 2008/03/07 11:10:33 jkohnlein Exp $
+ * $Id: VoidType.java,v 1.5 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem;
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/WildcardType.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/WildcardType.java
index 518bbfc..bcfa0b6 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/WildcardType.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/WildcardType.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: WildcardType.java,v 1.4 2008/03/07 11:10:33 jkohnlein Exp $
+ * $Id: WildcardType.java,v 1.5 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem;
@@ -27,7 +27,7 @@ import org.eclipse.emf.common.util.EList;
*/
public interface WildcardType extends AbstractTypeReference {
/**
- * Returns the value of the '<em><b>Lower Bounds</b></em>' reference list.
+ * Returns the value of the '<em><b>Lower Bounds</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.xpand3.staticTypesystem.AbstractTypeReference}.
* <!-- begin-user-doc -->
* <p>
@@ -35,15 +35,15 @@ public interface WildcardType extends AbstractTypeReference {
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Lower Bounds</em>' reference list.
+ * @return the value of the '<em>Lower Bounds</em>' containment reference list.
* @see org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage#getWildcardType_LowerBounds()
- * @model
+ * @model containment="true"
* @generated
*/
EList<AbstractTypeReference> getLowerBounds();
/**
- * Returns the value of the '<em><b>Upper Bounds</b></em>' reference list.
+ * Returns the value of the '<em><b>Upper Bounds</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.xpand3.staticTypesystem.AbstractTypeReference}.
* <!-- begin-user-doc -->
* <p>
@@ -51,9 +51,9 @@ public interface WildcardType extends AbstractTypeReference {
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Upper Bounds</em>' reference list.
+ * @return the value of the '<em>Upper Bounds</em>' containment reference list.
* @see org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage#getWildcardType_UpperBounds()
- * @model
+ * @model containment="true"
* @generated
*/
EList<AbstractTypeReference> getUpperBounds();
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/AbstractNamedElementImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/AbstractNamedElementImpl.java
index f5ce92d..59329bc 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/AbstractNamedElementImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/AbstractNamedElementImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: AbstractNamedElementImpl.java,v 1.4 2008/03/07 11:10:58 jkohnlein Exp $
+ * $Id: AbstractNamedElementImpl.java,v 1.5 2008/03/07 14:21:07 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.impl;
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/AbstractTypeReferenceImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/AbstractTypeReferenceImpl.java
index 936f2e5..1dc7db4 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/AbstractTypeReferenceImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/AbstractTypeReferenceImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: AbstractTypeReferenceImpl.java,v 1.4 2008/03/07 11:10:57 jkohnlein Exp $
+ * $Id: AbstractTypeReferenceImpl.java,v 1.5 2008/03/07 14:21:07 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.impl;
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredFunctionImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredFunctionImpl.java
index 606ea60..310bf0d 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredFunctionImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredFunctionImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: DeclaredFunctionImpl.java,v 1.3 2008/03/07 11:10:58 jkohnlein Exp $
+ * $Id: DeclaredFunctionImpl.java,v 1.4 2008/03/07 14:21:07 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.impl;
@@ -64,7 +64,7 @@ public class DeclaredFunctionImpl extends AbstractNamedElementImpl implements De
protected EList<DeclaredTypeParameter> declaredTypeParameters;
/**
- * The cached value of the '{@link #getReturnType() <em>Return Type</em>}' reference.
+ * The cached value of the '{@link #getReturnType() <em>Return Type</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getReturnType()
@@ -122,14 +122,6 @@ public class DeclaredFunctionImpl extends AbstractNamedElementImpl implements De
* @generated
*/
public AbstractTypeReference getReturnType() {
- if (returnType != null && returnType.eIsProxy()) {
- InternalEObject oldReturnType = (InternalEObject)returnType;
- returnType = (AbstractTypeReference)eResolveProxy(oldReturnType);
- if (returnType != oldReturnType) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, StaticTypesystemPackage.DECLARED_FUNCTION__RETURN_TYPE, oldReturnType, returnType));
- }
- }
return returnType;
}
@@ -138,8 +130,14 @@ public class DeclaredFunctionImpl extends AbstractNamedElementImpl implements De
* <!-- end-user-doc -->
* @generated
*/
- public AbstractTypeReference basicGetReturnType() {
- return returnType;
+ public NotificationChain basicSetReturnType(AbstractTypeReference newReturnType, NotificationChain msgs) {
+ AbstractTypeReference oldReturnType = returnType;
+ returnType = newReturnType;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, StaticTypesystemPackage.DECLARED_FUNCTION__RETURN_TYPE, oldReturnType, newReturnType);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
}
/**
@@ -148,10 +146,17 @@ public class DeclaredFunctionImpl extends AbstractNamedElementImpl implements De
* @generated
*/
public void setReturnType(AbstractTypeReference newReturnType) {
- AbstractTypeReference oldReturnType = returnType;
- returnType = newReturnType;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, StaticTypesystemPackage.DECLARED_FUNCTION__RETURN_TYPE, oldReturnType, returnType));
+ if (newReturnType != returnType) {
+ NotificationChain msgs = null;
+ if (returnType != null)
+ msgs = ((InternalEObject)returnType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - StaticTypesystemPackage.DECLARED_FUNCTION__RETURN_TYPE, null, msgs);
+ if (newReturnType != null)
+ msgs = ((InternalEObject)newReturnType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - StaticTypesystemPackage.DECLARED_FUNCTION__RETURN_TYPE, null, msgs);
+ msgs = basicSetReturnType(newReturnType, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StaticTypesystemPackage.DECLARED_FUNCTION__RETURN_TYPE, newReturnType, newReturnType));
}
/**
@@ -166,6 +171,8 @@ public class DeclaredFunctionImpl extends AbstractNamedElementImpl implements De
return ((InternalEList<?>)getDeclaredParameters()).basicRemove(otherEnd, msgs);
case StaticTypesystemPackage.DECLARED_FUNCTION__DECLARED_TYPE_PARAMETERS:
return ((InternalEList<?>)getDeclaredTypeParameters()).basicRemove(otherEnd, msgs);
+ case StaticTypesystemPackage.DECLARED_FUNCTION__RETURN_TYPE:
+ return basicSetReturnType(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -183,8 +190,7 @@ public class DeclaredFunctionImpl extends AbstractNamedElementImpl implements De
case StaticTypesystemPackage.DECLARED_FUNCTION__DECLARED_TYPE_PARAMETERS:
return getDeclaredTypeParameters();
case StaticTypesystemPackage.DECLARED_FUNCTION__RETURN_TYPE:
- if (resolve) return getReturnType();
- return basicGetReturnType();
+ return getReturnType();
}
return super.eGet(featureID, resolve, coreType);
}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredParameterImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredParameterImpl.java
index a642bad..e5de4ec 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredParameterImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredParameterImpl.java
@@ -2,12 +2,13 @@
* <copyright>
* </copyright>
*
- * $Id: DeclaredParameterImpl.java,v 1.3 2008/03/07 11:10:58 jkohnlein Exp $
+ * $Id: DeclaredParameterImpl.java,v 1.4 2008/03/07 14:21:07 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.impl;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
@@ -32,7 +33,7 @@ import org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage;
*/
public class DeclaredParameterImpl extends AbstractNamedElementImpl implements DeclaredParameter {
/**
- * The cached value of the '{@link #getType() <em>Type</em>}' reference.
+ * The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getType()
@@ -66,14 +67,6 @@ public class DeclaredParameterImpl extends AbstractNamedElementImpl implements D
* @generated
*/
public AbstractTypeReference getType() {
- if (type != null && type.eIsProxy()) {
- InternalEObject oldType = (InternalEObject)type;
- type = (AbstractTypeReference)eResolveProxy(oldType);
- if (type != oldType) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, StaticTypesystemPackage.DECLARED_PARAMETER__TYPE, oldType, type));
- }
- }
return type;
}
@@ -82,8 +75,14 @@ public class DeclaredParameterImpl extends AbstractNamedElementImpl implements D
* <!-- end-user-doc -->
* @generated
*/
- public AbstractTypeReference basicGetType() {
- return type;
+ public NotificationChain basicSetType(AbstractTypeReference newType, NotificationChain msgs) {
+ AbstractTypeReference oldType = type;
+ type = newType;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, StaticTypesystemPackage.DECLARED_PARAMETER__TYPE, oldType, newType);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
}
/**
@@ -92,10 +91,31 @@ public class DeclaredParameterImpl extends AbstractNamedElementImpl implements D
* @generated
*/
public void setType(AbstractTypeReference newType) {
- AbstractTypeReference oldType = type;
- type = newType;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, StaticTypesystemPackage.DECLARED_PARAMETER__TYPE, oldType, type));
+ if (newType != type) {
+ NotificationChain msgs = null;
+ if (type != null)
+ msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - StaticTypesystemPackage.DECLARED_PARAMETER__TYPE, null, msgs);
+ if (newType != null)
+ msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - StaticTypesystemPackage.DECLARED_PARAMETER__TYPE, null, msgs);
+ msgs = basicSetType(newType, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StaticTypesystemPackage.DECLARED_PARAMETER__TYPE, newType, newType));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case StaticTypesystemPackage.DECLARED_PARAMETER__TYPE:
+ return basicSetType(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
@@ -107,8 +127,7 @@ public class DeclaredParameterImpl extends AbstractNamedElementImpl implements D
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case StaticTypesystemPackage.DECLARED_PARAMETER__TYPE:
- if (resolve) return getType();
- return basicGetType();
+ return getType();
}
return super.eGet(featureID, resolve, coreType);
}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredPropertyImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredPropertyImpl.java
index 95cefcd..1335645 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredPropertyImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredPropertyImpl.java
@@ -2,12 +2,13 @@
* <copyright>
* </copyright>
*
- * $Id: DeclaredPropertyImpl.java,v 1.3 2008/03/07 11:10:57 jkohnlein Exp $
+ * $Id: DeclaredPropertyImpl.java,v 1.4 2008/03/07 14:21:07 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.impl;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
@@ -25,6 +26,7 @@ import org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage;
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.xpand3.staticTypesystem.impl.DeclaredPropertyImpl#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.xpand3.staticTypesystem.impl.DeclaredPropertyImpl#isReadOnly <em>Read Only</em>}</li>
* </ul>
* </p>
*
@@ -32,7 +34,7 @@ import org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage;
*/
public class DeclaredPropertyImpl extends AbstractNamedElementImpl implements DeclaredProperty {
/**
- * The cached value of the '{@link #getType() <em>Type</em>}' reference.
+ * The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getType()
@@ -42,6 +44,25 @@ public class DeclaredPropertyImpl extends AbstractNamedElementImpl implements De
protected AbstractTypeReference type;
/**
+ * The default value of the '{@link #isReadOnly() <em>Read Only</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isReadOnly()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean READ_ONLY_EDEFAULT = false;
+ /**
+ * The cached value of the '{@link #isReadOnly() <em>Read Only</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isReadOnly()
+ * @generated
+ * @ordered
+ */
+ protected boolean readOnly = READ_ONLY_EDEFAULT;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -66,14 +87,6 @@ public class DeclaredPropertyImpl extends AbstractNamedElementImpl implements De
* @generated
*/
public AbstractTypeReference getType() {
- if (type != null && type.eIsProxy()) {
- InternalEObject oldType = (InternalEObject)type;
- type = (AbstractTypeReference)eResolveProxy(oldType);
- if (type != oldType) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, StaticTypesystemPackage.DECLARED_PROPERTY__TYPE, oldType, type));
- }
- }
return type;
}
@@ -82,8 +95,14 @@ public class DeclaredPropertyImpl extends AbstractNamedElementImpl implements De
* <!-- end-user-doc -->
* @generated
*/
- public AbstractTypeReference basicGetType() {
- return type;
+ public NotificationChain basicSetType(AbstractTypeReference newType, NotificationChain msgs) {
+ AbstractTypeReference oldType = type;
+ type = newType;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, StaticTypesystemPackage.DECLARED_PROPERTY__TYPE, oldType, newType);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
}
/**
@@ -92,10 +111,52 @@ public class DeclaredPropertyImpl extends AbstractNamedElementImpl implements De
* @generated
*/
public void setType(AbstractTypeReference newType) {
- AbstractTypeReference oldType = type;
- type = newType;
+ if (newType != type) {
+ NotificationChain msgs = null;
+ if (type != null)
+ msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - StaticTypesystemPackage.DECLARED_PROPERTY__TYPE, null, msgs);
+ if (newType != null)
+ msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - StaticTypesystemPackage.DECLARED_PROPERTY__TYPE, null, msgs);
+ msgs = basicSetType(newType, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StaticTypesystemPackage.DECLARED_PROPERTY__TYPE, newType, newType));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isReadOnly() {
+ return readOnly;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setReadOnly(boolean newReadOnly) {
+ boolean oldReadOnly = readOnly;
+ readOnly = newReadOnly;
if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, StaticTypesystemPackage.DECLARED_PROPERTY__TYPE, oldType, type));
+ eNotify(new ENotificationImpl(this, Notification.SET, StaticTypesystemPackage.DECLARED_PROPERTY__READ_ONLY, oldReadOnly, readOnly));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case StaticTypesystemPackage.DECLARED_PROPERTY__TYPE:
+ return basicSetType(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
@@ -107,8 +168,9 @@ public class DeclaredPropertyImpl extends AbstractNamedElementImpl implements De
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case StaticTypesystemPackage.DECLARED_PROPERTY__TYPE:
- if (resolve) return getType();
- return basicGetType();
+ return getType();
+ case StaticTypesystemPackage.DECLARED_PROPERTY__READ_ONLY:
+ return isReadOnly() ? Boolean.TRUE : Boolean.FALSE;
}
return super.eGet(featureID, resolve, coreType);
}
@@ -124,6 +186,9 @@ public class DeclaredPropertyImpl extends AbstractNamedElementImpl implements De
case StaticTypesystemPackage.DECLARED_PROPERTY__TYPE:
setType((AbstractTypeReference)newValue);
return;
+ case StaticTypesystemPackage.DECLARED_PROPERTY__READ_ONLY:
+ setReadOnly(((Boolean)newValue).booleanValue());
+ return;
}
super.eSet(featureID, newValue);
}
@@ -139,6 +204,9 @@ public class DeclaredPropertyImpl extends AbstractNamedElementImpl implements De
case StaticTypesystemPackage.DECLARED_PROPERTY__TYPE:
setType((AbstractTypeReference)null);
return;
+ case StaticTypesystemPackage.DECLARED_PROPERTY__READ_ONLY:
+ setReadOnly(READ_ONLY_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -153,8 +221,26 @@ public class DeclaredPropertyImpl extends AbstractNamedElementImpl implements De
switch (featureID) {
case StaticTypesystemPackage.DECLARED_PROPERTY__TYPE:
return type != null;
+ case StaticTypesystemPackage.DECLARED_PROPERTY__READ_ONLY:
+ return readOnly != READ_ONLY_EDEFAULT;
}
return super.eIsSet(featureID);
}
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (readOnly: ");
+ result.append(readOnly);
+ result.append(')');
+ return result.toString();
+ }
+
} //DeclaredPropertyImpl
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredStaticPropertyImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredStaticPropertyImpl.java
index 6cce6d8..d9c31c1 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredStaticPropertyImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredStaticPropertyImpl.java
@@ -2,12 +2,13 @@
* <copyright>
* </copyright>
*
- * $Id: DeclaredStaticPropertyImpl.java,v 1.3 2008/03/07 11:10:57 jkohnlein Exp $
+ * $Id: DeclaredStaticPropertyImpl.java,v 1.4 2008/03/07 14:21:07 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.impl;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
@@ -32,7 +33,7 @@ import org.eclipse.xpand3.staticTypesystem.Type;
*/
public class DeclaredStaticPropertyImpl extends AbstractNamedElementImpl implements DeclaredStaticProperty {
/**
- * The cached value of the '{@link #getType() <em>Type</em>}' reference.
+ * The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getType()
@@ -66,14 +67,6 @@ public class DeclaredStaticPropertyImpl extends AbstractNamedElementImpl impleme
* @generated
*/
public Type getType() {
- if (type != null && type.eIsProxy()) {
- InternalEObject oldType = (InternalEObject)type;
- type = (Type)eResolveProxy(oldType);
- if (type != oldType) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, StaticTypesystemPackage.DECLARED_STATIC_PROPERTY__TYPE, oldType, type));
- }
- }
return type;
}
@@ -82,8 +75,14 @@ public class DeclaredStaticPropertyImpl extends AbstractNamedElementImpl impleme
* <!-- end-user-doc -->
* @generated
*/
- public Type basicGetType() {
- return type;
+ public NotificationChain basicSetType(Type newType, NotificationChain msgs) {
+ Type oldType = type;
+ type = newType;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, StaticTypesystemPackage.DECLARED_STATIC_PROPERTY__TYPE, oldType, newType);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
}
/**
@@ -92,10 +91,31 @@ public class DeclaredStaticPropertyImpl extends AbstractNamedElementImpl impleme
* @generated
*/
public void setType(Type newType) {
- Type oldType = type;
- type = newType;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, StaticTypesystemPackage.DECLARED_STATIC_PROPERTY__TYPE, oldType, type));
+ if (newType != type) {
+ NotificationChain msgs = null;
+ if (type != null)
+ msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - StaticTypesystemPackage.DECLARED_STATIC_PROPERTY__TYPE, null, msgs);
+ if (newType != null)
+ msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - StaticTypesystemPackage.DECLARED_STATIC_PROPERTY__TYPE, null, msgs);
+ msgs = basicSetType(newType, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StaticTypesystemPackage.DECLARED_STATIC_PROPERTY__TYPE, newType, newType));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case StaticTypesystemPackage.DECLARED_STATIC_PROPERTY__TYPE:
+ return basicSetType(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
@@ -107,8 +127,7 @@ public class DeclaredStaticPropertyImpl extends AbstractNamedElementImpl impleme
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case StaticTypesystemPackage.DECLARED_STATIC_PROPERTY__TYPE:
- if (resolve) return getType();
- return basicGetType();
+ return getType();
}
return super.eGet(featureID, resolve, coreType);
}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredTypeImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredTypeImpl.java
index 58c15da..9f42672 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredTypeImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredTypeImpl.java
@@ -2,12 +2,13 @@
* <copyright>
* </copyright>
*
- * $Id: DeclaredTypeImpl.java,v 1.4 2008/03/07 11:10:57 jkohnlein Exp $
+ * $Id: DeclaredTypeImpl.java,v 1.5 2008/03/07 14:21:07 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.impl;
import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
@@ -15,15 +16,20 @@ 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.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
import org.eclipse.xpand3.staticTypesystem.DeclaredProperty;
import org.eclipse.xpand3.staticTypesystem.DeclaredStaticProperty;
import org.eclipse.xpand3.staticTypesystem.DeclaredType;
import org.eclipse.xpand3.staticTypesystem.DeclaredTypeParameter;
import org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage;
+import org.eclipse.xtend.backend.common.BackendType;
+
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Declared Type</b></em>'.
@@ -34,6 +40,7 @@ import org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage;
* <li>{@link org.eclipse.xpand3.staticTypesystem.impl.DeclaredTypeImpl#getStaticProperties <em>Static Properties</em>}</li>
* <li>{@link org.eclipse.xpand3.staticTypesystem.impl.DeclaredTypeImpl#getProperties <em>Properties</em>}</li>
* <li>{@link org.eclipse.xpand3.staticTypesystem.impl.DeclaredTypeImpl#getDeclaredTypeParameters <em>Declared Type Parameters</em>}</li>
+ * <li>{@link org.eclipse.xpand3.staticTypesystem.impl.DeclaredTypeImpl#getSuperTypes <em>Super Types</em>}</li>
* </ul>
* </p>
*
@@ -71,6 +78,16 @@ public class DeclaredTypeImpl extends AbstractNamedElementImpl implements Declar
protected EList<DeclaredTypeParameter> declaredTypeParameters;
/**
+ * The cached value of the '{@link #getSuperTypes() <em>Super Types</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSuperTypes()
+ * @generated
+ * @ordered
+ */
+ protected EList<AbstractTypeReference> superTypes;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -130,6 +147,18 @@ public class DeclaredTypeImpl extends AbstractNamedElementImpl implements Declar
* <!-- end-user-doc -->
* @generated
*/
+ public EList<AbstractTypeReference> getSuperTypes() {
+ if (superTypes == null) {
+ superTypes = new EObjectContainmentEList<AbstractTypeReference>(AbstractTypeReference.class, this, StaticTypesystemPackage.DECLARED_TYPE__SUPER_TYPES);
+ }
+ return superTypes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
@@ -139,6 +168,8 @@ public class DeclaredTypeImpl extends AbstractNamedElementImpl implements Declar
return ((InternalEList<?>)getProperties()).basicRemove(otherEnd, msgs);
case StaticTypesystemPackage.DECLARED_TYPE__DECLARED_TYPE_PARAMETERS:
return ((InternalEList<?>)getDeclaredTypeParameters()).basicRemove(otherEnd, msgs);
+ case StaticTypesystemPackage.DECLARED_TYPE__SUPER_TYPES:
+ return ((InternalEList<?>)getSuperTypes()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -157,6 +188,8 @@ public class DeclaredTypeImpl extends AbstractNamedElementImpl implements Declar
return getProperties();
case StaticTypesystemPackage.DECLARED_TYPE__DECLARED_TYPE_PARAMETERS:
return getDeclaredTypeParameters();
+ case StaticTypesystemPackage.DECLARED_TYPE__SUPER_TYPES:
+ return getSuperTypes();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -182,6 +215,10 @@ public class DeclaredTypeImpl extends AbstractNamedElementImpl implements Declar
getDeclaredTypeParameters().clear();
getDeclaredTypeParameters().addAll((Collection<? extends DeclaredTypeParameter>)newValue);
return;
+ case StaticTypesystemPackage.DECLARED_TYPE__SUPER_TYPES:
+ getSuperTypes().clear();
+ getSuperTypes().addAll((Collection<? extends AbstractTypeReference>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -203,6 +240,9 @@ public class DeclaredTypeImpl extends AbstractNamedElementImpl implements Declar
case StaticTypesystemPackage.DECLARED_TYPE__DECLARED_TYPE_PARAMETERS:
getDeclaredTypeParameters().clear();
return;
+ case StaticTypesystemPackage.DECLARED_TYPE__SUPER_TYPES:
+ getSuperTypes().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -221,6 +261,8 @@ public class DeclaredTypeImpl extends AbstractNamedElementImpl implements Declar
return properties != null && !properties.isEmpty();
case StaticTypesystemPackage.DECLARED_TYPE__DECLARED_TYPE_PARAMETERS:
return declaredTypeParameters != null && !declaredTypeParameters.isEmpty();
+ case StaticTypesystemPackage.DECLARED_TYPE__SUPER_TYPES:
+ return superTypes != null && !superTypes.isEmpty();
}
return super.eIsSet(featureID);
}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredTypeParameterImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredTypeParameterImpl.java
index c4a02a4..649dcc3 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredTypeParameterImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/DeclaredTypeParameterImpl.java
@@ -2,16 +2,20 @@
* <copyright>
* </copyright>
*
- * $Id: DeclaredTypeParameterImpl.java,v 1.3 2008/03/07 11:10:57 jkohnlein Exp $
+ * $Id: DeclaredTypeParameterImpl.java,v 1.4 2008/03/07 14:21:07 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.impl;
import java.util.Collection;
+import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
@@ -33,7 +37,7 @@ import org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage;
*/
public class DeclaredTypeParameterImpl extends AbstractNamedElementImpl implements DeclaredTypeParameter {
/**
- * The cached value of the '{@link #getUpperBounds() <em>Upper Bounds</em>}' reference list.
+ * The cached value of the '{@link #getUpperBounds() <em>Upper Bounds</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUpperBounds()
@@ -68,7 +72,7 @@ public class DeclaredTypeParameterImpl extends AbstractNamedElementImpl implemen
*/
public EList<AbstractTypeReference> getUpperBounds() {
if (upperBounds == null) {
- upperBounds = new EObjectResolvingEList<AbstractTypeReference>(AbstractTypeReference.class, this, StaticTypesystemPackage.DECLARED_TYPE_PARAMETER__UPPER_BOUNDS);
+ upperBounds = new EObjectContainmentEList<AbstractTypeReference>(AbstractTypeReference.class, this, StaticTypesystemPackage.DECLARED_TYPE_PARAMETER__UPPER_BOUNDS);
}
return upperBounds;
}
@@ -79,6 +83,20 @@ public class DeclaredTypeParameterImpl extends AbstractNamedElementImpl implemen
* @generated
*/
@Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case StaticTypesystemPackage.DECLARED_TYPE_PARAMETER__UPPER_BOUNDS:
+ return ((InternalEList<?>)getUpperBounds()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case StaticTypesystemPackage.DECLARED_TYPE_PARAMETER__UPPER_BOUNDS:
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/FunctionTypeImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/FunctionTypeImpl.java
index 67ebfa2..7b2b6a2 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/FunctionTypeImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/FunctionTypeImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: FunctionTypeImpl.java,v 1.4 2008/03/07 11:10:57 jkohnlein Exp $
+ * $Id: FunctionTypeImpl.java,v 1.5 2008/03/07 14:21:07 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.impl;
@@ -10,6 +10,7 @@ import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
@@ -17,6 +18,8 @@ import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
@@ -50,7 +53,7 @@ public class FunctionTypeImpl extends AbstractTypeReferenceImpl implements Funct
protected DeclaredFunction declaredFunction;
/**
- * The cached value of the '{@link #getActualTypeArguments() <em>Actual Type Arguments</em>}' reference list.
+ * The cached value of the '{@link #getActualTypeArguments() <em>Actual Type Arguments</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getActualTypeArguments()
@@ -123,7 +126,7 @@ public class FunctionTypeImpl extends AbstractTypeReferenceImpl implements Funct
*/
public EList<AbstractTypeReference> getActualTypeArguments() {
if (actualTypeArguments == null) {
- actualTypeArguments = new EObjectResolvingEList<AbstractTypeReference>(AbstractTypeReference.class, this, StaticTypesystemPackage.FUNCTION_TYPE__ACTUAL_TYPE_ARGUMENTS);
+ actualTypeArguments = new EObjectContainmentEList<AbstractTypeReference>(AbstractTypeReference.class, this, StaticTypesystemPackage.FUNCTION_TYPE__ACTUAL_TYPE_ARGUMENTS);
}
return actualTypeArguments;
}
@@ -134,6 +137,20 @@ public class FunctionTypeImpl extends AbstractTypeReferenceImpl implements Funct
* @generated
*/
@Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case StaticTypesystemPackage.FUNCTION_TYPE__ACTUAL_TYPE_ARGUMENTS:
+ return ((InternalEList<?>)getActualTypeArguments()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case StaticTypesystemPackage.FUNCTION_TYPE__DECLARED_FUNCTION:
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/ModelImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/ModelImpl.java
new file mode 100644
index 0000000..cd89eee
--- /dev/null
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/ModelImpl.java
@@ -0,0 +1,156 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: ModelImpl.java,v 1.1 2008/03/07 14:21:07 sefftinge Exp $
+ */
+package org.eclipse.xpand3.staticTypesystem.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+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.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.xpand3.staticTypesystem.DeclaredType;
+import org.eclipse.xpand3.staticTypesystem.Model;
+import org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Model</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.xpand3.staticTypesystem.impl.ModelImpl#getDeclarations <em>Declarations</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ModelImpl extends EObjectImpl implements Model {
+ /**
+ * The cached value of the '{@link #getDeclarations() <em>Declarations</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDeclarations()
+ * @generated
+ * @ordered
+ */
+ protected EList<DeclaredType> declarations;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModelImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return StaticTypesystemPackage.Literals.MODEL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<DeclaredType> getDeclarations() {
+ if (declarations == null) {
+ declarations = new EObjectContainmentEList<DeclaredType>(DeclaredType.class, this, StaticTypesystemPackage.MODEL__DECLARATIONS);
+ }
+ return declarations;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case StaticTypesystemPackage.MODEL__DECLARATIONS:
+ return ((InternalEList<?>)getDeclarations()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case StaticTypesystemPackage.MODEL__DECLARATIONS:
+ return getDeclarations();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case StaticTypesystemPackage.MODEL__DECLARATIONS:
+ getDeclarations().clear();
+ getDeclarations().addAll((Collection<? extends DeclaredType>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case StaticTypesystemPackage.MODEL__DECLARATIONS:
+ getDeclarations().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case StaticTypesystemPackage.MODEL__DECLARATIONS:
+ return declarations != null && !declarations.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ModelImpl
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/StaticTypesystemFactoryImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/StaticTypesystemFactoryImpl.java
index 6eaddd9..6d9aee5 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/StaticTypesystemFactoryImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/StaticTypesystemFactoryImpl.java
@@ -2,11 +2,12 @@
* <copyright>
* </copyright>
*
- * $Id: StaticTypesystemFactoryImpl.java,v 1.6 2008/03/07 11:10:57 jkohnlein Exp $
+ * $Id: StaticTypesystemFactoryImpl.java,v 1.7 2008/03/07 14:21:07 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.impl;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
@@ -16,6 +17,8 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.xpand3.staticTypesystem.*;
+import org.eclipse.xtend.backend.common.BackendType;
+
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
@@ -71,6 +74,7 @@ public class StaticTypesystemFactoryImpl extends EFactoryImpl implements StaticT
case StaticTypesystemPackage.DECLARED_STATIC_PROPERTY: return createDeclaredStaticProperty();
case StaticTypesystemPackage.DECLARED_TYPE_PARAMETER: return createDeclaredTypeParameter();
case StaticTypesystemPackage.DECLARED_PARAMETER: return createDeclaredParameter();
+ case StaticTypesystemPackage.MODEL: return createModel();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -191,6 +195,16 @@ public class StaticTypesystemFactoryImpl extends EFactoryImpl implements StaticT
* <!-- end-user-doc -->
* @generated
*/
+ public Model createModel() {
+ ModelImpl model = new ModelImpl();
+ return model;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public StaticTypesystemPackage getStaticTypesystemPackage() {
return (StaticTypesystemPackage)getEPackage();
}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/StaticTypesystemPackageImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/StaticTypesystemPackageImpl.java
index 6f2aab0..2d959a8 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/StaticTypesystemPackageImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/StaticTypesystemPackageImpl.java
@@ -2,12 +2,13 @@
* <copyright>
* </copyright>
*
- * $Id: StaticTypesystemPackageImpl.java,v 1.6 2008/03/07 11:10:57 jkohnlein Exp $
+ * $Id: StaticTypesystemPackageImpl.java,v 1.7 2008/03/07 14:21:07 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.impl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
@@ -22,6 +23,7 @@ import org.eclipse.xpand3.staticTypesystem.DeclaredStaticProperty;
import org.eclipse.xpand3.staticTypesystem.DeclaredType;
import org.eclipse.xpand3.staticTypesystem.DeclaredTypeParameter;
import org.eclipse.xpand3.staticTypesystem.FunctionType;
+import org.eclipse.xpand3.staticTypesystem.Model;
import org.eclipse.xpand3.staticTypesystem.StaticTypesystemFactory;
import org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage;
import org.eclipse.xpand3.staticTypesystem.Type;
@@ -29,6 +31,8 @@ import org.eclipse.xpand3.staticTypesystem.TypeVariable;
import org.eclipse.xpand3.staticTypesystem.VoidType;
import org.eclipse.xpand3.staticTypesystem.WildcardType;
+import org.eclipse.xtend.backend.common.BackendType;
+
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
@@ -128,6 +132,13 @@ public class StaticTypesystemPackageImpl extends EPackageImpl implements StaticT
private EClass declaredParameterEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass modelEClass = null;
+
+ /**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
@@ -371,6 +382,15 @@ public class StaticTypesystemPackageImpl extends EPackageImpl implements StaticT
* <!-- end-user-doc -->
* @generated
*/
+ public EReference getDeclaredType_SuperTypes() {
+ return (EReference)declaredTypeEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getDeclaredFunction() {
return declaredFunctionEClass;
}
@@ -425,6 +445,15 @@ public class StaticTypesystemPackageImpl extends EPackageImpl implements StaticT
* <!-- end-user-doc -->
* @generated
*/
+ public EAttribute getDeclaredProperty_ReadOnly() {
+ return (EAttribute)declaredPropertyEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getDeclaredStaticProperty() {
return declaredStaticPropertyEClass;
}
@@ -479,6 +508,24 @@ public class StaticTypesystemPackageImpl extends EPackageImpl implements StaticT
* <!-- end-user-doc -->
* @generated
*/
+ public EClass getModel() {
+ return modelEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getModel_Declarations() {
+ return (EReference)modelEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public StaticTypesystemFactory getStaticTypesystemFactory() {
return (StaticTypesystemFactory)getEFactoryInstance();
}
@@ -528,6 +575,7 @@ public class StaticTypesystemPackageImpl extends EPackageImpl implements StaticT
createEReference(declaredTypeEClass, DECLARED_TYPE__STATIC_PROPERTIES);
createEReference(declaredTypeEClass, DECLARED_TYPE__PROPERTIES);
createEReference(declaredTypeEClass, DECLARED_TYPE__DECLARED_TYPE_PARAMETERS);
+ createEReference(declaredTypeEClass, DECLARED_TYPE__SUPER_TYPES);
declaredFunctionEClass = createEClass(DECLARED_FUNCTION);
createEReference(declaredFunctionEClass, DECLARED_FUNCTION__DECLARED_PARAMETERS);
@@ -536,6 +584,7 @@ public class StaticTypesystemPackageImpl extends EPackageImpl implements StaticT
declaredPropertyEClass = createEClass(DECLARED_PROPERTY);
createEReference(declaredPropertyEClass, DECLARED_PROPERTY__TYPE);
+ createEAttribute(declaredPropertyEClass, DECLARED_PROPERTY__READ_ONLY);
declaredStaticPropertyEClass = createEClass(DECLARED_STATIC_PROPERTY);
createEReference(declaredStaticPropertyEClass, DECLARED_STATIC_PROPERTY__TYPE);
@@ -545,6 +594,9 @@ public class StaticTypesystemPackageImpl extends EPackageImpl implements StaticT
declaredParameterEClass = createEClass(DECLARED_PARAMETER);
createEReference(declaredParameterEClass, DECLARED_PARAMETER__TYPE);
+
+ modelEClass = createEClass(MODEL);
+ createEReference(modelEClass, MODEL__DECLARATIONS);
}
/**
@@ -595,7 +647,7 @@ public class StaticTypesystemPackageImpl extends EPackageImpl implements StaticT
initEClass(typeEClass, Type.class, "Type", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getType_DeclaredType(), this.getDeclaredType(), null, "declaredType", null, 1, 1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getType_ActualTypeArguments(), this.getAbstractTypeReference(), null, "actualTypeArguments", null, 0, -1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getType_ActualTypeArguments(), this.getAbstractTypeReference(), null, "actualTypeArguments", null, 0, -1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(typeVariableEClass, TypeVariable.class, "TypeVariable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getTypeVariable_DeclaredTypeParameter(), this.getDeclaredTypeParameter(), null, "declaredTypeParameter", null, 1, 1, TypeVariable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -603,34 +655,39 @@ public class StaticTypesystemPackageImpl extends EPackageImpl implements StaticT
initEClass(voidTypeEClass, VoidType.class, "VoidType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(wildcardTypeEClass, WildcardType.class, "WildcardType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getWildcardType_LowerBounds(), this.getAbstractTypeReference(), null, "lowerBounds", null, 0, -1, WildcardType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getWildcardType_UpperBounds(), this.getAbstractTypeReference(), null, "upperBounds", null, 0, -1, WildcardType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getWildcardType_LowerBounds(), this.getAbstractTypeReference(), null, "lowerBounds", null, 0, -1, WildcardType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getWildcardType_UpperBounds(), this.getAbstractTypeReference(), null, "upperBounds", null, 0, -1, WildcardType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(functionTypeEClass, FunctionType.class, "FunctionType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getFunctionType_DeclaredFunction(), this.getDeclaredFunction(), null, "declaredFunction", null, 1, 1, FunctionType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getFunctionType_ActualTypeArguments(), this.getAbstractTypeReference(), null, "actualTypeArguments", null, 0, -1, FunctionType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getFunctionType_ActualTypeArguments(), this.getAbstractTypeReference(), null, "actualTypeArguments", null, 0, -1, FunctionType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(declaredTypeEClass, DeclaredType.class, "DeclaredType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getDeclaredType_StaticProperties(), this.getDeclaredStaticProperty(), null, "staticProperties", null, 0, -1, DeclaredType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getDeclaredType_Properties(), this.getDeclaredProperty(), null, "properties", null, 0, -1, DeclaredType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getDeclaredType_DeclaredTypeParameters(), this.getDeclaredTypeParameter(), null, "declaredTypeParameters", null, 0, -1, DeclaredType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDeclaredType_SuperTypes(), this.getAbstractTypeReference(), null, "superTypes", null, 0, -1, DeclaredType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(declaredFunctionEClass, DeclaredFunction.class, "DeclaredFunction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getDeclaredFunction_DeclaredParameters(), this.getDeclaredParameter(), null, "declaredParameters", null, 0, -1, DeclaredFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getDeclaredFunction_DeclaredTypeParameters(), this.getDeclaredTypeParameter(), null, "declaredTypeParameters", null, 0, -1, DeclaredFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getDeclaredFunction_ReturnType(), this.getAbstractTypeReference(), null, "returnType", null, 0, 1, DeclaredFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDeclaredFunction_ReturnType(), this.getAbstractTypeReference(), null, "returnType", null, 0, 1, DeclaredFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(declaredPropertyEClass, DeclaredProperty.class, "DeclaredProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getDeclaredProperty_Type(), this.getAbstractTypeReference(), null, "type", null, 1, 1, DeclaredProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDeclaredProperty_Type(), this.getAbstractTypeReference(), null, "type", null, 1, 1, DeclaredProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getDeclaredProperty_ReadOnly(), ecorePackage.getEBoolean(), "readOnly", null, 0, 1, DeclaredProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(declaredStaticPropertyEClass, DeclaredStaticProperty.class, "DeclaredStaticProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getDeclaredStaticProperty_Type(), this.getType(), null, "type", null, 1, 1, DeclaredStaticProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDeclaredStaticProperty_Type(), this.getType(), null, "type", null, 1, 1, DeclaredStaticProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(declaredTypeParameterEClass, DeclaredTypeParameter.class, "DeclaredTypeParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getDeclaredTypeParameter_UpperBounds(), this.getAbstractTypeReference(), null, "upperBounds", null, 0, -1, DeclaredTypeParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDeclaredTypeParameter_UpperBounds(), this.getAbstractTypeReference(), null, "upperBounds", null, 0, -1, DeclaredTypeParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(declaredParameterEClass, DeclaredParameter.class, "DeclaredParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getDeclaredParameter_Type(), this.getAbstractTypeReference(), null, "type", null, 1, 1, DeclaredParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDeclaredParameter_Type(), this.getAbstractTypeReference(), null, "type", null, 1, 1, DeclaredParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(modelEClass, Model.class, "Model", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getModel_Declarations(), this.getDeclaredType(), null, "declarations", null, 0, -1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Create resource
createResource(eNS_URI);
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/TypeImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/TypeImpl.java
index 5366ba4..be651a1 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/TypeImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/TypeImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: TypeImpl.java,v 1.4 2008/03/07 11:10:57 jkohnlein Exp $
+ * $Id: TypeImpl.java,v 1.5 2008/03/07 14:21:07 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.impl;
@@ -10,6 +10,7 @@ import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
@@ -17,6 +18,8 @@ import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
@@ -50,7 +53,7 @@ public class TypeImpl extends AbstractTypeReferenceImpl implements Type {
protected DeclaredType declaredType;
/**
- * The cached value of the '{@link #getActualTypeArguments() <em>Actual Type Arguments</em>}' reference list.
+ * The cached value of the '{@link #getActualTypeArguments() <em>Actual Type Arguments</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getActualTypeArguments()
@@ -123,7 +126,7 @@ public class TypeImpl extends AbstractTypeReferenceImpl implements Type {
*/
public EList<AbstractTypeReference> getActualTypeArguments() {
if (actualTypeArguments == null) {
- actualTypeArguments = new EObjectResolvingEList<AbstractTypeReference>(AbstractTypeReference.class, this, StaticTypesystemPackage.TYPE__ACTUAL_TYPE_ARGUMENTS);
+ actualTypeArguments = new EObjectContainmentEList<AbstractTypeReference>(AbstractTypeReference.class, this, StaticTypesystemPackage.TYPE__ACTUAL_TYPE_ARGUMENTS);
}
return actualTypeArguments;
}
@@ -134,6 +137,20 @@ public class TypeImpl extends AbstractTypeReferenceImpl implements Type {
* @generated
*/
@Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case StaticTypesystemPackage.TYPE__ACTUAL_TYPE_ARGUMENTS:
+ return ((InternalEList<?>)getActualTypeArguments()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case StaticTypesystemPackage.TYPE__DECLARED_TYPE:
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/TypeVariableImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/TypeVariableImpl.java
index 999dec8..0e011b2 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/TypeVariableImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/TypeVariableImpl.java
@@ -2,12 +2,13 @@
* <copyright>
* </copyright>
*
- * $Id: TypeVariableImpl.java,v 1.4 2008/03/07 11:10:57 jkohnlein Exp $
+ * $Id: TypeVariableImpl.java,v 1.5 2008/03/07 14:21:07 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.impl;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/VoidTypeImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/VoidTypeImpl.java
index 0d97e68..ef19e5f 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/VoidTypeImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/VoidTypeImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: VoidTypeImpl.java,v 1.4 2008/03/07 11:10:57 jkohnlein Exp $
+ * $Id: VoidTypeImpl.java,v 1.5 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.impl;
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/WildcardTypeImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/WildcardTypeImpl.java
index 4b1c8f9..5fd725c 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/WildcardTypeImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/impl/WildcardTypeImpl.java
@@ -2,16 +2,20 @@
* <copyright>
* </copyright>
*
- * $Id: WildcardTypeImpl.java,v 1.4 2008/03/07 11:10:57 jkohnlein Exp $
+ * $Id: WildcardTypeImpl.java,v 1.5 2008/03/07 14:21:07 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.impl;
import java.util.Collection;
+import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
@@ -34,7 +38,7 @@ import org.eclipse.xpand3.staticTypesystem.WildcardType;
*/
public class WildcardTypeImpl extends AbstractTypeReferenceImpl implements WildcardType {
/**
- * The cached value of the '{@link #getLowerBounds() <em>Lower Bounds</em>}' reference list.
+ * The cached value of the '{@link #getLowerBounds() <em>Lower Bounds</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getLowerBounds()
@@ -44,7 +48,7 @@ public class WildcardTypeImpl extends AbstractTypeReferenceImpl implements Wildc
protected EList<AbstractTypeReference> lowerBounds;
/**
- * The cached value of the '{@link #getUpperBounds() <em>Upper Bounds</em>}' reference list.
+ * The cached value of the '{@link #getUpperBounds() <em>Upper Bounds</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUpperBounds()
@@ -79,7 +83,7 @@ public class WildcardTypeImpl extends AbstractTypeReferenceImpl implements Wildc
*/
public EList<AbstractTypeReference> getLowerBounds() {
if (lowerBounds == null) {
- lowerBounds = new EObjectResolvingEList<AbstractTypeReference>(AbstractTypeReference.class, this, StaticTypesystemPackage.WILDCARD_TYPE__LOWER_BOUNDS);
+ lowerBounds = new EObjectContainmentEList<AbstractTypeReference>(AbstractTypeReference.class, this, StaticTypesystemPackage.WILDCARD_TYPE__LOWER_BOUNDS);
}
return lowerBounds;
}
@@ -91,7 +95,7 @@ public class WildcardTypeImpl extends AbstractTypeReferenceImpl implements Wildc
*/
public EList<AbstractTypeReference> getUpperBounds() {
if (upperBounds == null) {
- upperBounds = new EObjectResolvingEList<AbstractTypeReference>(AbstractTypeReference.class, this, StaticTypesystemPackage.WILDCARD_TYPE__UPPER_BOUNDS);
+ upperBounds = new EObjectContainmentEList<AbstractTypeReference>(AbstractTypeReference.class, this, StaticTypesystemPackage.WILDCARD_TYPE__UPPER_BOUNDS);
}
return upperBounds;
}
@@ -102,6 +106,22 @@ public class WildcardTypeImpl extends AbstractTypeReferenceImpl implements Wildc
* @generated
*/
@Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case StaticTypesystemPackage.WILDCARD_TYPE__LOWER_BOUNDS:
+ return ((InternalEList<?>)getLowerBounds()).basicRemove(otherEnd, msgs);
+ case StaticTypesystemPackage.WILDCARD_TYPE__UPPER_BOUNDS:
+ return ((InternalEList<?>)getUpperBounds()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case StaticTypesystemPackage.WILDCARD_TYPE__LOWER_BOUNDS:
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/util/StaticTypesystemAdapterFactory.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/util/StaticTypesystemAdapterFactory.java
index 5bff722..4f721d5 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/util/StaticTypesystemAdapterFactory.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/util/StaticTypesystemAdapterFactory.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: StaticTypesystemAdapterFactory.java,v 1.4 2008/03/07 11:10:59 jkohnlein Exp $
+ * $Id: StaticTypesystemAdapterFactory.java,v 1.5 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.util;
@@ -124,6 +124,10 @@ public class StaticTypesystemAdapterFactory extends AdapterFactoryImpl {
return createDeclaredParameterAdapter();
}
@Override
+ public Adapter caseModel(Model object) {
+ return createModelAdapter();
+ }
+ @Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
@@ -326,6 +330,20 @@ public class StaticTypesystemAdapterFactory extends AdapterFactoryImpl {
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.xpand3.staticTypesystem.Model <em>Model</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.xpand3.staticTypesystem.Model
+ * @generated
+ */
+ public Adapter createModelAdapter() {
+ return null;
+ }
+
+ /**
* Creates a new adapter for the default case.
* <!-- begin-user-doc -->
* This default implementation returns null.
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/util/StaticTypesystemSwitch.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/util/StaticTypesystemSwitch.java
index 4db4380..024117f 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/util/StaticTypesystemSwitch.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/util/StaticTypesystemSwitch.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: StaticTypesystemSwitch.java,v 1.4 2008/03/07 11:10:59 jkohnlein Exp $
+ * $Id: StaticTypesystemSwitch.java,v 1.5 2008/03/07 14:21:08 sefftinge Exp $
*/
package org.eclipse.xpand3.staticTypesystem.util;
@@ -176,6 +176,12 @@ public class StaticTypesystemSwitch<T> {
if (result == null) result = defaultCase(theEObject);
return result;
}
+ case StaticTypesystemPackage.MODEL: {
+ Model model = (Model)theEObject;
+ T result = caseModel(model);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
default: return defaultCase(theEObject);
}
}
@@ -376,6 +382,21 @@ public class StaticTypesystemSwitch<T> {
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Model</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Model</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseModel(Model object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/AbstractNamedElementValidator.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/AbstractNamedElementValidator.java
deleted file mode 100644
index b56344f..0000000
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/AbstractNamedElementValidator.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: AbstractNamedElementValidator.java,v 1.1 2008/03/07 11:10:55 jkohnlein Exp $
- */
-package org.eclipse.xpand3.staticTypesystem.validation;
-
-
-/**
- * A sample validator interface for {@link org.eclipse.xpand3.staticTypesystem.AbstractNamedElement}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface AbstractNamedElementValidator {
- boolean validate();
-
- boolean validateName(String value);
-}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/AbstractTypeReferenceValidator.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/AbstractTypeReferenceValidator.java
deleted file mode 100644
index dcc5346..0000000
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/AbstractTypeReferenceValidator.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: AbstractTypeReferenceValidator.java,v 1.1 2008/03/07 11:10:55 jkohnlein Exp $
- */
-package org.eclipse.xpand3.staticTypesystem.validation;
-
-
-/**
- * A sample validator interface for {@link org.eclipse.xpand3.staticTypesystem.AbstractTypeReference}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface AbstractTypeReferenceValidator {
- boolean validate();
-
-}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredFunctionValidator.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredFunctionValidator.java
deleted file mode 100644
index 4f00fc1..0000000
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredFunctionValidator.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: DeclaredFunctionValidator.java,v 1.1 2008/03/07 11:10:55 jkohnlein Exp $
- */
-package org.eclipse.xpand3.staticTypesystem.validation;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
-import org.eclipse.xpand3.staticTypesystem.DeclaredParameter;
-import org.eclipse.xpand3.staticTypesystem.DeclaredTypeParameter;
-
-/**
- * A sample validator interface for {@link org.eclipse.xpand3.staticTypesystem.DeclaredFunction}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface DeclaredFunctionValidator {
- boolean validate();
-
- boolean validateDeclaredParameters(EList<DeclaredParameter> value);
- boolean validateDeclaredTypeParameters(EList<DeclaredTypeParameter> value);
- boolean validateReturnType(AbstractTypeReference value);
-}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredParameterValidator.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredParameterValidator.java
deleted file mode 100644
index 05cbdd0..0000000
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredParameterValidator.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: DeclaredParameterValidator.java,v 1.1 2008/03/07 11:10:55 jkohnlein Exp $
- */
-package org.eclipse.xpand3.staticTypesystem.validation;
-
-import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
-
-/**
- * A sample validator interface for {@link org.eclipse.xpand3.staticTypesystem.DeclaredParameter}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface DeclaredParameterValidator {
- boolean validate();
-
- boolean validateType(AbstractTypeReference value);
-}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredPropertyValidator.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredPropertyValidator.java
deleted file mode 100644
index 9a7b841..0000000
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredPropertyValidator.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: DeclaredPropertyValidator.java,v 1.1 2008/03/07 11:10:55 jkohnlein Exp $
- */
-package org.eclipse.xpand3.staticTypesystem.validation;
-
-import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
-
-/**
- * A sample validator interface for {@link org.eclipse.xpand3.staticTypesystem.DeclaredProperty}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface DeclaredPropertyValidator {
- boolean validate();
-
- boolean validateType(AbstractTypeReference value);
-}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredStaticPropertyValidator.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredStaticPropertyValidator.java
deleted file mode 100644
index fa35e3d..0000000
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredStaticPropertyValidator.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: DeclaredStaticPropertyValidator.java,v 1.1 2008/03/07 11:10:55 jkohnlein Exp $
- */
-package org.eclipse.xpand3.staticTypesystem.validation;
-
-import org.eclipse.xpand3.staticTypesystem.Type;
-
-/**
- * A sample validator interface for {@link org.eclipse.xpand3.staticTypesystem.DeclaredStaticProperty}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface DeclaredStaticPropertyValidator {
- boolean validate();
-
- boolean validateType(Type value);
-}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredTypeParameterValidator.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredTypeParameterValidator.java
deleted file mode 100644
index 40f6e8e..0000000
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredTypeParameterValidator.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: DeclaredTypeParameterValidator.java,v 1.1 2008/03/07 11:10:55 jkohnlein Exp $
- */
-package org.eclipse.xpand3.staticTypesystem.validation;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
-
-/**
- * A sample validator interface for {@link org.eclipse.xpand3.staticTypesystem.DeclaredTypeParameter}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface DeclaredTypeParameterValidator {
- boolean validate();
-
- boolean validateUpperBounds(EList<AbstractTypeReference> value);
-}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredTypeValidator.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredTypeValidator.java
deleted file mode 100644
index 82a3478..0000000
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/DeclaredTypeValidator.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: DeclaredTypeValidator.java,v 1.1 2008/03/07 11:10:55 jkohnlein Exp $
- */
-package org.eclipse.xpand3.staticTypesystem.validation;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.xpand3.staticTypesystem.DeclaredProperty;
-import org.eclipse.xpand3.staticTypesystem.DeclaredStaticProperty;
-import org.eclipse.xpand3.staticTypesystem.DeclaredTypeParameter;
-
-/**
- * A sample validator interface for {@link org.eclipse.xpand3.staticTypesystem.DeclaredType}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface DeclaredTypeValidator {
- boolean validate();
-
- boolean validateStaticProperties(EList<DeclaredStaticProperty> value);
- boolean validateProperties(EList<DeclaredProperty> value);
- boolean validateDeclaredTypeParameters(EList<DeclaredTypeParameter> value);
-}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/FunctionTypeValidator.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/FunctionTypeValidator.java
deleted file mode 100644
index 42f6f82..0000000
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/FunctionTypeValidator.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: FunctionTypeValidator.java,v 1.1 2008/03/07 11:10:55 jkohnlein Exp $
- */
-package org.eclipse.xpand3.staticTypesystem.validation;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
-import org.eclipse.xpand3.staticTypesystem.DeclaredFunction;
-
-/**
- * A sample validator interface for {@link org.eclipse.xpand3.staticTypesystem.FunctionType}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface FunctionTypeValidator {
- boolean validate();
-
- boolean validateDeclaredFunction(DeclaredFunction value);
- boolean validateActualTypeArguments(EList<AbstractTypeReference> value);
-}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/TypeValidator.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/TypeValidator.java
deleted file mode 100644
index 39f3b65..0000000
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/TypeValidator.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: TypeValidator.java,v 1.1 2008/03/07 11:10:55 jkohnlein Exp $
- */
-package org.eclipse.xpand3.staticTypesystem.validation;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
-import org.eclipse.xpand3.staticTypesystem.DeclaredType;
-
-/**
- * A sample validator interface for {@link org.eclipse.xpand3.staticTypesystem.Type}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface TypeValidator {
- boolean validate();
-
- boolean validateDeclaredType(DeclaredType value);
- boolean validateActualTypeArguments(EList<AbstractTypeReference> value);
-}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/TypeVariableValidator.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/TypeVariableValidator.java
deleted file mode 100644
index 9688f1d..0000000
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/TypeVariableValidator.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: TypeVariableValidator.java,v 1.1 2008/03/07 11:10:55 jkohnlein Exp $
- */
-package org.eclipse.xpand3.staticTypesystem.validation;
-
-import org.eclipse.xpand3.staticTypesystem.DeclaredTypeParameter;
-
-/**
- * A sample validator interface for {@link org.eclipse.xpand3.staticTypesystem.TypeVariable}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface TypeVariableValidator {
- boolean validate();
-
- boolean validateDeclaredTypeParameter(DeclaredTypeParameter value);
-}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/VoidTypeValidator.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/VoidTypeValidator.java
deleted file mode 100644
index 52aa7bc..0000000
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/VoidTypeValidator.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: VoidTypeValidator.java,v 1.1 2008/03/07 11:10:55 jkohnlein Exp $
- */
-package org.eclipse.xpand3.staticTypesystem.validation;
-
-
-/**
- * A sample validator interface for {@link org.eclipse.xpand3.staticTypesystem.VoidType}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface VoidTypeValidator {
- boolean validate();
-
-}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/WildcardTypeValidator.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/WildcardTypeValidator.java
deleted file mode 100644
index a85d6fa..0000000
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/staticTypesystem/validation/WildcardTypeValidator.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: WildcardTypeValidator.java,v 1.1 2008/03/07 11:10:55 jkohnlein Exp $
- */
-package org.eclipse.xpand3.staticTypesystem.validation;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
-
-/**
- * A sample validator interface for {@link org.eclipse.xpand3.staticTypesystem.WildcardType}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface WildcardTypeValidator {
- boolean validate();
-
- boolean validateLowerBounds(EList<AbstractTypeReference> value);
- boolean validateUpperBounds(EList<AbstractTypeReference> value);
-}
diff --git a/plugins/org.eclipse.xpand3/src/built-in.xmi b/plugins/org.eclipse.xpand3/src/built-in.xmi
new file mode 100644
index 0000000..32b3891
--- /dev/null
+++ b/plugins/org.eclipse.xpand3/src/built-in.xmi
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="ASCII"?>
+<staticTypesystem:Model xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:staticTypesystem="http://www.eclipse.org/m2t/xpand3/staticTypesystem" xsi:schemaLocation="http://www.eclipse.org/m2t/xpand3/staticTypesystem static_typesystem.ecore">
+ <declarations name="Object"/>
+ <declarations name="Boolean">
+ <superTypes xsi:type="staticTypesystem:Type" declaredType="//@declarations.0"/>
+ </declarations>
+ <declarations name="Integer">
+ <superTypes xsi:type="staticTypesystem:Type" declaredType="//@declarations.0"/>
+ </declarations>
+ <declarations name="Real">
+ <superTypes xsi:type="staticTypesystem:Type" declaredType="//@declarations.0"/>
+ </declarations>
+ <declarations name="String">
+ <superTypes xsi:type="staticTypesystem:Type" declaredType="//@declarations.0"/>
+ </declarations>
+ <declarations name="Collection">
+ <properties name="size">
+ <type xsi:type="staticTypesystem:Type" declaredType="//@declarations.2"/>
+ </properties>
+ <properties name="isEmpty">
+ <type xsi:type="staticTypesystem:Type" declaredType="//@declarations.1"/>
+ </properties>
+ <declaredTypeParameters name="T"/>
+ <superTypes xsi:type="staticTypesystem:Type" declaredType="//@declarations.0"/>
+ </declarations>
+ <declarations name="List">
+ <declaredTypeParameters name="T"/>
+ <superTypes xsi:type="staticTypesystem:Type" declaredType="//@declarations.5">
+ <actualTypeArguments xsi:type="staticTypesystem:TypeVariable" declaredTypeParameter="//@declarations.6/@declaredTypeParameters.0"/>
+ </superTypes>
+ </declarations>
+ <declarations name="Set">
+ <declaredTypeParameters name="T"/>
+ <superTypes xsi:type="staticTypesystem:Type" declaredType="//@declarations.5">
+ <actualTypeArguments xsi:type="staticTypesystem:TypeVariable" declaredTypeParameter="//@declarations.7/@declaredTypeParameters.0"/>
+ </superTypes>
+ </declarations>
+ <declarations name="Map">
+ <properties name="size">
+ <type xsi:type="staticTypesystem:Type" declaredType="//@declarations.2"/>
+ </properties>
+ <properties name="isEmpty">
+ <type xsi:type="staticTypesystem:Type" declaredType="//@declarations.1"/>
+ </properties>
+ <declaredTypeParameters name="T"/>
+ <declaredTypeParameters name="M"/>
+ <superTypes xsi:type="staticTypesystem:Type" declaredType="//@declarations.0"/>
+ </declarations>
+ <declarations name="Type">
+ <properties name="name">
+ <type xsi:type="staticTypesystem:Type" declaredType="//@declarations.4"/>
+ </properties>
+ <properties name="superTypes">
+ <type xsi:type="staticTypesystem:Type" declaredType="//@declarations.6">
+ <actualTypeArguments xsi:type="staticTypesystem:Type" declaredType="//@declarations.9">
+ <actualTypeArguments xsi:type="staticTypesystem:WildcardType"/>
+ </actualTypeArguments>
+ </type>
+ </properties>
+ <declaredTypeParameters name="T"/>
+ <superTypes xsi:type="staticTypesystem:Type" declaredType="//@declarations.0"/>
+ </declarations>
+ <declarations name="Property">
+ <declaredTypeParameters name="T"/>
+ <superTypes xsi:type="staticTypesystem:Type" declaredType="//@declarations.0"/>
+ </declarations>
+ <declarations name="StaticProperty">
+ <declaredTypeParameters name="T"/>
+ <superTypes xsi:type="staticTypesystem:Type" declaredType="//@declarations.0"/>
+ </declarations>
+ <declarations name="Function">
+ <declaredTypeParameters name="T"/>
+ <superTypes xsi:type="staticTypesystem:Type" declaredType="//@declarations.0"/>
+ </declarations>
+</staticTypesystem:Model>
diff --git a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/TypeSystem.java b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/TypeSystem.java
index 47b4f5d..0975569 100644
--- a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/TypeSystem.java
+++ b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/TypeSystem.java
@@ -17,37 +17,39 @@ package org.eclipse.xpand3.analyzation;
import java.util.List;
+import org.eclipse.xpand3.analyzation.typesystem.builtin.BuiltinTypeSystem;
import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
import org.eclipse.xpand3.staticTypesystem.FunctionType;
import org.eclipse.xpand3.staticTypesystem.Type;
import org.eclipse.xpand3.staticTypesystem.WildcardType;
-import org.eclipse.xtend.backend.common.BackendTypesystem;
/**
* @author Sven Efftinge
*
*/
public interface TypeSystem {
- String OBJECT = "Object";
- String VOID = "Void";
+ final String OBJECT = "Object";
+ final String VOID = "Void";
// Collection types
- String COLLECTION = "Collection";
- String SET = "Set";
- String LIST = "List";
+ final String COLLECTION = "Collection";
+ final String SET = "Set";
+ final String LIST = "List";
// Datatypes
- String BOOLEAN = "Boolean";
- String INTEGER = "Integer";
- String REAL = "Real";
- String STRING = "String";
+ final String BOOLEAN = "Boolean";
+ final String INTEGER = "Integer";
+ final String REAL = "Real";
+ final String STRING = "String";
// reflection layer types
- String FEATURE = "Feature";
- String TYPE = "Type";
- String OPERATION = "Operation";
- String PROPERTY = "Property";
- String STATIC_PROPERTY = "StaticProperty";
+ final String FEATURE = "Feature";
+ final String TYPE = "Type";
+ final String OPERATION = "Operation";
+ final String PROPERTY = "Property";
+ final String STATIC_PROPERTY = "StaticProperty";
+
+ final TypeSystem BUILTIN_TYPESYSTEM = new BuiltinTypeSystem(null);
WildcardType wildCard(AbstractTypeReference...upperBounds);
WildcardType wildCardWithLower(AbstractTypeReference...lowerBounds);
diff --git a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/TypeSystemImpl.java b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/TypeSystemImpl.java
index c1ba102..0917923 100644
--- a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/TypeSystemImpl.java
+++ b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/TypeSystemImpl.java
@@ -52,7 +52,7 @@ public class TypeSystemImpl extends AbstractTypeSystemImpl implements TypeSystem
*/
public Type typeForName(String name, AbstractTypeReference... typeArguments) {
DeclaredType dt = contr.typeForName(name);
- if (dt == null) {
+ if (dt != null) {
//TODO CACHING
Type t = FACTORY.createType();
t.setDeclaredType(dt);
diff --git a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/builtin/BuiltinDeclarationsContributor.java b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/builtin/BuiltinDeclarationsContributor.java
index 8d94d81..572d659 100644
--- a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/builtin/BuiltinDeclarationsContributor.java
+++ b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/builtin/BuiltinDeclarationsContributor.java
@@ -53,14 +53,14 @@ public class BuiltinDeclarationsContributor implements DeclarationsContributor {
private Map<String, DeclaredType> types = new HashMap<String, DeclaredType>();
- private TypeSystem typeSystems = null;
+ private TypeSystem typeSystem = null;
/*
* (non-Javadoc)
* @see org.eclipse.xand3.analyzation.typesystem.Xpand3DeclarationsResource#setTypeSystem(org.eclipse.xand3.analyzation.TypeSystem)
*/
public void setTypeSystem(TypeSystem ts) {
- this.typeSystems = ts;
+ this.typeSystem = ts;
}
/* (non-Javadoc)
@@ -99,7 +99,7 @@ public class BuiltinDeclarationsContributor implements DeclarationsContributor {
StaticProperty sp) {
DeclaredStaticProperty dsp = StaticTypesystemFactory.eINSTANCE.createDeclaredStaticProperty();
dsp.setName(sp.getName());
- dsp.setType(typeSystems.typeForName(sp.getType().getName()));
+ dsp.setType(typeSystem.typeForName(sp.getType().getName()));
return dsp;
}
@@ -111,7 +111,7 @@ public class BuiltinDeclarationsContributor implements DeclarationsContributor {
DeclaredProperty dp = StaticTypesystemFactory.eINSTANCE
.createDeclaredProperty();
dp.setName(value.getName());
- dp.setType(typeSystems.typeForName(value.getType().getName()));
+ dp.setType(typeSystem.typeForName(value.getType().getName()));
return dp;
}
diff --git a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/builtin/BuiltinTypeSystem.java b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/builtin/BuiltinTypeSystem.java
new file mode 100644
index 0000000..87135d3
--- /dev/null
+++ b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/builtin/BuiltinTypeSystem.java
@@ -0,0 +1,85 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2002-2007 itemis AG and others.
+ * 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:
+ * itemis AG - Initial API and implementation
+ *
+ * </copyright>
+ *
+ */
+package org.eclipse.xpand3.analyzation.typesystem.builtin;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
+import org.eclipse.xpand3.analyzation.DeclarationsContributor;
+import org.eclipse.xpand3.analyzation.TypeSystem;
+import org.eclipse.xpand3.analyzation.typesystem.TypeSystemImpl;
+import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
+import org.eclipse.xpand3.staticTypesystem.DeclaredFunction;
+import org.eclipse.xpand3.staticTypesystem.DeclaredType;
+import org.eclipse.xpand3.staticTypesystem.Model;
+import org.eclipse.xpand3.staticTypesystem.StaticTypesystemPackage;
+import org.eclipse.xpand3.util.LoaderFactory;
+
+/**
+ * @author Sven Efftinge
+ *
+ */
+public class BuiltinTypeSystem extends TypeSystemImpl implements TypeSystem {
+ private static Map<String, DeclaredType> types = new HashMap<String, DeclaredType>();
+ static {
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xmi", new XMIResourceFactoryImpl());
+ EFactory factoryInstance = StaticTypesystemPackage.eINSTANCE.getEFactoryInstance();
+ // TODO use classpath: URI
+ InputStream resourceAsStream = LoaderFactory.getClassLoader(BuiltinTypeSystem.class).getResourceAsStream("built-in.xmi");
+ Resource resource = new ResourceSetImpl().createResource(URI.createURI("classpath:/built-in.xmi"));
+ try {
+ resource.load(resourceAsStream, null);
+ Model m = (Model) resource.getContents().get(0);
+ for (DeclaredType dt : m.getDeclarations()) {
+ types.put(dt.getName(), dt);
+ }
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ /**
+ * @param contributor
+ */
+ public BuiltinTypeSystem(DeclarationsContributor contributor) {
+ super(new DeclarationsContributor() {
+
+ public DeclaredFunction functionForName(String name,
+ AbstractTypeReference... parameterTypes) {
+ return null;
+ }
+
+ public String[] getReferencedContributors() {
+ return null;
+ }
+
+ public void setTypeSystem(TypeSystem ts) {
+ }
+
+ public DeclaredType typeForName(String name) {
+ return types.get(name);
+ }
+
+ });
+ }
+
+}
diff --git a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/java/JavaDeclarationsContributor.java b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/java/JavaDeclarationsContributor.java
new file mode 100644
index 0000000..0090cf6
--- /dev/null
+++ b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/java/JavaDeclarationsContributor.java
@@ -0,0 +1,185 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2002-2007 itemis AG and others.
+ * 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:
+ * itemis AG - Initial API and implementation
+ *
+ * </copyright>
+ *
+ */
+package org.eclipse.xpand3.analyzation.typesystem.java;
+
+import static org.eclipse.xpand3.analyzation.TypeSystem.BOOLEAN;
+import static org.eclipse.xpand3.analyzation.TypeSystem.COLLECTION;
+import static org.eclipse.xpand3.analyzation.TypeSystem.INTEGER;
+import static org.eclipse.xpand3.analyzation.TypeSystem.LIST;
+import static org.eclipse.xpand3.analyzation.TypeSystem.OBJECT;
+import static org.eclipse.xpand3.analyzation.TypeSystem.OPERATION;
+import static org.eclipse.xpand3.analyzation.TypeSystem.PROPERTY;
+import static org.eclipse.xpand3.analyzation.TypeSystem.REAL;
+import static org.eclipse.xpand3.analyzation.TypeSystem.SET;
+import static org.eclipse.xpand3.analyzation.TypeSystem.STATIC_PROPERTY;
+import static org.eclipse.xpand3.analyzation.TypeSystem.STRING;
+import static org.eclipse.xpand3.analyzation.TypeSystem.TYPE;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.xpand3.analyzation.DeclarationsContributor;
+import org.eclipse.xpand3.analyzation.TypeSystem;
+import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
+import org.eclipse.xpand3.staticTypesystem.DeclaredFunction;
+import org.eclipse.xpand3.staticTypesystem.DeclaredProperty;
+import org.eclipse.xpand3.staticTypesystem.DeclaredStaticProperty;
+import org.eclipse.xpand3.staticTypesystem.DeclaredType;
+import org.eclipse.xpand3.staticTypesystem.StaticTypesystemFactory;
+import org.eclipse.xpand3.util.LoaderFactory;
+import org.eclipse.xtend.backend.common.BackendType;
+import org.eclipse.xtend.backend.common.Property;
+import org.eclipse.xtend.backend.common.StaticProperty;
+import org.eclipse.xtend.backend.types.builtin.BooleanType;
+import org.eclipse.xtend.backend.types.builtin.CollectionType;
+import org.eclipse.xtend.backend.types.builtin.DoubleType;
+import org.eclipse.xtend.backend.types.builtin.FunctionType;
+import org.eclipse.xtend.backend.types.builtin.ListType;
+import org.eclipse.xtend.backend.types.builtin.LongType;
+import org.eclipse.xtend.backend.types.builtin.ObjectType;
+import org.eclipse.xtend.backend.types.builtin.PropertyType;
+import org.eclipse.xtend.backend.types.builtin.SetType;
+import org.eclipse.xtend.backend.types.builtin.StaticPropertyType;
+import org.eclipse.xtend.backend.types.builtin.StringType;
+import org.eclipse.xtend.backend.types.builtin.TypeType;
+
+/**
+ * @author Sven Efftinge
+ *
+ */
+public class JavaDeclarationsContributor implements DeclarationsContributor {
+
+ private Map<String, DeclaredType> types = new HashMap<String, DeclaredType>();
+
+ private TypeSystem typeSystem = null;
+
+ private Class<?> cls;
+
+ /**
+ *
+ */
+ public JavaDeclarationsContributor(String importedNamespace) {
+ this.cls = LoaderFactory.getClassLoader(this).loadClass(importedNamespace);
+ if (cls==null) {
+ throw new IllegalArgumentException("Couldn't find Java Class '"+importedNamespace+"'");
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.xand3.analyzation.typesystem.Xpand3DeclarationsResource#setTypeSystem(org.eclipse.xand3.analyzation.TypeSystem)
+ */
+ public void setTypeSystem(TypeSystem ts) {
+ this.typeSystem = ts;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.xand3.analyzation.typesystem.Xpand3DeclarationsResource#getReferencedResources()
+ */
+ public String[] getReferencedContributors() {
+ return null;
+ }
+ /**
+ * @param instance
+ * @return
+ */
+ private DeclaredType createDeclaredType(BackendType bt) {
+ if (types.containsKey(bt.getName())) {
+ return types.get(bt.getName());
+ }
+ DeclaredType dt = StaticTypesystemFactory.eINSTANCE
+ .createDeclaredType();
+ types.put(bt.getName(), dt);
+ dt.setName(bt.getName());
+ Map<String, ? extends Property> properties = bt.getProperties();
+ for (Entry<String, ? extends Property> entry : properties.entrySet()) {
+ dt.getProperties().add(createDeclaredProperty(entry.getValue()));
+ }
+ for (StaticProperty sp : bt.getStaticProperties().values()) {
+ dt.getStaticProperties().add(createDeclaredStaticProperty(sp));
+ }
+ return dt;
+ }
+
+ /**
+ * @param sp
+ * @return
+ */
+ private DeclaredStaticProperty createDeclaredStaticProperty(
+ StaticProperty sp) {
+ DeclaredStaticProperty dsp = StaticTypesystemFactory.eINSTANCE.createDeclaredStaticProperty();
+ dsp.setName(sp.getName());
+ dsp.setType(typeSystem.typeForName(sp.getType().getName()));
+ return dsp;
+ }
+
+ /**
+ * @param value
+ * @return
+ */
+ private DeclaredProperty createDeclaredProperty(Property value) {
+ DeclaredProperty dp = StaticTypesystemFactory.eINSTANCE
+ .createDeclaredProperty();
+ dp.setName(value.getName());
+ dp.setType(typeSystem.typeForName(value.getType().getName()));
+ return dp;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.xand3.analyzation.typesystem.DeclarationsContributor#typeForName(java.lang.String)
+ */
+ public DeclaredType typeForName(String name) {
+ if (name.equals(OBJECT)) {
+ createDeclaredType(ObjectType.INSTANCE);
+ } else if (name.equals(STRING)) {
+ createDeclaredType(StringType.INSTANCE);
+ } else if (name.equals(BOOLEAN)) {
+ createDeclaredType(BooleanType.INSTANCE);
+ } else if (name.equals(INTEGER)) {
+ createDeclaredType(LongType.INSTANCE);
+ } else if (name.equals(REAL)) {
+ createDeclaredType(DoubleType.INSTANCE);
+ } else if (name.equals(COLLECTION)) {
+ createDeclaredType(CollectionType.INSTANCE);
+ } else if (name.equals(LIST)) {
+ createDeclaredType(ListType.INSTANCE);
+ } else if (name.equals(SET)) {
+ createDeclaredType(SetType.INSTANCE);
+ } else if (name.equals(TYPE)) {
+ createDeclaredType(TypeType.INSTANCE);
+ } else if (name.equals(PROPERTY)) {
+ createDeclaredType(PropertyType.INSTANCE);
+ } else if (name.equals(OPERATION)) {
+ createDeclaredType(FunctionType.INSTANCE);
+ } else if (name.equals(STATIC_PROPERTY)) {
+ createDeclaredType(StaticPropertyType.INSTANCE);
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.xand3.analyzation.typesystem.DeclarationsContributor#functionForName(java.lang.String, org.eclipse.xpand3.staticTypesystem.AbstractTypeReference[])
+ */
+ public DeclaredFunction functionForName(String name,
+ AbstractTypeReference... parameterTypes) {
+ //TODO
+ return null;
+ }
+
+}
diff --git a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/java/JavaMapped.example.txt b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/java/JavaMapped.example.txt
new file mode 100644
index 0000000..049691a
--- /dev/null
+++ b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/java/JavaMapped.example.txt
@@ -0,0 +1,45 @@
+Example:
+// java klasse EntityUtil.java
+
+public class EntityUtil {
+
+ EObject fooBar(EObject x) {
+ //do stuff
+ return x;
+ }
+
+ String someHelper(String x, String y) {
+ return "foo"+x+y+"bar";
+ }
+}
+
+/*
+From within Xtend one can import this file via
+ import "my.package.EntityUtil.java"
+
+which has the same effect as referring the following empty mapping file:
+ import "my.package.EntityUtil.javamapping"
+
+// my.package.EntityUtil.javamapping
+map EntityUtil{}
+
+But then the Type EObject would be resolved to by the Java type org.eclipse.emf.ecore.EObject instead of e.g. myMetamodel::Entity.
+So we can use the mapping file to provide additional needed information like so:
+
+// Mapping-DSL Example 1 - maps EntityUtil.somehelper and EntityUtil.foobar
+import "classpath:/my/pack/metamodel.ecore";
+
+map EntityUtil {
+ Entity fooBar(Entity)
+}
+
+// Mapping-DSL Example 2 - maps foobar only
+import "classpath:/my/pack/metamodel.ecore";
+
+map EntityUtil {
+ Entity fooBar(Entity) // explicit mappings are always contained
+ without(*(...)) // uses pointcut syntax so without(someHelper) or without(someHelper(String,String)) would do the trick as well
+ // include(... ) works the other way around
+}
+
+
diff --git a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/xpand3/Xpand3ResourceDeclarationsContributor.java b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/xpand3/Xpand3ResourceDeclarationsContributor.java
index 9bea84d..34a59e8 100644
--- a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/xpand3/Xpand3ResourceDeclarationsContributor.java
+++ b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/typesystem/xpand3/Xpand3ResourceDeclarationsContributor.java
@@ -25,13 +25,10 @@ import org.eclipse.xpand3.ImportStatement;
import org.eclipse.xpand3.analyzation.DeclarationsContributor;
import org.eclipse.xpand3.analyzation.TypeSystem;
import org.eclipse.xpand3.ast.AstUtil;
-import org.eclipse.xpand3.declaration.AbstractDeclaration;
import org.eclipse.xpand3.declaration.Definition;
import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
import org.eclipse.xpand3.staticTypesystem.DeclaredFunction;
import org.eclipse.xpand3.staticTypesystem.DeclaredType;
-
-import static org.eclipse.xpand3.ast.AstUtil.*;
/**
* @author Sven Efftinge
*
diff --git a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/util/ClassLoaderLoaderImpl.java b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/util/ClassLoaderLoaderImpl.java
new file mode 100644
index 0000000..718922c
--- /dev/null
+++ b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/util/ClassLoaderLoaderImpl.java
@@ -0,0 +1,55 @@
+package org.eclipse.xpand3.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Enumeration;
+
+
+/**
+ * @author Sven Efftinge
+ *
+ */
+public class ClassLoaderLoaderImpl implements Loader {
+
+ private ClassLoader classLoader;
+
+ /**
+ * @param contextClassLoader
+ */
+ public ClassLoaderLoaderImpl(ClassLoader contextClassLoader) {
+ this.classLoader = contextClassLoader;
+ }
+
+ public URL getResource(String name) {
+ return classLoader.getResource(name);
+ }
+
+ public InputStream getResourceAsStream(String name) {
+ return classLoader.getResourceAsStream(name);
+ }
+
+ public Enumeration<URL> getResources(String name) {
+ try {
+ return classLoader.getResources(name);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public Class<?> loadClass(String name) {
+ try {
+ return classLoader.loadClass(name);
+ } catch (ClassNotFoundException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * @return the class loader
+ */
+ public ClassLoader getClassLoader() {
+ return classLoader;
+ }
+
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/util/Loader.java b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/util/Loader.java
new file mode 100644
index 0000000..979bfa1
--- /dev/null
+++ b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/util/Loader.java
@@ -0,0 +1,19 @@
+package org.eclipse.xpand3.util;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Enumeration;
+
+/**
+ * @author Sven Efftinge
+ *
+ */
+public interface Loader {
+ public URL getResource(String name);
+
+ public InputStream getResourceAsStream(String name);
+
+ public Enumeration<URL> getResources(String name);
+
+ public Class<?> loadClass(String name);
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/util/LoaderFactory.java b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/util/LoaderFactory.java
new file mode 100644
index 0000000..076f6ed
--- /dev/null
+++ b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/util/LoaderFactory.java
@@ -0,0 +1,40 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2002-2007 itemis AG and others.
+ * 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:
+ * itemis AG - Initial API and implementation
+ *
+ * </copyright>
+ *
+ */
+package org.eclipse.xpand3.util;
+
+
+/**
+ * @author Sven Efftinge
+ *
+ */
+public class LoaderFactory {
+ public interface LookupStrategy {
+ Loader getClassLoader(Object ctx);
+ }
+
+ public static LookupStrategy strategy = new LookupStrategy() {
+
+ public Loader getClassLoader(Object ctx) {
+ return new ClassLoaderLoaderImpl(Thread.currentThread()
+ .getContextClassLoader());
+ }
+
+ };
+
+ public static Loader getClassLoader(Object ctx) {
+ return strategy.getClassLoader(ctx);
+ }
+}
diff --git a/plugins/org.eclipse.xpand3/src/staticTypesystem/Presentation.ext b/plugins/org.eclipse.xpand3/src/staticTypesystem/Presentation.ext
new file mode 100644
index 0000000..1771d0f
--- /dev/null
+++ b/plugins/org.eclipse.xpand3/src/staticTypesystem/Presentation.ext
@@ -0,0 +1,32 @@
+import staticTypesystem;
+
+label(Type this) :
+ declaredType.name+(if !actualTypeArguments.isEmpty then '<'+actualTypeArguments.label().toString(",")+'>' else '');
+
+label(WildcardType this) :
+ '?'+ (if upperBounds.isEmpty then '' else ' extends '+upperBounds.label().toString(','));
+
+label(TypeVariable this) :
+ declaredTypeParameter.name;
+
+label(AbstractNamedElement this) :
+ name;
+
+label(DeclaredTypeParameter this) :
+ '<'+internalLabel()+'>';
+
+internalLabel(DeclaredTypeParameter this) :
+ name+(upperBounds.isEmpty?'':' extends '+upperBounds.label().toString(','));
+
+label(DeclaredType this) :
+ name+
+ (declaredTypeParameters.isEmpty?'':'<'+declaredTypeParameters.internalLabel().toString(',')+'>')+
+ (superTypes.isEmpty?'':' extends '+superTypes.label().toString(','));
+
+label(DeclaredProperty this) :
+ type.label()+" "+name;
+
+label(Model this) : '--';
+
+label(emf::EObject this) :
+ "unnamed"; \ No newline at end of file
diff --git a/plugins/org.eclipse.xpand3/src/static_typesystem.ecore b/plugins/org.eclipse.xpand3/src/static_typesystem.ecore
index 313d358..db96c79 100644
--- a/plugins/org.eclipse.xpand3/src/static_typesystem.ecore
+++ b/plugins/org.eclipse.xpand3/src/static_typesystem.ecore
@@ -11,7 +11,7 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="declaredType" lowerBound="1"
eType="#//DeclaredType"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="actualTypeArguments" upperBound="-1"
- eType="#//AbstractTypeReference"/>
+ eType="#//AbstractTypeReference" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="TypeVariable" eSuperTypes="#//AbstractTypeReference">
<eStructuralFeatures xsi:type="ecore:EReference" name="declaredTypeParameter"
@@ -20,15 +20,15 @@
<eClassifiers xsi:type="ecore:EClass" name="VoidType" eSuperTypes="#//AbstractTypeReference"/>
<eClassifiers xsi:type="ecore:EClass" name="WildcardType" eSuperTypes="#//AbstractTypeReference">
<eStructuralFeatures xsi:type="ecore:EReference" name="lowerBounds" upperBound="-1"
- eType="#//AbstractTypeReference"/>
+ eType="#//AbstractTypeReference" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="upperBounds" upperBound="-1"
- eType="#//AbstractTypeReference"/>
+ eType="#//AbstractTypeReference" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="FunctionType" eSuperTypes="#//AbstractTypeReference">
<eStructuralFeatures xsi:type="ecore:EReference" name="declaredFunction" lowerBound="1"
eType="#//DeclaredFunction"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="actualTypeArguments" upperBound="-1"
- eType="#//AbstractTypeReference"/>
+ eType="#//AbstractTypeReference" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DeclaredType" eSuperTypes="#//AbstractNamedElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="staticProperties" upperBound="-1"
@@ -37,25 +37,36 @@
eType="#//DeclaredProperty" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="declaredTypeParameters"
upperBound="-1" eType="#//DeclaredTypeParameter" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="superTypes" upperBound="-1"
+ eType="#//AbstractTypeReference" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DeclaredFunction" eSuperTypes="#//AbstractNamedElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="declaredParameters" upperBound="-1"
eType="#//DeclaredParameter" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="declaredTypeParameters"
upperBound="-1" eType="#//DeclaredTypeParameter" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="returnType" eType="#//AbstractTypeReference"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="returnType" eType="#//AbstractTypeReference"
+ containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DeclaredProperty" eSuperTypes="#//AbstractNamedElement">
- <eStructuralFeatures xsi:type="ecore:EReference" name="type" lowerBound="1" eType="#//AbstractTypeReference"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="type" lowerBound="1" eType="#//AbstractTypeReference"
+ containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="readOnly" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DeclaredStaticProperty" eSuperTypes="#//AbstractNamedElement">
- <eStructuralFeatures xsi:type="ecore:EReference" name="type" lowerBound="1" eType="#//Type"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="type" lowerBound="1" eType="#//Type"
+ containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DeclaredTypeParameter" eSuperTypes="#//AbstractNamedElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="upperBounds" upperBound="-1"
- eType="#//AbstractTypeReference"/>
+ eType="#//AbstractTypeReference" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DeclaredParameter" eSuperTypes="#//AbstractNamedElement">
- <eStructuralFeatures xsi:type="ecore:EReference" name="type" lowerBound="1" eType="#//AbstractTypeReference"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="type" lowerBound="1" eType="#//AbstractTypeReference"
+ containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Model">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="declarations" upperBound="-1"
+ eType="#//DeclaredType" containment="true"/>
</eClassifiers>
</ecore:EPackage>
diff --git a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/CompositeXpand3TypeSystem.java b/tests/org.eclipse.xpand3.tests/src/org/eclipse/xpand3/analyzation/TypeSystemTest.java
index b480b3a..ea6f653 100644
--- a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/analyzation/CompositeXpand3TypeSystem.java
+++ b/tests/org.eclipse.xpand3.tests/src/org/eclipse/xpand3/analyzation/TypeSystemTest.java
@@ -15,10 +15,18 @@
*/
package org.eclipse.xpand3.analyzation;
+import org.eclipse.xpand3.staticTypesystem.Type;
+
+import junit.framework.TestCase;
+
/**
* @author Sven Efftinge
*
*/
-public class CompositeXpand3TypeSystem {
-
+public class TypeSystemTest extends TestCase {
+ public void testSimple() throws Exception {
+ TypeSystem ts = TypeSystem.BUILTIN_TYPESYSTEM;
+ Type typeForName = ts.typeForName("Map", ts.typeForName("String"), ts.typeForName("Object"));
+ assertNotNull(typeForName);
+ }
}