diff options
Diffstat (limited to 'extraplugins/facade/org.eclipse.papyrus.facade.codegen/src-templates/org/eclipse/papyrus/facade/codegen/genclass/reflectiveDelegationAlternative.mtl')
-rw-r--r-- | extraplugins/facade/org.eclipse.papyrus.facade.codegen/src-templates/org/eclipse/papyrus/facade/codegen/genclass/reflectiveDelegationAlternative.mtl | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/extraplugins/facade/org.eclipse.papyrus.facade.codegen/src-templates/org/eclipse/papyrus/facade/codegen/genclass/reflectiveDelegationAlternative.mtl b/extraplugins/facade/org.eclipse.papyrus.facade.codegen/src-templates/org/eclipse/papyrus/facade/codegen/genclass/reflectiveDelegationAlternative.mtl new file mode 100644 index 00000000000..27bebd978a0 --- /dev/null +++ b/extraplugins/facade/org.eclipse.papyrus.facade.codegen/src-templates/org/eclipse/papyrus/facade/codegen/genclass/reflectiveDelegationAlternative.mtl @@ -0,0 +1,39 @@ +[comment]Copyright (c) 2013 CEA LIST. + +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: + Obeo - Initial API and implementation + CEA LIST - Modification to support Facade code generation[/comment] +[comment encoding = UTF-8 /] +[module reflectiveDelegationAlternative('http://www.eclipse.org/emf/2002/GenModel')/] + +[import org::eclipse::emf::eef::codegen::ecore::services::wrappers::GenModel /] +[import org::eclipse::emf::eef::codegen::ecore::services::wrappers::GenClass /] + + +[template public reflectiveDelegationAlternative(genClass : GenClass, isImplementation : Boolean, genModel : GenModel)] +[if (isImplementation + and (genModel.featureDelegation = GenDelegationKind::Reflective + or genModel.isDynamicDelegation()) + and (genClass.getClassExtendsGenClass() = null + or (genClass.getClassExtendsGenClass().getGenModel().featureDelegation <> GenDelegationKind::Reflective + and not genClass.getClassExtendsGenClass().getGenModel().isDynamicDelegation()))) ] + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + [if (genModel.useClassOverrideAnnotation()) ] + @Override + [/if] + protected int eStaticFeatureCount() + { + return [if genClass.getClassExtendsGenClass() = null]0[else][genClass.getClassExtendsGenClass().getAllGenFeatures()->size()/][/if]; + } + +[/if] +[/template] |