| <?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.

 All rights reserved. This program and the accompanying materials
 are made available under the terms of the Eclipse Public License 2.0
 which accompanies this distribution, and is available at
 https://www.eclipse.org/legal/epl-2.0/

 SPDX-License-Identifier: EPL-2.0

 Contributors:
 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<Object> values = getStereotypePropertyValues(context);
final java.util.List<org.eclipse.emf.ecore.EObject> eobjects = values.stream()
		.filter(org.eclipse.emf.ecore.EObject.class::isInstance)
		.map(org.eclipse.emf.ecore.EObject.class::cast)
		.collect(java.util.stream.Collectors.toList());
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()) {
	return org.eclipse.emf.common.util.ECollections.emptyEList();
}
	EObject stereotypeApplication = null;
if (eobject instanceof org.eclipse.uml2.uml.Element) {
	stereotypeApplication = getFirstMatchingStereotypeApplication(eobject);
} else {
	stereotypeApplication = eobject;
}
if (stereotypeApplication == null) {
	return org.eclipse.emf.common.util.ECollections.emptyEList();
}
final org.eclipse.emf.ecore.EStructuralFeature feature = stereotypeApplication.eClass().getEStructuralFeature(this.propertyName);
if (null == feature) {
	return org.eclipse.emf.common.util.ECollections.emptyEList();
}

final Object featureValue = stereotypeApplication.eGet(feature, true);
if (null == featureValue) {
	return org.eclipse.emf.common.util.ECollections.emptyEList();
}
if (feature.isMany()) {
	return org.eclipse.emf.common.util.ECollections.toEList((java.util.Collection<?>) featureValue);
}
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) {
	return org.eclipse.emf.common.util.ECollections.emptyEList();
}
final java.util.List<Comment> comments = ((org.eclipse.uml2.uml.Element) element).getOwnedComments().stream().filter(cmt -> cmt.getAnnotatedElements().contains(element)).collect(java.util.stream.Collectors.toList());
if (comments.isEmpty()) {
	return org.eclipse.emf.common.util.ECollections.emptyEList();
}
switch (this.commentChoice) {
case ALL_OWNED_COMMENTS:
	return org.eclipse.emf.common.util.ECollections.unmodifiableEList(comments);
case FIRST_OWNED_COMMENT:
	if (comments.size() > 0) {
		return org.eclipse.emf.common.util.ECollections.singletonEList(comments.get(0));
	}
default:
	// not possible
	return org.eclipse.emf.common.util.ECollections.emptyEList();
}"> |
| <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> |