blob: aee20cea87655b3c7f285ec4ba6a02c583b56498 [file] [log] [blame]
<?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. &#xD;&#xA;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="&lt;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.&lt;/p>&#xA;"/>
<details key="body" value="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;}"/>
</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>