summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsefftinge2008-03-13 07:41:50 (EDT)
committer sefftinge2008-03-13 07:41:50 (EDT)
commit50a10c3586af9143f7d7ef4cd4ec66e35fb14614 (patch)
tree576c2717deca5f65692499f2d7dacd871f6bcb9a
parent232e41d1138346e0b17d900c4865d46d894e2add (diff)
downloadorg.eclipse.xpand-50a10c3586af9143f7d7ef4cd4ec66e35fb14614.zip
org.eclipse.xpand-50a10c3586af9143f7d7ef4cd4ec66e35fb14614.tar.gz
org.eclipse.xpand-50a10c3586af9143f7d7ef4cd4ec66e35fb14614.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/ExpressionFactory.java11
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/ExpressionPackage.java134
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/UnaryOperation.java81
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/ExpressionFactoryImpl.java13
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/ExpressionPackageImpl.java46
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/UnaryOperationImpl.java241
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/util/ExpressionAdapterFactory.java20
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/util/ExpressionSwitch.java25
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/FileStatement.java29
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/ForEachStatement.java24
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/IfStatement.java29
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/StatementPackage.java80
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/FileStatementImpl.java70
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/ForEachStatementImpl.java58
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/IfStatementImpl.java62
-rw-r--r--plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/StatementPackageImpl.java32
-rw-r--r--plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/middlend/XtendFrontendASTConverter.java384
17 files changed, 578 insertions, 761 deletions
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/ExpressionFactory.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/ExpressionFactory.java
index 3652a9c..1eccf39 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/ExpressionFactory.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/ExpressionFactory.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: ExpressionFactory.java,v 1.4 2008/03/12 09:54:29 jkohnlein Exp $
+ * $Id: ExpressionFactory.java,v 1.5 2008/03/13 11:41:50 sefftinge Exp $
*/
package org.eclipse.xpand3.expression;
@@ -206,15 +206,6 @@ public interface ExpressionFactory extends EFactory {
BinaryOperation createBinaryOperation();
/**
- * Returns a new object of class '<em>Unary Operation</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Unary Operation</em>'.
- * @generated
- */
- UnaryOperation createUnaryOperation();
-
- /**
* 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/expression/ExpressionPackage.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/ExpressionPackage.java
index 8dd2413..df2b276 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/ExpressionPackage.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/ExpressionPackage.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: ExpressionPackage.java,v 1.4 2008/03/12 09:54:30 jkohnlein Exp $
+ * $Id: ExpressionPackage.java,v 1.5 2008/03/13 11:41:50 sefftinge Exp $
*/
package org.eclipse.xpand3.expression;
@@ -1650,80 +1650,6 @@ public interface ExpressionPackage extends EPackage {
/**
- * The meta object id for the '{@link org.eclipse.xpand3.expression.impl.UnaryOperationImpl <em>Unary Operation</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.xpand3.expression.impl.UnaryOperationImpl
- * @see org.eclipse.xpand3.expression.impl.ExpressionPackageImpl#getUnaryOperation()
- * @generated
- */
- int UNARY_OPERATION = 22;
-
- /**
- * The feature id for the '<em><b>Line</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UNARY_OPERATION__LINE = ABSTRACT_EXPRESSION__LINE;
-
- /**
- * The feature id for the '<em><b>Start</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UNARY_OPERATION__START = ABSTRACT_EXPRESSION__START;
-
- /**
- * The feature id for the '<em><b>End</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UNARY_OPERATION__END = ABSTRACT_EXPRESSION__END;
-
- /**
- * The feature id for the '<em><b>File Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UNARY_OPERATION__FILE_NAME = ABSTRACT_EXPRESSION__FILE_NAME;
-
- /**
- * The feature id for the '<em><b>Operator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UNARY_OPERATION__OPERATOR = ABSTRACT_EXPRESSION_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Operand</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UNARY_OPERATION__OPERAND = ABSTRACT_EXPRESSION_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Unary Operation</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UNARY_OPERATION_FEATURE_COUNT = ABSTRACT_EXPRESSION_FEATURE_COUNT + 2;
-
-
- /**
* Returns the meta object for class '{@link org.eclipse.xpand3.expression.AbstractExpression <em>Abstract Expression</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2252,38 +2178,6 @@ public interface ExpressionPackage extends EPackage {
EReference getBinaryOperation_Operator();
/**
- * Returns the meta object for class '{@link org.eclipse.xpand3.expression.UnaryOperation <em>Unary Operation</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Unary Operation</em>'.
- * @see org.eclipse.xpand3.expression.UnaryOperation
- * @generated
- */
- EClass getUnaryOperation();
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.xpand3.expression.UnaryOperation#getOperator <em>Operator</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Operator</em>'.
- * @see org.eclipse.xpand3.expression.UnaryOperation#getOperator()
- * @see #getUnaryOperation()
- * @generated
- */
- EReference getUnaryOperation_Operator();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.xpand3.expression.UnaryOperation#getOperand <em>Operand</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Operand</em>'.
- * @see org.eclipse.xpand3.expression.UnaryOperation#getOperand()
- * @see #getUnaryOperation()
- * @generated
- */
- EReference getUnaryOperation_Operand();
-
- /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2749,32 +2643,6 @@ public interface ExpressionPackage extends EPackage {
*/
EReference BINARY_OPERATION__OPERATOR = eINSTANCE.getBinaryOperation_Operator();
- /**
- * The meta object literal for the '{@link org.eclipse.xpand3.expression.impl.UnaryOperationImpl <em>Unary Operation</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.xpand3.expression.impl.UnaryOperationImpl
- * @see org.eclipse.xpand3.expression.impl.ExpressionPackageImpl#getUnaryOperation()
- * @generated
- */
- EClass UNARY_OPERATION = eINSTANCE.getUnaryOperation();
-
- /**
- * The meta object literal for the '<em><b>Operator</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference UNARY_OPERATION__OPERATOR = eINSTANCE.getUnaryOperation_Operator();
-
- /**
- * The meta object literal for the '<em><b>Operand</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference UNARY_OPERATION__OPERAND = eINSTANCE.getUnaryOperation_Operand();
-
}
} //ExpressionPackage
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/UnaryOperation.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/UnaryOperation.java
deleted file mode 100644
index 0b8bbaf..0000000
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/UnaryOperation.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: UnaryOperation.java,v 1.1 2008/03/12 09:54:30 jkohnlein Exp $
- */
-package org.eclipse.xpand3.expression;
-
-import org.eclipse.xpand3.Identifier;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Unary Operation</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.xpand3.expression.UnaryOperation#getOperator <em>Operator</em>}</li>
- * <li>{@link org.eclipse.xpand3.expression.UnaryOperation#getOperand <em>Operand</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.xpand3.expression.ExpressionPackage#getUnaryOperation()
- * @model
- * @generated
- */
-public interface UnaryOperation extends AbstractExpression {
- /**
- * Returns the value of the '<em><b>Operator</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Operator</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Operator</em>' containment reference.
- * @see #setOperator(Identifier)
- * @see org.eclipse.xpand3.expression.ExpressionPackage#getUnaryOperation_Operator()
- * @model containment="true"
- * @generated
- */
- Identifier getOperator();
-
- /**
- * Sets the value of the '{@link org.eclipse.xpand3.expression.UnaryOperation#getOperator <em>Operator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Operator</em>' containment reference.
- * @see #getOperator()
- * @generated
- */
- void setOperator(Identifier value);
-
- /**
- * Returns the value of the '<em><b>Operand</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Operand</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Operand</em>' reference.
- * @see #setOperand(AbstractExpression)
- * @see org.eclipse.xpand3.expression.ExpressionPackage#getUnaryOperation_Operand()
- * @model
- * @generated
- */
- AbstractExpression getOperand();
-
- /**
- * Sets the value of the '{@link org.eclipse.xpand3.expression.UnaryOperation#getOperand <em>Operand</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Operand</em>' reference.
- * @see #getOperand()
- * @generated
- */
- void setOperand(AbstractExpression value);
-
-} // UnaryOperation
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/ExpressionFactoryImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/ExpressionFactoryImpl.java
index 7f423bf..dfe3320 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/ExpressionFactoryImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/ExpressionFactoryImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: ExpressionFactoryImpl.java,v 1.4 2008/03/12 09:54:29 jkohnlein Exp $
+ * $Id: ExpressionFactoryImpl.java,v 1.5 2008/03/13 11:41:50 sefftinge Exp $
*/
package org.eclipse.xpand3.expression.impl;
@@ -80,7 +80,6 @@ public class ExpressionFactoryImpl extends EFactoryImpl implements ExpressionFac
case ExpressionPackage.SWITCH_EXPRESSION: return createSwitchExpression();
case ExpressionPackage.CASE: return createCase();
case ExpressionPackage.BINARY_OPERATION: return createBinaryOperation();
- case ExpressionPackage.UNARY_OPERATION: return createUnaryOperation();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -291,16 +290,6 @@ public class ExpressionFactoryImpl extends EFactoryImpl implements ExpressionFac
* <!-- end-user-doc -->
* @generated
*/
- public UnaryOperation createUnaryOperation() {
- UnaryOperationImpl unaryOperation = new UnaryOperationImpl();
- return unaryOperation;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
public ExpressionPackage getExpressionPackage() {
return (ExpressionPackage)getEPackage();
}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/ExpressionPackageImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/ExpressionPackageImpl.java
index 954cd25..cffcdc8 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/ExpressionPackageImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/ExpressionPackageImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: ExpressionPackageImpl.java,v 1.4 2008/03/12 09:54:29 jkohnlein Exp $
+ * $Id: ExpressionPackageImpl.java,v 1.5 2008/03/13 11:41:50 sefftinge Exp $
*/
package org.eclipse.xpand3.expression.impl;
@@ -43,7 +43,6 @@ import org.eclipse.xpand3.expression.StringLiteral;
import org.eclipse.xpand3.expression.SwitchExpression;
import org.eclipse.xpand3.expression.TypeSelectExpression;
-import org.eclipse.xpand3.expression.UnaryOperation;
import org.eclipse.xpand3.impl.Xpand3PackageImpl;
import org.eclipse.xpand3.statement.StatementPackage;
@@ -212,13 +211,6 @@ public class ExpressionPackageImpl extends EPackageImpl implements ExpressionPac
private EClass binaryOperationEClass = null;
/**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass unaryOperationEClass = 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.
@@ -752,33 +744,6 @@ public class ExpressionPackageImpl extends EPackageImpl implements ExpressionPac
* <!-- end-user-doc -->
* @generated
*/
- public EClass getUnaryOperation() {
- return unaryOperationEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getUnaryOperation_Operator() {
- return (EReference)unaryOperationEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getUnaryOperation_Operand() {
- return (EReference)unaryOperationEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
public ExpressionFactory getExpressionFactory() {
return (ExpressionFactory)getEFactoryInstance();
}
@@ -873,10 +838,6 @@ public class ExpressionPackageImpl extends EPackageImpl implements ExpressionPac
createEReference(binaryOperationEClass, BINARY_OPERATION__LEFT);
createEReference(binaryOperationEClass, BINARY_OPERATION__RIGHT);
createEReference(binaryOperationEClass, BINARY_OPERATION__OPERATOR);
-
- unaryOperationEClass = createEClass(UNARY_OPERATION);
- createEReference(unaryOperationEClass, UNARY_OPERATION__OPERATOR);
- createEReference(unaryOperationEClass, UNARY_OPERATION__OPERAND);
}
/**
@@ -932,7 +893,6 @@ public class ExpressionPackageImpl extends EPackageImpl implements ExpressionPac
switchExpressionEClass.getESuperTypes().add(this.getAbstractExpression());
caseEClass.getESuperTypes().add(theXpand3Package.getSyntaxElement());
binaryOperationEClass.getESuperTypes().add(this.getAbstractExpression());
- unaryOperationEClass.getESuperTypes().add(this.getAbstractExpression());
// Initialize classes and features; add operations and parameters
initEClass(abstractExpressionEClass, AbstractExpression.class, "AbstractExpression", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -1006,10 +966,6 @@ public class ExpressionPackageImpl extends EPackageImpl implements ExpressionPac
initEReference(getBinaryOperation_Left(), this.getAbstractExpression(), null, "left", null, 0, 1, BinaryOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getBinaryOperation_Right(), this.getAbstractExpression(), null, "right", null, 0, 1, BinaryOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getBinaryOperation_Operator(), theXpand3Package.getIdentifier(), null, "operator", null, 0, 1, BinaryOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(unaryOperationEClass, UnaryOperation.class, "UnaryOperation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getUnaryOperation_Operator(), theXpand3Package.getIdentifier(), null, "operator", null, 0, 1, UnaryOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getUnaryOperation_Operand(), this.getAbstractExpression(), null, "operand", null, 0, 1, UnaryOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
}
} //ExpressionPackageImpl
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/UnaryOperationImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/UnaryOperationImpl.java
deleted file mode 100644
index bb6c65b..0000000
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/impl/UnaryOperationImpl.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: UnaryOperationImpl.java,v 1.1 2008/03/12 09:54:29 jkohnlein Exp $
- */
-package org.eclipse.xpand3.expression.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;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-import org.eclipse.xpand3.Identifier;
-
-import org.eclipse.xpand3.expression.AbstractExpression;
-import org.eclipse.xpand3.expression.ExpressionPackage;
-import org.eclipse.xpand3.expression.UnaryOperation;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Unary Operation</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.xpand3.expression.impl.UnaryOperationImpl#getOperator <em>Operator</em>}</li>
- * <li>{@link org.eclipse.xpand3.expression.impl.UnaryOperationImpl#getOperand <em>Operand</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class UnaryOperationImpl extends AbstractExpressionImpl implements UnaryOperation {
- /**
- * The cached value of the '{@link #getOperator() <em>Operator</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOperator()
- * @generated
- * @ordered
- */
- protected Identifier operator;
-
- /**
- * The cached value of the '{@link #getOperand() <em>Operand</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getOperand()
- * @generated
- * @ordered
- */
- protected AbstractExpression operand;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected UnaryOperationImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return ExpressionPackage.Literals.UNARY_OPERATION;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Identifier getOperator() {
- return operator;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetOperator(Identifier newOperator, NotificationChain msgs) {
- Identifier oldOperator = operator;
- operator = newOperator;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ExpressionPackage.UNARY_OPERATION__OPERATOR, oldOperator, newOperator);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setOperator(Identifier newOperator) {
- if (newOperator != operator) {
- NotificationChain msgs = null;
- if (operator != null)
- msgs = ((InternalEObject)operator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ExpressionPackage.UNARY_OPERATION__OPERATOR, null, msgs);
- if (newOperator != null)
- msgs = ((InternalEObject)newOperator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ExpressionPackage.UNARY_OPERATION__OPERATOR, null, msgs);
- msgs = basicSetOperator(newOperator, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ExpressionPackage.UNARY_OPERATION__OPERATOR, newOperator, newOperator));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AbstractExpression getOperand() {
- if (operand != null && operand.eIsProxy()) {
- InternalEObject oldOperand = (InternalEObject)operand;
- operand = (AbstractExpression)eResolveProxy(oldOperand);
- if (operand != oldOperand) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, ExpressionPackage.UNARY_OPERATION__OPERAND, oldOperand, operand));
- }
- }
- return operand;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AbstractExpression basicGetOperand() {
- return operand;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setOperand(AbstractExpression newOperand) {
- AbstractExpression oldOperand = operand;
- operand = newOperand;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ExpressionPackage.UNARY_OPERATION__OPERAND, oldOperand, operand));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case ExpressionPackage.UNARY_OPERATION__OPERATOR:
- return basicSetOperator(null, 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 ExpressionPackage.UNARY_OPERATION__OPERATOR:
- return getOperator();
- case ExpressionPackage.UNARY_OPERATION__OPERAND:
- if (resolve) return getOperand();
- return basicGetOperand();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case ExpressionPackage.UNARY_OPERATION__OPERATOR:
- setOperator((Identifier)newValue);
- return;
- case ExpressionPackage.UNARY_OPERATION__OPERAND:
- setOperand((AbstractExpression)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case ExpressionPackage.UNARY_OPERATION__OPERATOR:
- setOperator((Identifier)null);
- return;
- case ExpressionPackage.UNARY_OPERATION__OPERAND:
- setOperand((AbstractExpression)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case ExpressionPackage.UNARY_OPERATION__OPERATOR:
- return operator != null;
- case ExpressionPackage.UNARY_OPERATION__OPERAND:
- return operand != null;
- }
- return super.eIsSet(featureID);
- }
-
-} //UnaryOperationImpl
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/util/ExpressionAdapterFactory.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/util/ExpressionAdapterFactory.java
index e977e15..2a104af 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/util/ExpressionAdapterFactory.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/util/ExpressionAdapterFactory.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: ExpressionAdapterFactory.java,v 1.4 2008/03/12 09:54:30 jkohnlein Exp $
+ * $Id: ExpressionAdapterFactory.java,v 1.5 2008/03/13 11:41:50 sefftinge Exp $
*/
package org.eclipse.xpand3.expression.util;
@@ -162,10 +162,6 @@ public class ExpressionAdapterFactory extends AdapterFactoryImpl {
return createBinaryOperationAdapter();
}
@Override
- public Adapter caseUnaryOperation(UnaryOperation object) {
- return createUnaryOperationAdapter();
- }
- @Override
public Adapter caseSyntaxElement(SyntaxElement object) {
return createSyntaxElementAdapter();
}
@@ -498,20 +494,6 @@ public class ExpressionAdapterFactory extends AdapterFactoryImpl {
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.xpand3.expression.UnaryOperation <em>Unary Operation</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.expression.UnaryOperation
- * @generated
- */
- public Adapter createUnaryOperationAdapter() {
- return null;
- }
-
- /**
* Creates a new adapter for an object of class '{@link org.eclipse.xpand3.SyntaxElement <em>Syntax Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/util/ExpressionSwitch.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/util/ExpressionSwitch.java
index 67dc267..970253a 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/util/ExpressionSwitch.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/expression/util/ExpressionSwitch.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: ExpressionSwitch.java,v 1.4 2008/03/12 09:54:30 jkohnlein Exp $
+ * $Id: ExpressionSwitch.java,v 1.5 2008/03/13 11:41:50 sefftinge Exp $
*/
package org.eclipse.xpand3.expression.util;
@@ -272,14 +272,6 @@ public class ExpressionSwitch<T> {
if (result == null) result = defaultCase(theEObject);
return result;
}
- case ExpressionPackage.UNARY_OPERATION: {
- UnaryOperation unaryOperation = (UnaryOperation)theEObject;
- T result = caseUnaryOperation(unaryOperation);
- if (result == null) result = caseAbstractExpression(unaryOperation);
- if (result == null) result = caseSyntaxElement(unaryOperation);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
default: return defaultCase(theEObject);
}
}
@@ -615,21 +607,6 @@ public class ExpressionSwitch<T> {
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Unary Operation</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>Unary Operation</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseUnaryOperation(UnaryOperation object) {
- return null;
- }
-
- /**
* Returns the result of interpreting the object as an instance of '<em>Syntax Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/FileStatement.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/FileStatement.java
index 5e2c98e..cc3ad6d 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/FileStatement.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/FileStatement.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: FileStatement.java,v 1.3 2008/03/12 09:54:29 jkohnlein Exp $
+ * $Id: FileStatement.java,v 1.4 2008/03/13 11:41:50 sefftinge Exp $
*/
package org.eclipse.xpand3.statement;
@@ -20,7 +20,6 @@ import org.eclipse.xpand3.expression.AbstractExpression;
* <ul>
* <li>{@link org.eclipse.xpand3.statement.FileStatement#getFileNameExpression <em>File Name Expression</em>}</li>
* <li>{@link org.eclipse.xpand3.statement.FileStatement#getOutletNameIdentifier <em>Outlet Name Identifier</em>}</li>
- * <li>{@link org.eclipse.xpand3.statement.FileStatement#isOnce <em>Once</em>}</li>
* </ul>
* </p>
*
@@ -81,30 +80,4 @@ public interface FileStatement extends AbstractStatementWithBody {
*/
void setOutletNameIdentifier(Identifier value);
- /**
- * Returns the value of the '<em><b>Once</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Once</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Once</em>' attribute.
- * @see #setOnce(boolean)
- * @see org.eclipse.xpand3.statement.StatementPackage#getFileStatement_Once()
- * @model
- * @generated
- */
- boolean isOnce();
-
- /**
- * Sets the value of the '{@link org.eclipse.xpand3.statement.FileStatement#isOnce <em>Once</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Once</em>' attribute.
- * @see #isOnce()
- * @generated
- */
- void setOnce(boolean value);
-
} // FileStatement
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/ForEachStatement.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/ForEachStatement.java
index a7b4791..492ed66 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/ForEachStatement.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/ForEachStatement.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: ForEachStatement.java,v 1.3 2008/03/12 09:54:29 jkohnlein Exp $
+ * $Id: ForEachStatement.java,v 1.4 2008/03/13 11:41:50 sefftinge Exp $
*/
package org.eclipse.xpand3.statement;
@@ -19,7 +19,7 @@ import org.eclipse.xpand3.expression.AbstractExpression;
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.xpand3.statement.ForEachStatement#getTarget <em>Target</em>}</li>
- * <li>{@link org.eclipse.xpand3.statement.ForEachStatement#getSeparator <em>Separator</em>}</li>
+ * <li>{@link org.eclipse.xpand3.statement.ForEachStatement#getSeperator <em>Seperator</em>}</li>
* <li>{@link org.eclipse.xpand3.statement.ForEachStatement#getVariable <em>Variable</em>}</li>
* <li>{@link org.eclipse.xpand3.statement.ForEachStatement#getIteratorName <em>Iterator Name</em>}</li>
* </ul>
@@ -57,30 +57,30 @@ public interface ForEachStatement extends AbstractStatementWithBody {
void setTarget(AbstractExpression value);
/**
- * Returns the value of the '<em><b>Separator</b></em>' containment reference.
+ * Returns the value of the '<em><b>Seperator</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Separator</em>' containment reference isn't clear,
+ * If the meaning of the '<em>Seperator</em>' containment reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Separator</em>' containment reference.
- * @see #setSeparator(AbstractExpression)
- * @see org.eclipse.xpand3.statement.StatementPackage#getForEachStatement_Separator()
+ * @return the value of the '<em>Seperator</em>' containment reference.
+ * @see #setSeperator(AbstractExpression)
+ * @see org.eclipse.xpand3.statement.StatementPackage#getForEachStatement_Seperator()
* @model containment="true"
* @generated
*/
- AbstractExpression getSeparator();
+ AbstractExpression getSeperator();
/**
- * Sets the value of the '{@link org.eclipse.xpand3.statement.ForEachStatement#getSeparator <em>Separator</em>}' containment reference.
+ * Sets the value of the '{@link org.eclipse.xpand3.statement.ForEachStatement#getSeperator <em>Seperator</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Separator</em>' containment reference.
- * @see #getSeparator()
+ * @param value the new value of the '<em>Seperator</em>' containment reference.
+ * @see #getSeperator()
* @generated
*/
- void setSeparator(AbstractExpression value);
+ void setSeperator(AbstractExpression value);
/**
* Returns the value of the '<em><b>Variable</b></em>' containment reference.
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/IfStatement.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/IfStatement.java
index e97c94a..69c3dee 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/IfStatement.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/IfStatement.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: IfStatement.java,v 1.3 2008/03/12 09:54:29 jkohnlein Exp $
+ * $Id: IfStatement.java,v 1.4 2008/03/13 11:41:50 sefftinge Exp $
*/
package org.eclipse.xpand3.statement;
@@ -17,6 +17,7 @@ import org.eclipse.xpand3.expression.AbstractExpression;
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.xpand3.statement.IfStatement#getCondition <em>Condition</em>}</li>
+ * <li>{@link org.eclipse.xpand3.statement.IfStatement#getUpperIf <em>Upper If</em>}</li>
* <li>{@link org.eclipse.xpand3.statement.IfStatement#getElseIf <em>Else If</em>}</li>
* </ul>
* </p>
@@ -53,6 +54,32 @@ public interface IfStatement extends AbstractStatementWithBody {
void setCondition(AbstractExpression value);
/**
+ * Returns the value of the '<em><b>Upper If</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Upper If</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Upper If</em>' reference.
+ * @see #setUpperIf(IfStatement)
+ * @see org.eclipse.xpand3.statement.StatementPackage#getIfStatement_UpperIf()
+ * @model
+ * @generated
+ */
+ IfStatement getUpperIf();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.xpand3.statement.IfStatement#getUpperIf <em>Upper If</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Upper If</em>' reference.
+ * @see #getUpperIf()
+ * @generated
+ */
+ void setUpperIf(IfStatement value);
+
+ /**
* Returns the value of the '<em><b>Else If</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/StatementPackage.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/StatementPackage.java
index ad18608..59a9c00 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/StatementPackage.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/StatementPackage.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: StatementPackage.java,v 1.3 2008/03/12 09:54:29 jkohnlein Exp $
+ * $Id: StatementPackage.java,v 1.4 2008/03/13 11:41:50 sefftinge Exp $
*/
package org.eclipse.xpand3.statement;
@@ -482,22 +482,13 @@ public interface StatementPackage extends EPackage {
int FILE_STATEMENT__OUTLET_NAME_IDENTIFIER = ABSTRACT_STATEMENT_WITH_BODY_FEATURE_COUNT + 1;
/**
- * The feature id for the '<em><b>Once</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int FILE_STATEMENT__ONCE = ABSTRACT_STATEMENT_WITH_BODY_FEATURE_COUNT + 2;
-
- /**
* The number of structural features of the '<em>File Statement</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int FILE_STATEMENT_FEATURE_COUNT = ABSTRACT_STATEMENT_WITH_BODY_FEATURE_COUNT + 3;
+ int FILE_STATEMENT_FEATURE_COUNT = ABSTRACT_STATEMENT_WITH_BODY_FEATURE_COUNT + 2;
/**
* The meta object id for the '{@link org.eclipse.xpand3.statement.impl.ForEachStatementImpl <em>For Each Statement</em>}' class.
@@ -564,13 +555,13 @@ public interface StatementPackage extends EPackage {
int FOR_EACH_STATEMENT__TARGET = ABSTRACT_STATEMENT_WITH_BODY_FEATURE_COUNT + 0;
/**
- * The feature id for the '<em><b>Separator</b></em>' containment reference.
+ * The feature id for the '<em><b>Seperator</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int FOR_EACH_STATEMENT__SEPARATOR = ABSTRACT_STATEMENT_WITH_BODY_FEATURE_COUNT + 1;
+ int FOR_EACH_STATEMENT__SEPERATOR = ABSTRACT_STATEMENT_WITH_BODY_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Variable</b></em>' containment reference.
@@ -664,13 +655,22 @@ public interface StatementPackage extends EPackage {
int IF_STATEMENT__CONDITION = ABSTRACT_STATEMENT_WITH_BODY_FEATURE_COUNT + 0;
/**
+ * The feature id for the '<em><b>Upper If</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IF_STATEMENT__UPPER_IF = ABSTRACT_STATEMENT_WITH_BODY_FEATURE_COUNT + 1;
+
+ /**
* The feature id for the '<em><b>Else If</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int IF_STATEMENT__ELSE_IF = ABSTRACT_STATEMENT_WITH_BODY_FEATURE_COUNT + 1;
+ int IF_STATEMENT__ELSE_IF = ABSTRACT_STATEMENT_WITH_BODY_FEATURE_COUNT + 2;
/**
* The number of structural features of the '<em>If Statement</em>' class.
@@ -679,7 +679,7 @@ public interface StatementPackage extends EPackage {
* @generated
* @ordered
*/
- int IF_STATEMENT_FEATURE_COUNT = ABSTRACT_STATEMENT_WITH_BODY_FEATURE_COUNT + 2;
+ int IF_STATEMENT_FEATURE_COUNT = ABSTRACT_STATEMENT_WITH_BODY_FEATURE_COUNT + 3;
/**
* The meta object id for the '{@link org.eclipse.xpand3.statement.impl.LetStatementImpl <em>Let Statement</em>}' class.
@@ -1108,17 +1108,6 @@ public interface StatementPackage extends EPackage {
EReference getFileStatement_OutletNameIdentifier();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.xpand3.statement.FileStatement#isOnce <em>Once</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Once</em>'.
- * @see org.eclipse.xpand3.statement.FileStatement#isOnce()
- * @see #getFileStatement()
- * @generated
- */
- EAttribute getFileStatement_Once();
-
- /**
* Returns the meta object for class '{@link org.eclipse.xpand3.statement.ForEachStatement <em>For Each Statement</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1140,15 +1129,15 @@ public interface StatementPackage extends EPackage {
EReference getForEachStatement_Target();
/**
- * Returns the meta object for the containment reference '{@link org.eclipse.xpand3.statement.ForEachStatement#getSeparator <em>Separator</em>}'.
+ * Returns the meta object for the containment reference '{@link org.eclipse.xpand3.statement.ForEachStatement#getSeperator <em>Seperator</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Separator</em>'.
- * @see org.eclipse.xpand3.statement.ForEachStatement#getSeparator()
+ * @return the meta object for the containment reference '<em>Seperator</em>'.
+ * @see org.eclipse.xpand3.statement.ForEachStatement#getSeperator()
* @see #getForEachStatement()
* @generated
*/
- EReference getForEachStatement_Separator();
+ EReference getForEachStatement_Seperator();
/**
* Returns the meta object for the containment reference '{@link org.eclipse.xpand3.statement.ForEachStatement#getVariable <em>Variable</em>}'.
@@ -1194,6 +1183,17 @@ public interface StatementPackage extends EPackage {
EReference getIfStatement_Condition();
/**
+ * Returns the meta object for the reference '{@link org.eclipse.xpand3.statement.IfStatement#getUpperIf <em>Upper If</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Upper If</em>'.
+ * @see org.eclipse.xpand3.statement.IfStatement#getUpperIf()
+ * @see #getIfStatement()
+ * @generated
+ */
+ EReference getIfStatement_UpperIf();
+
+ /**
* Returns the meta object for the containment reference '{@link org.eclipse.xpand3.statement.IfStatement#getElseIf <em>Else If</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1485,14 +1485,6 @@ public interface StatementPackage extends EPackage {
EReference FILE_STATEMENT__OUTLET_NAME_IDENTIFIER = eINSTANCE.getFileStatement_OutletNameIdentifier();
/**
- * The meta object literal for the '<em><b>Once</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute FILE_STATEMENT__ONCE = eINSTANCE.getFileStatement_Once();
-
- /**
* The meta object literal for the '{@link org.eclipse.xpand3.statement.impl.ForEachStatementImpl <em>For Each Statement</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1511,12 +1503,12 @@ public interface StatementPackage extends EPackage {
EReference FOR_EACH_STATEMENT__TARGET = eINSTANCE.getForEachStatement_Target();
/**
- * The meta object literal for the '<em><b>Separator</b></em>' containment reference feature.
+ * The meta object literal for the '<em><b>Seperator</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- EReference FOR_EACH_STATEMENT__SEPARATOR = eINSTANCE.getForEachStatement_Separator();
+ EReference FOR_EACH_STATEMENT__SEPERATOR = eINSTANCE.getForEachStatement_Seperator();
/**
* The meta object literal for the '<em><b>Variable</b></em>' containment reference feature.
@@ -1553,6 +1545,14 @@ public interface StatementPackage extends EPackage {
EReference IF_STATEMENT__CONDITION = eINSTANCE.getIfStatement_Condition();
/**
+ * The meta object literal for the '<em><b>Upper If</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference IF_STATEMENT__UPPER_IF = eINSTANCE.getIfStatement_UpperIf();
+
+ /**
* The meta object literal for the '<em><b>Else If</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/FileStatementImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/FileStatementImpl.java
index 0893234..2575458 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/FileStatementImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/FileStatementImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: FileStatementImpl.java,v 1.3 2008/03/12 09:54:30 jkohnlein Exp $
+ * $Id: FileStatementImpl.java,v 1.4 2008/03/13 11:41:50 sefftinge Exp $
*/
package org.eclipse.xpand3.statement.impl;
@@ -30,7 +30,6 @@ import org.eclipse.xpand3.statement.StatementPackage;
* <ul>
* <li>{@link org.eclipse.xpand3.statement.impl.FileStatementImpl#getFileNameExpression <em>File Name Expression</em>}</li>
* <li>{@link org.eclipse.xpand3.statement.impl.FileStatementImpl#getOutletNameIdentifier <em>Outlet Name Identifier</em>}</li>
- * <li>{@link org.eclipse.xpand3.statement.impl.FileStatementImpl#isOnce <em>Once</em>}</li>
* </ul>
* </p>
*
@@ -58,26 +57,6 @@ public class FileStatementImpl extends AbstractStatementWithBodyImpl implements
protected Identifier outletNameIdentifier;
/**
- * The default value of the '{@link #isOnce() <em>Once</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isOnce()
- * @generated
- * @ordered
- */
- protected static final boolean ONCE_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isOnce() <em>Once</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isOnce()
- * @generated
- * @ordered
- */
- protected boolean once = ONCE_EDEFAULT;
-
- /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -187,27 +166,6 @@ public class FileStatementImpl extends AbstractStatementWithBodyImpl implements
* <!-- end-user-doc -->
* @generated
*/
- public boolean isOnce() {
- return once;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setOnce(boolean newOnce) {
- boolean oldOnce = once;
- once = newOnce;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, StatementPackage.FILE_STATEMENT__ONCE, oldOnce, once));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
@@ -231,8 +189,6 @@ public class FileStatementImpl extends AbstractStatementWithBodyImpl implements
return getFileNameExpression();
case StatementPackage.FILE_STATEMENT__OUTLET_NAME_IDENTIFIER:
return getOutletNameIdentifier();
- case StatementPackage.FILE_STATEMENT__ONCE:
- return isOnce() ? Boolean.TRUE : Boolean.FALSE;
}
return super.eGet(featureID, resolve, coreType);
}
@@ -251,9 +207,6 @@ public class FileStatementImpl extends AbstractStatementWithBodyImpl implements
case StatementPackage.FILE_STATEMENT__OUTLET_NAME_IDENTIFIER:
setOutletNameIdentifier((Identifier)newValue);
return;
- case StatementPackage.FILE_STATEMENT__ONCE:
- setOnce(((Boolean)newValue).booleanValue());
- return;
}
super.eSet(featureID, newValue);
}
@@ -272,9 +225,6 @@ public class FileStatementImpl extends AbstractStatementWithBodyImpl implements
case StatementPackage.FILE_STATEMENT__OUTLET_NAME_IDENTIFIER:
setOutletNameIdentifier((Identifier)null);
return;
- case StatementPackage.FILE_STATEMENT__ONCE:
- setOnce(ONCE_EDEFAULT);
- return;
}
super.eUnset(featureID);
}
@@ -291,26 +241,8 @@ public class FileStatementImpl extends AbstractStatementWithBodyImpl implements
return fileNameExpression != null;
case StatementPackage.FILE_STATEMENT__OUTLET_NAME_IDENTIFIER:
return outletNameIdentifier != null;
- case StatementPackage.FILE_STATEMENT__ONCE:
- return once != ONCE_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(" (once: ");
- result.append(once);
- result.append(')');
- return result.toString();
- }
-
} //FileStatementImpl
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/ForEachStatementImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/ForEachStatementImpl.java
index 3f352f4..ce15321 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/ForEachStatementImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/ForEachStatementImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: ForEachStatementImpl.java,v 1.3 2008/03/12 09:54:30 jkohnlein Exp $
+ * $Id: ForEachStatementImpl.java,v 1.4 2008/03/13 11:41:50 sefftinge Exp $
*/
package org.eclipse.xpand3.statement.impl;
@@ -29,7 +29,7 @@ import org.eclipse.xpand3.statement.StatementPackage;
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.xpand3.statement.impl.ForEachStatementImpl#getTarget <em>Target</em>}</li>
- * <li>{@link org.eclipse.xpand3.statement.impl.ForEachStatementImpl#getSeparator <em>Separator</em>}</li>
+ * <li>{@link org.eclipse.xpand3.statement.impl.ForEachStatementImpl#getSeperator <em>Seperator</em>}</li>
* <li>{@link org.eclipse.xpand3.statement.impl.ForEachStatementImpl#getVariable <em>Variable</em>}</li>
* <li>{@link org.eclipse.xpand3.statement.impl.ForEachStatementImpl#getIteratorName <em>Iterator Name</em>}</li>
* </ul>
@@ -49,14 +49,14 @@ public class ForEachStatementImpl extends AbstractStatementWithBodyImpl implemen
protected AbstractExpression target;
/**
- * The cached value of the '{@link #getSeparator() <em>Separator</em>}' containment reference.
+ * The cached value of the '{@link #getSeperator() <em>Seperator</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see #getSeparator()
+ * @see #getSeperator()
* @generated
* @ordered
*/
- protected AbstractExpression separator;
+ protected AbstractExpression seperator;
/**
* The cached value of the '{@link #getVariable() <em>Variable</em>}' containment reference.
@@ -145,8 +145,8 @@ public class ForEachStatementImpl extends AbstractStatementWithBodyImpl implemen
* <!-- end-user-doc -->
* @generated
*/
- public AbstractExpression getSeparator() {
- return separator;
+ public AbstractExpression getSeperator() {
+ return seperator;
}
/**
@@ -154,11 +154,11 @@ public class ForEachStatementImpl extends AbstractStatementWithBodyImpl implemen
* <!-- end-user-doc -->
* @generated
*/
- public NotificationChain basicSetSeparator(AbstractExpression newSeparator, NotificationChain msgs) {
- AbstractExpression oldSeparator = separator;
- separator = newSeparator;
+ public NotificationChain basicSetSeperator(AbstractExpression newSeperator, NotificationChain msgs) {
+ AbstractExpression oldSeperator = seperator;
+ seperator = newSeperator;
if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, StatementPackage.FOR_EACH_STATEMENT__SEPARATOR, oldSeparator, newSeparator);
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, StatementPackage.FOR_EACH_STATEMENT__SEPERATOR, oldSeperator, newSeperator);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
@@ -169,18 +169,18 @@ public class ForEachStatementImpl extends AbstractStatementWithBodyImpl implemen
* <!-- end-user-doc -->
* @generated
*/
- public void setSeparator(AbstractExpression newSeparator) {
- if (newSeparator != separator) {
+ public void setSeperator(AbstractExpression newSeperator) {
+ if (newSeperator != seperator) {
NotificationChain msgs = null;
- if (separator != null)
- msgs = ((InternalEObject)separator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - StatementPackage.FOR_EACH_STATEMENT__SEPARATOR, null, msgs);
- if (newSeparator != null)
- msgs = ((InternalEObject)newSeparator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - StatementPackage.FOR_EACH_STATEMENT__SEPARATOR, null, msgs);
- msgs = basicSetSeparator(newSeparator, msgs);
+ if (seperator != null)
+ msgs = ((InternalEObject)seperator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - StatementPackage.FOR_EACH_STATEMENT__SEPERATOR, null, msgs);
+ if (newSeperator != null)
+ msgs = ((InternalEObject)newSeperator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - StatementPackage.FOR_EACH_STATEMENT__SEPERATOR, null, msgs);
+ msgs = basicSetSeperator(newSeperator, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, StatementPackage.FOR_EACH_STATEMENT__SEPARATOR, newSeparator, newSeparator));
+ eNotify(new ENotificationImpl(this, Notification.SET, StatementPackage.FOR_EACH_STATEMENT__SEPERATOR, newSeperator, newSeperator));
}
/**
@@ -279,8 +279,8 @@ public class ForEachStatementImpl extends AbstractStatementWithBodyImpl implemen
switch (featureID) {
case StatementPackage.FOR_EACH_STATEMENT__TARGET:
return basicSetTarget(null, msgs);
- case StatementPackage.FOR_EACH_STATEMENT__SEPARATOR:
- return basicSetSeparator(null, msgs);
+ case StatementPackage.FOR_EACH_STATEMENT__SEPERATOR:
+ return basicSetSeperator(null, msgs);
case StatementPackage.FOR_EACH_STATEMENT__VARIABLE:
return basicSetVariable(null, msgs);
case StatementPackage.FOR_EACH_STATEMENT__ITERATOR_NAME:
@@ -299,8 +299,8 @@ public class ForEachStatementImpl extends AbstractStatementWithBodyImpl implemen
switch (featureID) {
case StatementPackage.FOR_EACH_STATEMENT__TARGET:
return getTarget();
- case StatementPackage.FOR_EACH_STATEMENT__SEPARATOR:
- return getSeparator();
+ case StatementPackage.FOR_EACH_STATEMENT__SEPERATOR:
+ return getSeperator();
case StatementPackage.FOR_EACH_STATEMENT__VARIABLE:
return getVariable();
case StatementPackage.FOR_EACH_STATEMENT__ITERATOR_NAME:
@@ -320,8 +320,8 @@ public class ForEachStatementImpl extends AbstractStatementWithBodyImpl implemen
case StatementPackage.FOR_EACH_STATEMENT__TARGET:
setTarget((AbstractExpression)newValue);
return;
- case StatementPackage.FOR_EACH_STATEMENT__SEPARATOR:
- setSeparator((AbstractExpression)newValue);
+ case StatementPackage.FOR_EACH_STATEMENT__SEPERATOR:
+ setSeperator((AbstractExpression)newValue);
return;
case StatementPackage.FOR_EACH_STATEMENT__VARIABLE:
setVariable((Identifier)newValue);
@@ -344,8 +344,8 @@ public class ForEachStatementImpl extends AbstractStatementWithBodyImpl implemen
case StatementPackage.FOR_EACH_STATEMENT__TARGET:
setTarget((AbstractExpression)null);
return;
- case StatementPackage.FOR_EACH_STATEMENT__SEPARATOR:
- setSeparator((AbstractExpression)null);
+ case StatementPackage.FOR_EACH_STATEMENT__SEPERATOR:
+ setSeperator((AbstractExpression)null);
return;
case StatementPackage.FOR_EACH_STATEMENT__VARIABLE:
setVariable((Identifier)null);
@@ -367,8 +367,8 @@ public class ForEachStatementImpl extends AbstractStatementWithBodyImpl implemen
switch (featureID) {
case StatementPackage.FOR_EACH_STATEMENT__TARGET:
return target != null;
- case StatementPackage.FOR_EACH_STATEMENT__SEPARATOR:
- return separator != null;
+ case StatementPackage.FOR_EACH_STATEMENT__SEPERATOR:
+ return seperator != null;
case StatementPackage.FOR_EACH_STATEMENT__VARIABLE:
return variable != null;
case StatementPackage.FOR_EACH_STATEMENT__ITERATOR_NAME:
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/IfStatementImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/IfStatementImpl.java
index 18df768..f1c914e 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/IfStatementImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/IfStatementImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: IfStatementImpl.java,v 1.3 2008/03/12 09:54:30 jkohnlein Exp $
+ * $Id: IfStatementImpl.java,v 1.4 2008/03/13 11:41:50 sefftinge Exp $
*/
package org.eclipse.xpand3.statement.impl;
@@ -27,6 +27,7 @@ import org.eclipse.xpand3.statement.StatementPackage;
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.xpand3.statement.impl.IfStatementImpl#getCondition <em>Condition</em>}</li>
+ * <li>{@link org.eclipse.xpand3.statement.impl.IfStatementImpl#getUpperIf <em>Upper If</em>}</li>
* <li>{@link org.eclipse.xpand3.statement.impl.IfStatementImpl#getElseIf <em>Else If</em>}</li>
* </ul>
* </p>
@@ -45,6 +46,16 @@ public class IfStatementImpl extends AbstractStatementWithBodyImpl implements If
protected AbstractExpression condition;
/**
+ * The cached value of the '{@link #getUpperIf() <em>Upper If</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUpperIf()
+ * @generated
+ * @ordered
+ */
+ protected IfStatement upperIf;
+
+ /**
* The cached value of the '{@link #getElseIf() <em>Else If</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -121,6 +132,44 @@ public class IfStatementImpl extends AbstractStatementWithBodyImpl implements If
* <!-- end-user-doc -->
* @generated
*/
+ public IfStatement getUpperIf() {
+ if (upperIf != null && upperIf.eIsProxy()) {
+ InternalEObject oldUpperIf = (InternalEObject)upperIf;
+ upperIf = (IfStatement)eResolveProxy(oldUpperIf);
+ if (upperIf != oldUpperIf) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, StatementPackage.IF_STATEMENT__UPPER_IF, oldUpperIf, upperIf));
+ }
+ }
+ return upperIf;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IfStatement basicGetUpperIf() {
+ return upperIf;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setUpperIf(IfStatement newUpperIf) {
+ IfStatement oldUpperIf = upperIf;
+ upperIf = newUpperIf;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StatementPackage.IF_STATEMENT__UPPER_IF, oldUpperIf, upperIf));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public IfStatement getElseIf() {
return elseIf;
}
@@ -185,6 +234,9 @@ public class IfStatementImpl extends AbstractStatementWithBodyImpl implements If
switch (featureID) {
case StatementPackage.IF_STATEMENT__CONDITION:
return getCondition();
+ case StatementPackage.IF_STATEMENT__UPPER_IF:
+ if (resolve) return getUpperIf();
+ return basicGetUpperIf();
case StatementPackage.IF_STATEMENT__ELSE_IF:
return getElseIf();
}
@@ -202,6 +254,9 @@ public class IfStatementImpl extends AbstractStatementWithBodyImpl implements If
case StatementPackage.IF_STATEMENT__CONDITION:
setCondition((AbstractExpression)newValue);
return;
+ case StatementPackage.IF_STATEMENT__UPPER_IF:
+ setUpperIf((IfStatement)newValue);
+ return;
case StatementPackage.IF_STATEMENT__ELSE_IF:
setElseIf((IfStatement)newValue);
return;
@@ -220,6 +275,9 @@ public class IfStatementImpl extends AbstractStatementWithBodyImpl implements If
case StatementPackage.IF_STATEMENT__CONDITION:
setCondition((AbstractExpression)null);
return;
+ case StatementPackage.IF_STATEMENT__UPPER_IF:
+ setUpperIf((IfStatement)null);
+ return;
case StatementPackage.IF_STATEMENT__ELSE_IF:
setElseIf((IfStatement)null);
return;
@@ -237,6 +295,8 @@ public class IfStatementImpl extends AbstractStatementWithBodyImpl implements If
switch (featureID) {
case StatementPackage.IF_STATEMENT__CONDITION:
return condition != null;
+ case StatementPackage.IF_STATEMENT__UPPER_IF:
+ return upperIf != null;
case StatementPackage.IF_STATEMENT__ELSE_IF:
return elseIf != null;
}
diff --git a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/StatementPackageImpl.java b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/StatementPackageImpl.java
index 6cdb993..870d59e 100644
--- a/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/StatementPackageImpl.java
+++ b/plugins/org.eclipse.xpand3/emf-gen/org/eclipse/xpand3/statement/impl/StatementPackageImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: StatementPackageImpl.java,v 1.3 2008/03/12 09:54:30 jkohnlein Exp $
+ * $Id: StatementPackageImpl.java,v 1.4 2008/03/13 11:41:50 sefftinge Exp $
*/
package org.eclipse.xpand3.statement.impl;
@@ -351,15 +351,6 @@ public class StatementPackageImpl extends EPackageImpl implements StatementPacka
* <!-- end-user-doc -->
* @generated
*/
- public EAttribute getFileStatement_Once() {
- return (EAttribute)fileStatementEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
public EClass getForEachStatement() {
return forEachStatementEClass;
}
@@ -378,7 +369,7 @@ public class StatementPackageImpl extends EPackageImpl implements StatementPacka
* <!-- end-user-doc -->
* @generated
*/
- public EReference getForEachStatement_Separator() {
+ public EReference getForEachStatement_Seperator() {
return (EReference)forEachStatementEClass.getEStructuralFeatures().get(1);
}
@@ -423,7 +414,7 @@ public class StatementPackageImpl extends EPackageImpl implements StatementPacka
* <!-- end-user-doc -->
* @generated
*/
- public EReference getIfStatement_ElseIf() {
+ public EReference getIfStatement_UpperIf() {
return (EReference)ifStatementEClass.getEStructuralFeatures().get(1);
}
@@ -432,6 +423,15 @@ public class StatementPackageImpl extends EPackageImpl implements StatementPacka
* <!-- end-user-doc -->
* @generated
*/
+ public EReference getIfStatement_ElseIf() {
+ return (EReference)ifStatementEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getLetStatement() {
return letStatementEClass;
}
@@ -575,16 +575,16 @@ public class StatementPackageImpl extends EPackageImpl implements StatementPacka
fileStatementEClass = createEClass(FILE_STATEMENT);
createEReference(fileStatementEClass, FILE_STATEMENT__FILE_NAME_EXPRESSION);
createEReference(fileStatementEClass, FILE_STATEMENT__OUTLET_NAME_IDENTIFIER);
- createEAttribute(fileStatementEClass, FILE_STATEMENT__ONCE);
forEachStatementEClass = createEClass(FOR_EACH_STATEMENT);
createEReference(forEachStatementEClass, FOR_EACH_STATEMENT__TARGET);
- createEReference(forEachStatementEClass, FOR_EACH_STATEMENT__SEPARATOR);
+ createEReference(forEachStatementEClass, FOR_EACH_STATEMENT__SEPERATOR);
createEReference(forEachStatementEClass, FOR_EACH_STATEMENT__VARIABLE);
createEReference(forEachStatementEClass, FOR_EACH_STATEMENT__ITERATOR_NAME);
ifStatementEClass = createEClass(IF_STATEMENT);
createEReference(ifStatementEClass, IF_STATEMENT__CONDITION);
+ createEReference(ifStatementEClass, IF_STATEMENT__UPPER_IF);
createEReference(ifStatementEClass, IF_STATEMENT__ELSE_IF);
letStatementEClass = createEClass(LET_STATEMENT);
@@ -668,16 +668,16 @@ public class StatementPackageImpl extends EPackageImpl implements StatementPacka
initEClass(fileStatementEClass, FileStatement.class, "FileStatement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getFileStatement_FileNameExpression(), theExpressionPackage.getAbstractExpression(), null, "fileNameExpression", null, 0, 1, FileStatement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getFileStatement_OutletNameIdentifier(), theXpand3Package.getIdentifier(), null, "outletNameIdentifier", null, 0, 1, FileStatement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getFileStatement_Once(), ecorePackage.getEBoolean(), "once", null, 0, 1, FileStatement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(forEachStatementEClass, ForEachStatement.class, "ForEachStatement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getForEachStatement_Target(), theExpressionPackage.getAbstractExpression(), null, "target", null, 0, 1, ForEachStatement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getForEachStatement_Separator(), theExpressionPackage.getAbstractExpression(), null, "separator", null, 0, 1, ForEachStatement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getForEachStatement_Seperator(), theExpressionPackage.getAbstractExpression(), null, "seperator", null, 0, 1, ForEachStatement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getForEachStatement_Variable(), theXpand3Package.getIdentifier(), null, "variable", null, 0, 1, ForEachStatement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getForEachStatement_IteratorName(), theXpand3Package.getIdentifier(), null, "iteratorName", null, 0, 1, ForEachStatement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(ifStatementEClass, IfStatement.class, "IfStatement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getIfStatement_Condition(), theExpressionPackage.getAbstractExpression(), null, "condition", null, 0, 1, IfStatement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getIfStatement_UpperIf(), this.getIfStatement(), null, "upperIf", null, 0, 1, IfStatement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getIfStatement_ElseIf(), this.getIfStatement(), null, "elseIf", null, 0, 1, IfStatement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(letStatementEClass, LetStatement.class, "LetStatement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
diff --git a/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/middlend/XtendFrontendASTConverter.java b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/middlend/XtendFrontendASTConverter.java
new file mode 100644
index 0000000..04f741f
--- /dev/null
+++ b/plugins/org.eclipse.xpand3/src/org/eclipse/xpand3/middlend/XtendFrontendASTConverter.java
@@ -0,0 +1,384 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2002-2007 Kolbware 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:
+ * Kolbware, Bernd Kolb - Initial API and implementation
+ *
+ * </copyright>
+ *
+ */
+package org.eclipse.xpand3.middlend;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.xpand3.Identifier;
+import org.eclipse.xpand3.SyntaxElement;
+import org.eclipse.xpand3.analyzation.AnalyzeContext;
+import org.eclipse.xpand3.analyzation.TypeSystem;
+import org.eclipse.xpand3.analyzation.AnalyzeContext.Var;
+import org.eclipse.xpand3.expression.AbstractExpression;
+import org.eclipse.xpand3.expression.BooleanLiteral;
+import org.eclipse.xpand3.expression.Case;
+import org.eclipse.xpand3.expression.Cast;
+import org.eclipse.xpand3.expression.ChainExpression;
+import org.eclipse.xpand3.expression.CollectionExpression;
+import org.eclipse.xpand3.expression.ConstructorCallExpression;
+import org.eclipse.xpand3.expression.FeatureCall;
+import org.eclipse.xpand3.expression.GlobalVarExpression;
+import org.eclipse.xpand3.expression.IfExpression;
+import org.eclipse.xpand3.expression.IntegerLiteral;
+import org.eclipse.xpand3.expression.LetExpression;
+import org.eclipse.xpand3.expression.ListLiteral;
+import org.eclipse.xpand3.expression.Literal;
+import org.eclipse.xpand3.expression.NullLiteral;
+import org.eclipse.xpand3.expression.OperationCall;
+import org.eclipse.xpand3.expression.RealLiteral;
+import org.eclipse.xpand3.expression.StringLiteral;
+import org.eclipse.xpand3.expression.SwitchExpression;
+import org.eclipse.xpand3.expression.TypeSelectExpression;
+import org.eclipse.xpand3.staticTypesystem.AbstractTypeReference;
+import org.eclipse.xpand3.staticTypesystem.FunctionType;
+import org.eclipse.xpand3.staticTypesystem.Type;
+import org.eclipse.xpand3.util.Xpand3Switch;
+import org.eclipse.xtend.backend.common.ExpressionBase;
+import org.eclipse.xtend.backend.common.SourcePos;
+import org.eclipse.xtend.backend.common.StaticProperty;
+import org.eclipse.xtend.backend.expr.CreateUncachedExpression;
+import org.eclipse.xtend.backend.expr.HidingLocalVarDefExpression;
+import org.eclipse.xtend.backend.expr.InitClosureExpression;
+import org.eclipse.xtend.backend.expr.InvocationOnCollectionExpression;
+import org.eclipse.xtend.backend.expr.InvocationOnObjectExpression;
+import org.eclipse.xtend.backend.expr.InvocationOnWhateverExpression;
+import org.eclipse.xtend.backend.expr.ListLiteralExpression;
+import org.eclipse.xtend.backend.expr.LiteralExpression;
+import org.eclipse.xtend.backend.expr.LocalVarEvalExpression;
+import org.eclipse.xtend.backend.expr.NewLocalVarDefExpression;
+import org.eclipse.xtend.backend.expr.PropertyOnCollectionExpression;
+import org.eclipse.xtend.backend.expr.PropertyOnObjectExpression;
+import org.eclipse.xtend.backend.expr.PropertyOnWhateverExpression;
+import org.eclipse.xtend.backend.expr.SequenceExpression;
+import org.eclipse.xtend.backend.syslib.SysLibNames;
+import org.eclipse.xtend.backend.types.builtin.CollectionType;
+import org.eclipse.xtend.backend.types.builtin.ObjectType;
+import org.eclipse.xtend.backend.util.Pair;
+
+/**
+ * @author Arno Haase
+ * @author Bernd Kolb
+ * @author Sven Efftinge
+ */
+public class XtendFrontendASTConverter extends Xpand3Switch<>{
+
+ private String extensionName;
+ private final BackendTypeConverter typeConverter;
+ private AnalyzeContext ctx;
+ private TypeSystem typeSystem;
+
+ public XtendFrontendASTConverter(AnalyzeContext ctx, BackendTypeConverter typeConverter, String extensionName) {
+ this.ctx = ctx;
+ this.typeConverter = typeConverter;
+ this.extensionName = extensionName;
+ }
+
+
+ public ExpressionBase convert(ConstructorCallExpression expr) {
+ return new CreateUncachedExpression(typeConverter.convertToBackendType(expr.getType()), getSourcePos(expr));
+ }
+
+ public ExpressionBase convert(FeatureCall expr) {
+ final SourcePos sourcePos = getSourcePos(expr);
+
+ if (expr.getTarget() == null) {
+ // 1. check for a static property
+ final StaticProperty staticProp = typeConverter.getEnumLiteral(expr.getName());
+ if (staticProp != null)
+ return new LiteralExpression(staticProp.get(), sourcePos);
+
+ // 2. check for a local variable
+ if (ctx.getVariable(expr.getName().getValue()) != null)
+ return new LocalVarEvalExpression(expr.getName().getValue(), sourcePos);
+
+ // 3. check for a type literal
+ try {
+ return new LiteralExpression(typeConverter.convertToBackendType(expr.getName()), sourcePos);
+ } catch (IllegalArgumentException exc) {
+ } // do nothing - this means
+ // it is not a type literal
+
+ // 4. check for "this"
+ if (ctx.hasThis()) {
+ final ExpressionBase thisExpr = new LocalVarEvalExpression(
+ org.eclipse.xtend.backend.common.SyntaxConstants.THIS, sourcePos);
+ return createPropertyExpression(thisExpr, ctx.getThis(), expr.getName().getValue(), sourcePos);
+ }
+
+ throw new IllegalArgumentException("feature call " + expr.toString() + " does not match any feature: "
+ + sourcePos);
+ } else {
+ // evaluate the target and evaluate the property on the result
+ return createPropertyExpression(convert(expr.getTarget()), analyze(expr.getTarget()), expr.getName()
+ .getValue(), sourcePos);
+ }
+ }
+
+ public ExpressionBase convert(CollectionExpression expr) {
+ final SourcePos sourcePos = getSourcePos(expr);
+
+ final String functionName = expr.getName().getValue();
+
+ final AnalyzeContext oldCtx = ctx;
+ ctx = ctx.cloneWith(new AnalyzeContext.Var(BackendTypeConverter.qualify(expr.getEleName()), null) /*
+ * TODO
+ * ObjectType
+ */);
+ final ExpressionBase bodyExpr = convert(expr.getClosure());
+ ctx = oldCtx;
+
+ final InitClosureExpression closureExpr = new InitClosureExpression(
+ Arrays.asList(expr.getEleName().getValue()), Arrays.asList(ObjectType.INSTANCE), bodyExpr, sourcePos);
+
+ if (expr.getTarget() == null) {
+ if (!ctx.hasThis())
+ throw new IllegalStateException(functionName + " with neither a target nor an implicit 'this'");
+
+ final ExpressionBase thisExpr = new LocalVarEvalExpression(
+ org.eclipse.xtend.backend.common.SyntaxConstants.THIS, sourcePos);
+ return new InvocationOnObjectExpression(functionName, Arrays.asList(thisExpr, closureExpr), true, sourcePos);
+ } else
+ return new InvocationOnObjectExpression(functionName,
+ Arrays.asList(convert(expr.getTarget()), closureExpr), true, sourcePos);
+ }
+
+ public ExpressionBase convert(TypeSelectExpression expr) {
+ final SourcePos sourcePos = getSourcePos(expr);
+
+ final Type t = typeSystem.typeForName(toString(expr.getTypeLiteral()));// TODO
+ // type
+ // args
+ final ExpressionBase typeExpr = new LiteralExpression(typeConverter.convertToBackendType(t), sourcePos);
+
+ if (expr.getTarget() == null) {
+ if (!ctx.hasThis())
+ throw new IllegalStateException("typeSelect with neither a target nor an implicit 'this'");
+
+ final ExpressionBase thisExpr = new LocalVarEvalExpression(
+ org.eclipse.xtend.backend.common.SyntaxConstants.THIS, sourcePos);
+ return new InvocationOnObjectExpression(SysLibNames.TYPE_SELECT, Arrays.asList(thisExpr, typeExpr), true,
+ sourcePos);
+ } else
+ return new InvocationOnObjectExpression(SysLibNames.TYPE_SELECT, Arrays.asList(convert(expr.getTarget()),
+ typeExpr), false, sourcePos);
+ }
+
+ /**
+ * @param typeLiteral
+ * @return
+ */
+ private String toString(Identifier id) {
+ return BackendTypeConverter.qualify(id);
+ }
+
+ public ExpressionBase convert(OperationCall expr) {
+ final SourcePos sourcePos = getSourcePos(expr);
+ final String functionName = transformFunctionName(expr.getName().getValue());
+
+ final List<ExpressionBase> params = new ArrayList<ExpressionBase>();
+ for (AbstractExpression e : expr.getParams())
+ params.add(convert(e));
+
+ final List<AbstractTypeReference> paramTypes = new ArrayList<AbstractTypeReference>();
+ for (AbstractExpression e : expr.getParams())
+ paramTypes.add(analyze(e));
+
+ if (expr.getTarget() == null) {
+ if (ctx.hasThis()) {
+ // if a function matches directly (i.e. without implicitly
+ // passing 'this' as a first parameter), that
+ // has precedence in matching
+ if (hasMatchingOperationCall(functionName, paramTypes.toArray(new AbstractTypeReference[0])))
+ return new InvocationOnObjectExpression(functionName, params, false, sourcePos);
+ else {
+ final ExpressionBase thisExpression = new LocalVarEvalExpression(
+ org.eclipse.xtend.backend.common.SyntaxConstants.THIS, sourcePos);
+ Var thisVar = ctx.getThis();
+ final AbstractTypeReference thisType = thisVar.getValue();
+ return createInvocationOnTargetExpression(functionName, thisExpression, thisType, params,
+ paramTypes, true, sourcePos);
+ }
+ } else
+ return new InvocationOnObjectExpression(functionName, params, false, sourcePos);
+ } else
+ return createInvocationOnTargetExpression(functionName, convert(expr.getTarget()),
+ analyze(expr.getTarget()), params, paramTypes, true, sourcePos);
+ }
+
+ public ExpressionBase convert(GlobalVarExpression expr) {
+ // TODO: To be impl
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+ public ExpressionBase convert(IfExpression expr) {
+ final ExpressionBase elseExpr = (expr.getElsePart() != null) ? convert(expr.getElsePart())
+ : new LiteralExpression(null, getSourcePos(expr));
+
+ return new org.eclipse.xtend.backend.expr.IfExpression(convert(expr.getCondition()),
+ convert(expr.getThenPart()), elseExpr, getSourcePos(expr));
+ }
+
+ public ExpressionBase convert(LetExpression expr) {
+ final ExpressionBase varExpr = convert(expr.getVarExpression());
+ final AbstractTypeReference varType = analyze(expr.getVarExpression());
+
+ final AnalyzeContext oldCtx = ctx;
+ String varName = toString(expr.getVarName());
+ ctx = ctx.cloneWith(new AnalyzeContext.Var(varName, varType));
+
+ try {
+ if (oldCtx.getVariable(varName) != null)
+ return new HidingLocalVarDefExpression(varName, varExpr, convert(expr.getTargetExpression()),
+ getSourcePos(expr));
+ else
+ return new NewLocalVarDefExpression(varName, varExpr, convert(expr.getTargetExpression()),
+ getSourcePos(expr));
+ } finally {
+ ctx = oldCtx;
+ }
+ }
+
+ public ExpressionBase convert(SwitchExpression expr) {
+ final List<Pair<ExpressionBase, ExpressionBase>> cases = new ArrayList<Pair<ExpressionBase, ExpressionBase>>();
+ for (Case c : expr.getCases())
+ cases.add(new Pair<ExpressionBase, ExpressionBase>(convert(c.getCondition()), convert(c.getThenPart())));
+
+ return new org.eclipse.xtend.backend.expr.SwitchExpression(convert(expr.getSwitchExpr()), cases, convert(expr
+ .getDefaultExpr()), getSourcePos(expr));
+ }
+
+ /**
+ * transform built-in operator names from the old to the new special names
+ */
+ private String transformFunctionName(String functionName) {
+ if ("+".equals(functionName))
+ return SysLibNames.OPERATOR_PLUS;
+ if ("-".equals(functionName))
+ return SysLibNames.OPERATOR_MINUS;
+ if ("*".equals(functionName))
+ return SysLibNames.OPERATOR_MULT;
+ if ("/".equals(functionName))
+ return SysLibNames.OPERATOR_DIV;
+ if ("%".equals(functionName))
+ return SysLibNames.OPERATOR_MOD;
+
+ if ("==".equals(functionName))
+ return SysLibNames.OPERATOR_EQUALS;
+ if ("!=".equals(functionName))
+ return SysLibNames.OPERATOR_NOT_EQUALS;
+ if ("<".equals(functionName))
+ return SysLibNames.OPERATOR_LESS;
+ if ("<=".equals(functionName))
+ return SysLibNames.OPERATOR_LESS_OR_EQUALS;
+ if (">=".equals(functionName))
+ return SysLibNames.OPERATOR_GREATER_OR_EQUALS;
+ if (">".equals(functionName))
+ return SysLibNames.OPERATOR_GREATER;
+
+ if ("!".equals(functionName))
+ return SysLibNames.OPERATOR_NOT;
+
+ if ("subString".equals(functionName))
+ return SysLibNames.SUBSTRING;
+ if ("replaceAll".equals(functionName))
+ return SysLibNames.REPLACE_ALL_REGEX;
+
+ return functionName;
+ }
+
+ private AbstractTypeReference analyze(AbstractExpression target) {
+ // TODO: To be impl
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+ private ExpressionBase createInvocationOnTargetExpression(String functionName, ExpressionBase targetExpression,
+ AbstractTypeReference targetType, List<ExpressionBase> params, List<AbstractTypeReference> paramTypes,
+ boolean isMethodStyle, SourcePos sourcePos) {
+ final List<ExpressionBase> paramsWithoutFirst = params;
+ final List<ExpressionBase> allParams = new ArrayList<ExpressionBase>();
+ allParams.add(targetExpression);
+ allParams.addAll(params);
+
+ if (isCollectionType(targetType)) {
+ paramTypes.add(0, targetType);
+ final AbstractTypeReference[] paramTypeArray = paramTypes.toArray(new AbstractTypeReference[0]);
+
+ if (hasMatchingOperationCall(functionName, paramTypeArray))
+ // check if there is a function that directly matches the
+ // collection
+ return new InvocationOnObjectExpression(functionName, allParams, true, sourcePos);
+ else
+ // otherwise, do a 'collect' and call the function on all
+ // elements of the collection
+ return new InvocationOnCollectionExpression(targetExpression, functionName, paramsWithoutFirst,
+ sourcePos);
+ }
+
+ if (isObjectType(targetType))
+ // if the static type is "Object", we do not know if it is a
+ // collection, so we do the logic at runtime
+ return new InvocationOnWhateverExpression(functionName, allParams, isMethodStyle, sourcePos);
+
+ // otherwise we know that it is not a collection and can avoid repeating
+ // this logic at runtime
+ return new InvocationOnObjectExpression(functionName, allParams, true, sourcePos);
+ }
+
+ private boolean hasMatchingOperationCall(String functionName, AbstractTypeReference[] paramTypes) {
+ FunctionType functionType = typeSystem.functionForNameAndParameterTypes(functionName, paramTypes);
+ if (functionType != null) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ private ExpressionBase createPropertyExpression(ExpressionBase target, Object type, String varName,
+ SourcePos sourcePos) {
+ if (isCollectionType(type)) {
+ if (CollectionType.INSTANCE.getProperties().keySet().contains(varName))
+ return new PropertyOnObjectExpression(target, varName, sourcePos);
+ else
+ return new PropertyOnCollectionExpression(target, varName, sourcePos);
+ }
+
+ if (isObjectType(type))
+ return new PropertyOnWhateverExpression(target, varName, sourcePos);
+
+ return new PropertyOnObjectExpression(target, varName, sourcePos);
+ }
+
+ private boolean isObjectType(Object t) {
+ // TODO : To be impl
+ return true;
+ // throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+ private boolean isCollectionType(Object t) {
+ // TODO : To be impl
+ return false;
+ // throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+
+
+ private SourcePos getSourcePos(SyntaxElement lit) {
+ return new SourcePos(lit.getFileName(), extensionName, lit.getLine());
+ }
+
+}