| <?xml version="1.0" encoding="UTF-8"?> |
| <ecore:EPackage 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" name="documentstructuretemplate" nsURI="http://www.eclipse.org/papyrus/model2doc/markup/uml/1.0.0/documentstructuretemplate" |
| nsPrefix="markup.uml.documentstructuretemplate"> |
| <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML"> |
| <details key="originalName" value="markupumldocumentstructuretemplate"/> |
| </eAnnotations> |
| <eClassifiers xsi:type="ecore:EClass" name="StereotypePropertyAttributeInMarkupToFile" |
| eSuperTypes="../../org.eclipse.papyrus.model2doc.uml.documentstructuretemplate/model/umldocumentstructuretemplate.ecore#//StereotypePropertyTemplate ../../org.eclipse.papyrus.model2doc.emf.documentstructuretemplate/model/documentstructuretemplate.ecore#//ITemplatePartView ../../org.eclipse.papyrus.model2doc.uml.documentstructuretemplate/model/umldocumentstructuretemplate.ecore#//StereotypePropertyAttribute ../../org.eclipse.papyrus.model2doc.emf.documentstructuretemplate/model/documentstructuretemplate.ecore#//ILeafBodyPartTemplate #//IMarkupUMLBodyPartTemplateTitle"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> |
| <details key="documentation" value="This element allows to convert a Stereotype Property field written with a markup language into an HTML file."/> |
| </eAnnotations> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="IMarkupUMLBodyPartTemplateTitle" abstract="true" |
| interface="true" eSuperTypes="../../org.eclipse.papyrus.model2doc.markup.emf.documentstructuretemplate/model/markup-documentstructuretemplate.ecore#//IMarkupToFileBodyPartTemplate ../../org.eclipse.papyrus.model2doc.uml.documentstructuretemplate/model/umldocumentstructuretemplate.ecore#//IUMLBodyPartTemplateTitle"> |
| <eAnnotations source="duplicates"> |
| <contents xsi:type="ecore:EOperation" name="buildPartTemplateTitle" ordered="false" |
| lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> |
| <details key="documentation" value="This method creates the title (dedicated to element of this metamodel. 
In the general case, the ISubBodyPartTemplate uses the context element to build the title, wheareas the IBodyPartTemplate don't use it."/> |
| <details key="body" value="return org.eclipse.papyrus.model2doc.markup.uml.documentstructuretemplate.internal.operations.MarkupUMLBodySectionPartTemplateTitleHelper.MARKUP_UML_INSTANCE.buildPartTemplateTitle(this,context);"/> |
| </eAnnotations> |
| <eAnnotations source="redefines" references="../../org.eclipse.papyrus.model2doc.emf.documentstructuretemplate/model/documentstructuretemplate.ecore#//IBodySectionPartTemplate/buildPartTemplateTitle ../../org.eclipse.papyrus.model2doc.uml.documentstructuretemplate/model/umldocumentstructuretemplate.ecore#//IUMLBodyPartTemplateTitle/%duplicates%/buildPartTemplateTitle"/> |
| <eParameters name="context" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/> |
| </contents> |
| </eAnnotations> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="CommentInMarkupToFile" eSuperTypes="../../org.eclipse.papyrus.model2doc.emf.documentstructuretemplate/model/documentstructuretemplate.ecore#//ITemplatePartView ../../org.eclipse.papyrus.model2doc.emf.documentstructuretemplate/model/documentstructuretemplate.ecore#//ILeafBodyPartTemplate #//IMarkupUMLBodyPartTemplateTitle"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> |
| <details key="documentation" value="PartTemplate used to create an HTML file from a UML Comments described in markup."/> |
| </eAnnotations> |
| <eOperations name="getMatchingComments" ordered="false" upperBound="-1" eType="ecore:EClass ../../org.eclipse.papyrus.model2doc.uml.documentstructuretemplate/model/umldocumentstructuretemplate.ecore#//Comment"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> |
| <details key="documentation" value="<p>This methods returns the matching Comments. The argument is EObject, to be compliant will EMF code, it avoid us to check type before calling methods.</p>
"/> |
| <details key="body" value="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();
}"/> |
| </eAnnotations> |
| <eParameters name="element" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/> |
| </eOperations> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="commentChoice" ordered="false" |
| lowerBound="1" eType="ecore:EEnum ../../org.eclipse.papyrus.model2doc.uml.documentstructuretemplate/model/umldocumentstructuretemplate.ecore#//CommentChoice" |
| defaultValueLiteral="FIRST_OWNED_COMMENT"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> |
| <details key="documentation" value="Allow to define if we use only the first owned comments or all owned comment. "/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| </ecore:EPackage> |