blob: 8e3733740e0ee9758d04e1caf1d6553b8a6b3733 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:genmodel="http://www.eclipse.org/uml2/2.2.0/GenModel"
copyrightText="Copyright (c) 2019 CEA LIST.&#xA;&#xA; All rights reserved. This program and the accompanying materials&#xA; are made available under the terms of the Eclipse Public License 2.0&#xA; which accompanies this distribution, and is available at&#xA; https://www.eclipse.org/legal/epl-2.0/&#xA;&#xA; SPDX-License-Identifier: EPL-2.0&#xA;&#xA; Contributors:&#xA; Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation"
modelDirectory="/org.eclipse.papyrus.model2doc.uml.documentstructuretemplate/src-gen"
creationIcons="false" editDirectory="/org.eclipse.papyrus.model2doc.uml.documentstructuretemplate.edit/src-gen"
editorDirectory="/org.eclipse.papyrus.model2doc.uml.documentstructuretemplate.editor/src-gen"
modelPluginID="org.eclipse.papyrus.model2doc.uml.documentstructuretemplate" modelName="Umldocumentstructuretemplate"
editPluginClass="org.eclipse.papyrus.model2doc.uml.documentstructuretemplate.provider.UMLDocumentStructureTemplateEditPlugin"
nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
codeFormatting="true" commentFormatting="true" testsDirectory="/org.eclipse.papyrus.model2doc.uml.documentstructuretemplate.tests/src-gen"
importerID="org.eclipse.uml2.uml.ecore.importer" complianceLevel="8.0" copyrightFields="false"
usedGenPackages="../../org.eclipse.papyrus.model2doc.emf.documentstructuretemplate/model/documentstructuretemplate.genmodel#//documentstructuretemplate ../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.genmodel#//generatorconfiguration ../../org.eclipse.papyrus.model2doc.core.author/model/author.genmodel#//author ../../org.eclipse.papyrus.model2doc.core.builtintypes/model/BuiltInTypes.genmodel#//builtintypes ../../org.eclipse.papyrus.model2doc.core.styles/model/Styles.genmodel#//styles ../../org.eclipse.papyrus.infra.emf.expressions/model/expressions.genmodel#//expressions/booleanexpressions ../../org.eclipse.papyrus.infra.emf.expressions/model/expressions.genmodel#//expressions"
operationReflection="true" importOrganizing="true" cleanup="true" oSGiCompatible="true"
pluralizedGetters="true">
<genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/importer/org.eclipse.uml2.uml.ecore.importer">
<details key="OPPOSITE_ROLE_NAMES" value="IGNORE"/>
<details key="DUPLICATE_FEATURES" value="PROCESS"/>
<details key="ANNOTATION_DETAILS" value="PROCESS"/>
<details key="PROPERTY_DEFAULT_EXPRESSIONS" value="IGNORE"/>
<details key="DUPLICATE_FEATURE_INHERITANCE" value="PROCESS"/>
<details key="COMMENTS" value="PROCESS"/>
<details key="DERIVED_FEATURES" value="PROCESS"/>
<details key="SUPER_CLASS_ORDER" value="PROCESS"/>
<details key="DUPLICATE_OPERATION_INHERITANCE" value="PROCESS"/>
<details key="REDEFINING_OPERATIONS" value="PROCESS"/>
<details key="INVARIANT_CONSTRAINTS" value="PROCESS"/>
<details key="UNION_PROPERTIES" value="REPORT"/>
<details key="DUPLICATE_OPERATIONS" value="PROCESS"/>
<details key="NON_API_INVARIANTS" value="IGNORE"/>
<details key="CAMEL_CASE_NAMES" value="IGNORE"/>
<details key="SUBSETTING_PROPERTIES" value="REPORT"/>
<details key="OPERATION_BODIES" value="IGNORE"/>
<details key="ECORE_TAGGED_VALUES" value="PROCESS"/>
<details key="UNTYPED_PROPERTIES" value="REPORT"/>
<details key="REDEFINING_PROPERTIES" value="PROCESS"/>
<details key="INVOCATION_DELEGATES" value="IGNORE"/>
<details key="VALIDATION_DELEGATES" value="IGNORE"/>
</genAnnotations>
<foreignModel>umldocumentstructuretemplate.uml</foreignModel>
<genPackages xsi:type="genmodel:GenPackage" prefix="UMLDocumentStructureTemplate"
basePackage="org.eclipse.papyrus.model2doc.uml" disposableProviderFactory="true"
extensibleProviderFactory="true" childCreationExtenders="true" ecorePackage="umldocumentstructuretemplate.ecore#/">
<genEnums xsi:type="genmodel:GenEnum" typeSafeEnumCompatible="false" ecoreEnum="umldocumentstructuretemplate.ecore#//StereotypeFilterBehavior">
<genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umldocumentstructuretemplate.ecore#//StereotypeFilterBehavior/STEREOTYPE_TYPE_OF"/>
<genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umldocumentstructuretemplate.ecore#//StereotypeFilterBehavior/STEREOTYPE_KIND_OF"/>
</genEnums>
<genEnums xsi:type="genmodel:GenEnum" typeSafeEnumCompatible="false" ecoreEnum="umldocumentstructuretemplate.ecore#//CommentChoice">
<genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umldocumentstructuretemplate.ecore#//CommentChoice/FIRST_OWNED_COMMENT"/>
<genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="umldocumentstructuretemplate.ecore#//CommentChoice/ALL_OWNED_COMMENTS"/>
</genEnums>
<genClasses xsi:type="genmodel:GenClass" ecoreClass="umldocumentstructuretemplate.ecore#//StereotypePartTemplate"
labelFeature="../../org.eclipse.papyrus.model2doc.emf.documentstructuretemplate/model/documentstructuretemplate.genmodel#//documentstructuretemplate/IBodySectionPartTemplate/customTitle"/>
<genClasses xsi:type="genmodel:GenClass" image="false" ecoreClass="umldocumentstructuretemplate.ecore#//MandatoryStereotypeWithEClassTemplate"/>
<genClasses xsi:type="genmodel:GenClass" image="false" ecoreClass="umldocumentstructuretemplate.ecore#//MandatoryStereotypeTemplate"/>
<genClasses xsi:type="genmodel:GenClass" image="false" ecoreClass="umldocumentstructuretemplate.ecore#//StereotypeTemplate">
<genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umldocumentstructuretemplate.ecore#//StereotypeTemplate/stereotypeFilterRule"/>
<genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umldocumentstructuretemplate.ecore#//StereotypeTemplate/stereotypeQualifiedName"/>
<genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umldocumentstructuretemplate.ecore#//StereotypeTemplate/getFirstMatchingStereotypeApplication"
body="return org.eclipse.papyrus.model2doc.uml.documentstructuretemplate.internal.operations.StereotypeTemplateOperations.getFirstMatchingStereotypeApplication(this,element);">
<genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umldocumentstructuretemplate.ecore#//StereotypeTemplate/getFirstMatchingStereotypeApplication/element"/>
</genOperations>
</genClasses>
<genClasses xsi:type="genmodel:GenClass" image="false" ecoreClass="umldocumentstructuretemplate.ecore#//IUMLBodyPartTemplateTitle"
labelFeature="../../org.eclipse.papyrus.model2doc.emf.documentstructuretemplate/model/documentstructuretemplate.genmodel#//documentstructuretemplate/IBodySectionPartTemplate/customTitle"/>
<genClasses xsi:type="genmodel:GenClass" ecoreClass="umldocumentstructuretemplate.ecore#//StereotypePropertyReferencePartTemplate"
labelFeature="../../org.eclipse.papyrus.model2doc.emf.documentstructuretemplate/model/documentstructuretemplate.genmodel#//documentstructuretemplate/IBodySectionPartTemplate/customTitle">
<genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umldocumentstructuretemplate.ecore#//StereotypePropertyReferencePartTemplate/getStereotypePropertyReferenceValues"
body="final java.util.List&lt;Object> values = getStereotypePropertyValues(context);&#xA;final java.util.List&lt;org.eclipse.emf.ecore.EObject> eobjects = values.stream()&#xA;&#x9;&#x9;.filter(org.eclipse.emf.ecore.EObject.class::isInstance)&#xA;&#x9;&#x9;.map(org.eclipse.emf.ecore.EObject.class::cast)&#xA;&#x9;&#x9;.collect(java.util.stream.Collectors.toList());&#xA;return org.eclipse.emf.common.util.ECollections.toEList(eobjects);">
<genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umldocumentstructuretemplate.ecore#//StereotypePropertyReferencePartTemplate/getStereotypePropertyReferenceValues/context"/>
</genOperations>
</genClasses>
<genClasses xsi:type="genmodel:GenClass" image="false" ecoreClass="umldocumentstructuretemplate.ecore#//StereotypePropertyTemplate">
<genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umldocumentstructuretemplate.ecore#//StereotypePropertyTemplate/propertyName"/>
<genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umldocumentstructuretemplate.ecore#//StereotypePropertyTemplate/getStereotypePropertyValues"
body="if (null == this.propertyName || this.propertyName.isEmpty()) {&#xA;&#x9;return org.eclipse.emf.common.util.ECollections.emptyEList();&#xA;}&#xA;&#x9;EObject stereotypeApplication = null;&#xA;if (eobject instanceof org.eclipse.uml2.uml.Element) {&#xA;&#x9;stereotypeApplication = getFirstMatchingStereotypeApplication(eobject);&#xA;} else {&#xA;&#x9;stereotypeApplication = eobject;&#xA;}&#xA;if (stereotypeApplication == null) {&#xA;&#x9;return org.eclipse.emf.common.util.ECollections.emptyEList();&#xA;}&#xA;final org.eclipse.emf.ecore.EStructuralFeature feature = stereotypeApplication.eClass().getEStructuralFeature(this.propertyName);&#xA;if (null == feature) {&#xA;&#x9;return org.eclipse.emf.common.util.ECollections.emptyEList();&#xA;}&#xA;&#xA;final Object featureValue = stereotypeApplication.eGet(feature, true);&#xA;if (null == featureValue) {&#xA;&#x9;return org.eclipse.emf.common.util.ECollections.emptyEList();&#xA;}&#xA;if (feature.isMany()) {&#xA;&#x9;return org.eclipse.emf.common.util.ECollections.toEList((java.util.Collection&lt;?>) featureValue);&#xA;}&#xA;return org.eclipse.emf.common.util.ECollections.singletonEList(featureValue);">
<genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umldocumentstructuretemplate.ecore#//StereotypePropertyTemplate/getStereotypePropertyValues/eobject"/>
</genOperations>
</genClasses>
<genClasses xsi:type="genmodel:GenClass" image="false" ecoreClass="umldocumentstructuretemplate.ecore#//StereotypePropertyReference"/>
<genClasses xsi:type="genmodel:GenClass" ecoreClass="umldocumentstructuretemplate.ecore#//CommentAsParagraph"
labelFeature="../../org.eclipse.papyrus.model2doc.emf.documentstructuretemplate/model/documentstructuretemplate.genmodel#//documentstructuretemplate/IBodySectionPartTemplate/customTitle">
<genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute umldocumentstructuretemplate.ecore#//CommentAsParagraph/commentChoice"/>
<genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umldocumentstructuretemplate.ecore#//CommentAsParagraph/getMatchingComments"
body="if (false == element instanceof org.eclipse.uml2.uml.Element) {&#xA;&#x9;return org.eclipse.emf.common.util.ECollections.emptyEList();&#xA;}&#xA;final java.util.List&lt;Comment> comments = ((org.eclipse.uml2.uml.Element) element).getOwnedComments().stream().filter(cmt -> cmt.getAnnotatedElements().contains(element)).collect(java.util.stream.Collectors.toList());&#xA;if (comments.isEmpty()) {&#xA;&#x9;return org.eclipse.emf.common.util.ECollections.emptyEList();&#xA;}&#xA;switch (this.commentChoice) {&#xA;case ALL_OWNED_COMMENTS:&#xA;&#x9;return org.eclipse.emf.common.util.ECollections.unmodifiableEList(comments);&#xA;case FIRST_OWNED_COMMENT:&#xA;&#x9;if (comments.size() > 0) {&#xA;&#x9;&#x9;return org.eclipse.emf.common.util.ECollections.singletonEList(comments.get(0));&#xA;&#x9;}&#xA;default:&#xA;&#x9;// not possible&#xA;&#x9;return org.eclipse.emf.common.util.ECollections.emptyEList();&#xA;}">
<genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umldocumentstructuretemplate.ecore#//CommentAsParagraph/getMatchingComments/element"/>
</genOperations>
</genClasses>
<genClasses xsi:type="genmodel:GenClass" image="false" ecoreClass="umldocumentstructuretemplate.ecore#//Comment"/>
<genClasses xsi:type="genmodel:GenClass" ecoreClass="umldocumentstructuretemplate.ecore#//StereotypePropertyColumn"
labelFeature="../../org.eclipse.papyrus.model2doc.emf.documentstructuretemplate/model/documentstructuretemplate.genmodel#//documentstructuretemplate/IColumn/customColumnTitle">
<genOperations xsi:type="genmodel:GenOperation" ecoreOperation="umldocumentstructuretemplate.ecore#//StereotypePropertyColumn/buildCellLabel"
body="return org.eclipse.papyrus.model2doc.uml.documentstructuretemplate.internal.operations.StereotypePropertyColumnOperations.buildCellLabel(this, cellElement);">
<genParameters xsi:type="genmodel:GenParameter" ecoreParameter="umldocumentstructuretemplate.ecore#//StereotypePropertyColumn/buildCellLabel/cellElement"/>
</genOperations>
</genClasses>
<genClasses xsi:type="genmodel:GenClass" image="false" ecoreClass="umldocumentstructuretemplate.ecore#//MandatoryStereotypePropertyTemplate"/>
<genClasses xsi:type="genmodel:GenClass" ecoreClass="umldocumentstructuretemplate.ecore#//StereotypePropertyReferenceTableView"
labelFeature="../../org.eclipse.papyrus.model2doc.emf.documentstructuretemplate/model/documentstructuretemplate.genmodel#//documentstructuretemplate/IBodySectionPartTemplate/customTitle"/>
<genClasses xsi:type="genmodel:GenClass" ecoreClass="umldocumentstructuretemplate.ecore#//StereotypeListItemTemplate"
labelFeature="../../org.eclipse.papyrus.model2doc.emf.documentstructuretemplate/model/documentstructuretemplate.genmodel#//documentstructuretemplate/IListItemTemplate/customItemLabel"/>
<genClasses xsi:type="genmodel:GenClass" ecoreClass="umldocumentstructuretemplate.ecore#//StereotypePropertyReferenceListItemTemplate"/>
<genClasses xsi:type="genmodel:GenClass" image="false" ecoreClass="umldocumentstructuretemplate.ecore#//StereotypePropertyListItemTemplate"
labelFeature="../../org.eclipse.papyrus.model2doc.emf.documentstructuretemplate/model/documentstructuretemplate.genmodel#//documentstructuretemplate/IListItemTemplate/customItemLabel"/>
<genClasses xsi:type="genmodel:GenClass" ecoreClass="umldocumentstructuretemplate.ecore#//StereotypePropertyAttributeListItemTemplate"/>
<genClasses xsi:type="genmodel:GenClass" image="false" ecoreClass="umldocumentstructuretemplate.ecore#//StereotypePropertyAttribute"/>
<genClasses xsi:type="genmodel:GenClass" ecoreClass="umldocumentstructuretemplate.ecore#//StereotypePropertyAttributeAsParagraph"/>
</genPackages>
</genmodel:GenModel>