Bug 569817: [Model2Doc] docx template referenced in the generator
configuration not found
Change-Id: I8a10d37671c3618575c8852ed77bcaf5ca89de93
Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.edit/plugin.properties b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.edit/plugin.properties
index 1daa1e0..6da321d 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.edit/plugin.properties
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.edit/plugin.properties
@@ -37,5 +37,4 @@
_UI_AbstractDocumentGeneratorConfiguration_documentName_feature = Document Name
_UI_AbstractDocumentGeneratorConfiguration_documentFolder_feature = Document Folder
_UI_AbstractDocumentGeneratorConfiguration_documentGeneratorId_feature = Document Generator Id
-_UI_Unknown_feature = Unspecified
-_UI_URI_type = URI
+_UI_Unknown_feature = Unspecified
\ No newline at end of file
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.ecore b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.ecore
index d7d629e..ab718f2 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.ecore
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.ecore
@@ -153,13 +153,28 @@
<eOperations name="isSaveDocumentStructure" ordered="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<eOperations name="isSaveImages" ordered="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<eOperations name="getTemplateFile" ordered="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eOperations name="createTemplateFileURL" ordered="false" lowerBound="1" eType="#//URL">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Create a java.net.URL to access to the template or null if it don't exist."/>
+ </eAnnotations>
+ </eOperations>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="URI" instanceClassName="org.eclipse.emf.common.util.URI"
- abstract="true" interface="true"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="URL" instanceClassName="java.net.URL"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="URI" instanceClassName="org.eclipse.emf.common.util.URI"/>
<eClassifiers xsi:type="ecore:EClass" name="DefaultDocumentGeneratorConfiguration"
eSuperTypes="#//AbstractDocumentGeneratorConfiguration #//IDocumentGeneratorConfiguration">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Default implementation to define the DocumentGeneratorConfiguration.
These is no inheritance between DefaultDocumentGeneratorConfiguration and DefaultDocumentStructureGeneratorConfiguration, in order to constraint by type the kind of generator to use the the DocumentStructureTemplate and DocumentStructure models."/>
</eAnnotations>
+ <eAnnotations source="duplicates">
+ <contents xsi:type="ecore:EOperation" name="createTemplateFileURL" ordered="false"
+ lowerBound="1" eType="#//URL">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Create a java.net.URL to access to the template or null if it don't exist."/>
+ <details key="body" value="return org.eclipse.papyrus.model2doc.core.generatorconfiguration.internal.operations.DefaultDocumentGeneratorConfigurationOperations.createTemplateFileURL(this);"/>
+ </eAnnotations>
+ <eAnnotations source="redefines" references="#//IDocumentGeneratorConfiguration/createTemplateFileURL"/>
+ </contents>
+ </eAnnotations>
</eClassifiers>
</ecore:EPackage>
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.genmodel b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.genmodel
index 56fdc49..f8d5a95 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.genmodel
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.genmodel
@@ -40,6 +40,8 @@
<genPackages xsi:type="genmodel:GenPackage" prefix="GeneratorConfiguration" basePackage="org.eclipse.papyrus.model2doc.core"
disposableProviderFactory="true" extensibleProviderFactory="true" childCreationExtenders="true"
ecorePackage="generatorconfiguration.ecore#/">
+ <genDataTypes xsi:type="genmodel:GenDataType" ecoreDataType="generatorconfiguration.ecore#//URL"/>
+ <genDataTypes xsi:type="genmodel:GenDataType" ecoreDataType="generatorconfiguration.ecore#//URI"/>
<genClasses xsi:type="genmodel:GenClass" ecoreClass="generatorconfiguration.ecore#//DefaultDocumentStructureGeneratorConfiguration"/>
<genClasses xsi:type="genmodel:GenClass" image="false" ecoreClass="generatorconfiguration.ecore#//AbstractDocumentStructureGeneratorConfiguration">
<genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute generatorconfiguration.ecore#//AbstractDocumentStructureGeneratorConfiguration/structureGeneratorId"/>
@@ -76,8 +78,8 @@
<genOperations xsi:type="genmodel:GenOperation" ecoreOperation="generatorconfiguration.ecore#//IDocumentGeneratorConfiguration/isSaveDocumentStructure"/>
<genOperations xsi:type="genmodel:GenOperation" ecoreOperation="generatorconfiguration.ecore#//IDocumentGeneratorConfiguration/isSaveImages"/>
<genOperations xsi:type="genmodel:GenOperation" ecoreOperation="generatorconfiguration.ecore#//IDocumentGeneratorConfiguration/getTemplateFile"/>
+ <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="generatorconfiguration.ecore#//IDocumentGeneratorConfiguration/createTemplateFileURL"/>
</genClasses>
- <genClasses xsi:type="genmodel:GenClass" image="false" ecoreClass="generatorconfiguration.ecore#//URI"/>
<genClasses xsi:type="genmodel:GenClass" ecoreClass="generatorconfiguration.ecore#//DefaultDocumentGeneratorConfiguration"/>
</genPackages>
</genmodel:GenModel>
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.notation b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.notation
index ddc0c86..216a385 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.notation
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.notation
@@ -49,7 +49,14 @@
<styles xmi:type="notation:FilteringStyle" xmi:id="_TQ7eWU1gEemE05tA7eq89g"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_TQ7eWk1gEemE05tA7eq89g"/>
</children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_TQ7eW01gEemE05tA7eq89g" visible="false" type="Class_OperationCompartment">
+ <children xmi:type="notation:BasicCompartment" xmi:id="_TQ7eW01gEemE05tA7eq89g" type="Class_OperationCompartment">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_OoLysEBKEeugb8n0tn-ypw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_OoMZwEBKEeugb8n0tn-ypw" key="visible" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:Shape" xmi:id="_PSes4EBKEeugb8n0tn-ypw" type="Operation_ClassOperationLabel">
+ <element xmi:type="uml:Operation" href="generatorconfiguration.uml#_J78tEEBKEeugb8n0tn-ypw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_PSes4UBKEeugb8n0tn-ypw"/>
+ </children>
<styles xmi:type="notation:TitleStyle" xmi:id="_TQ7eXE1gEemE05tA7eq89g"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_TQ7eXU1gEemE05tA7eq89g"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_TQ7eXk1gEemE05tA7eq89g"/>
@@ -106,6 +113,10 @@
<element xmi:type="uml:Operation" href="generatorconfiguration.uml#_e8AVwF9xEemxcMQajU1fyA"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_e8fd8V9xEemxcMQajU1fyA"/>
</children>
+ <children xmi:type="notation:Shape" xmi:id="_r1aXUEBJEeugb8n0tn-ypw" type="Operation_InterfaceOperationLabel">
+ <element xmi:type="uml:Operation" href="generatorconfiguration.uml#_rfhm4EBJEeugb8n0tn-ypw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_r1aXUUBJEeugb8n0tn-ypw"/>
+ </children>
<styles xmi:type="notation:TitleStyle" xmi:id="_cRQqmVB6EemNlsOH2YnpzQ"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_cRQqmlB6EemNlsOH2YnpzQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_cRQqm1B6EemNlsOH2YnpzQ"/>
@@ -320,39 +331,61 @@
<element xmi:type="uml:Interface" href="generatorconfiguration.uml#_67KS0F9yEemxcMQajU1fyA"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_67Lg8V9yEemxcMQajU1fyA" x="-580" y="-200" width="361" height="121"/>
</children>
- <children xmi:type="notation:Shape" xmi:id="_zoCI0D4JEeux05jxrKZ5Sw" type="Interface_Shape">
- <children xmi:type="notation:DecorationNode" xmi:id="_zoCI0j4JEeux05jxrKZ5Sw" type="Interface_NameLabel"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_zoCI0z4JEeux05jxrKZ5Sw" type="Interface_FloatingNameLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_zoCI1D4JEeux05jxrKZ5Sw" y="15"/>
+ <children xmi:type="notation:Shape" xmi:id="_bH4wcEBREeugb8n0tn-ypw" type="PrimitiveType_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_bH4wckBREeugb8n0tn-ypw" type="PrimitiveType_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_bH4wc0BREeugb8n0tn-ypw" type="PrimitiveType_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bH4wdEBREeugb8n0tn-ypw" y="15"/>
</children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_zoCI1T4JEeux05jxrKZ5Sw" type="Interface_AttributeCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_zoCI1j4JEeux05jxrKZ5Sw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_zoCI1z4JEeux05jxrKZ5Sw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_zoCI2D4JEeux05jxrKZ5Sw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zoCI2T4JEeux05jxrKZ5Sw"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_bH4wdUBREeugb8n0tn-ypw" type="PrimitiveType_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_bH4wdkBREeugb8n0tn-ypw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_bH4wd0BREeugb8n0tn-ypw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_bH4weEBREeugb8n0tn-ypw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bH4weUBREeugb8n0tn-ypw"/>
</children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_zoCI2j4JEeux05jxrKZ5Sw" type="Interface_OperationCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_zoCI2z4JEeux05jxrKZ5Sw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_zoCI3D4JEeux05jxrKZ5Sw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_zoCI3T4JEeux05jxrKZ5Sw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zoCI3j4JEeux05jxrKZ5Sw"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_bH4wekBREeugb8n0tn-ypw" type="PrimitiveType_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_bH4we0BREeugb8n0tn-ypw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_bH4wfEBREeugb8n0tn-ypw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_bH4wfUBREeugb8n0tn-ypw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bH4wfkBREeugb8n0tn-ypw"/>
</children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_zoCI3z4JEeux05jxrKZ5Sw" type="Interface_NestedClassifierCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_zoCI4D4JEeux05jxrKZ5Sw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_zoCI4T4JEeux05jxrKZ5Sw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_zoCI4j4JEeux05jxrKZ5Sw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zoCI4z4JEeux05jxrKZ5Sw"/>
- </children>
- <element xmi:type="uml:Interface" href="generatorconfiguration.uml#_zoA6sD4JEeux05jxrKZ5Sw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zoCI0T4JEeux05jxrKZ5Sw" x="-1180" y="700"/>
+ <element xmi:type="uml:PrimitiveType" href="generatorconfiguration.uml#_bH3iUEBREeugb8n0tn-ypw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bH4wcUBREeugb8n0tn-ypw" x="-1240" y="700"/>
</children>
- <children xmi:type="notation:Shape" xmi:id="_liSHYD4PEeuntfnsZuNAfg" type="StereotypeComment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_liSHYT4PEeuntfnsZuNAfg"/>
- <styles xmi:type="notation:EObjectValueStyle" xmi:id="_liSHYz4PEeuntfnsZuNAfg" name="BASE_ELEMENT">
- <eObjectValue xmi:type="uml:Interface" href="generatorconfiguration.uml#_zoA6sD4JEeux05jxrKZ5Sw"/>
+ <children xmi:type="notation:Shape" xmi:id="_d_1N_EBREeugb8n0tn-ypw" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_d_1N_UBREeugb8n0tn-ypw"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_d_1N_0BREeugb8n0tn-ypw" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:PrimitiveType" href="generatorconfiguration.uml#_bH3iUEBREeugb8n0tn-ypw"/>
</styles>
<element xsi:nil="true"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_liSHYj4PEeuntfnsZuNAfg" x="-980" y="700"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_d_1N_kBREeugb8n0tn-ypw" x="-800" y="700"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_DkmP0EBSEeugb8n0tn-ypw" type="PrimitiveType_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_DkmP0kBSEeugb8n0tn-ypw" type="PrimitiveType_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Dkm24EBSEeugb8n0tn-ypw" type="PrimitiveType_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Dkm24UBSEeugb8n0tn-ypw" y="15"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_Dkm24kBSEeugb8n0tn-ypw" type="PrimitiveType_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Dkm240BSEeugb8n0tn-ypw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Dkm25EBSEeugb8n0tn-ypw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Dkm25UBSEeugb8n0tn-ypw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Dkm25kBSEeugb8n0tn-ypw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_Dkm250BSEeugb8n0tn-ypw" type="PrimitiveType_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Dkm26EBSEeugb8n0tn-ypw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Dkm26UBSEeugb8n0tn-ypw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Dkm26kBSEeugb8n0tn-ypw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Dkm260BSEeugb8n0tn-ypw"/>
+ </children>
+ <element xmi:type="uml:PrimitiveType" href="generatorconfiguration.uml#_DkkaoEBSEeugb8n0tn-ypw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DkmP0UBSEeugb8n0tn-ypw" x="-1080" y="700"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_GqtFKEBSEeugb8n0tn-ypw" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GqtFKUBSEeugb8n0tn-ypw"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_GqtsMEBSEeugb8n0tn-ypw" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:PrimitiveType" href="generatorconfiguration.uml#_DkkaoEBSEeugb8n0tn-ypw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GqtFKkBSEeugb8n0tn-ypw" x="-640" y="720"/>
</children>
<styles xmi:type="notation:StringValueStyle" xmi:id="_5_7tcU1aEemE05tA7eq89g" name="diagram_compatibility_version" stringValue="1.4.0"/>
<styles xmi:type="notation:DiagramStyle" xmi:id="_5_7tck1aEemE05tA7eq89g"/>
@@ -500,14 +533,24 @@
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="__c4DIF91EemxcMQajU1fyA" id="(0.0,0.28368794326241137)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="__c4DIV91EemxcMQajU1fyA" id="(0.0,0.49586776859504134)"/>
</edges>
- <edges xmi:type="notation:Connector" xmi:id="_liSHZD4PEeuntfnsZuNAfg" type="StereotypeCommentLink" source="_zoCI0D4JEeux05jxrKZ5Sw" target="_liSHYD4PEeuntfnsZuNAfg">
- <styles xmi:type="notation:FontStyle" xmi:id="_liSHZT4PEeuntfnsZuNAfg"/>
- <styles xmi:type="notation:EObjectValueStyle" xmi:id="_liSHaT4PEeuntfnsZuNAfg" name="BASE_ELEMENT">
- <eObjectValue xmi:type="uml:Interface" href="generatorconfiguration.uml#_zoA6sD4JEeux05jxrKZ5Sw"/>
+ <edges xmi:type="notation:Connector" xmi:id="_d_11AEBREeugb8n0tn-ypw" type="StereotypeCommentLink" source="_bH4wcEBREeugb8n0tn-ypw" target="_d_1N_EBREeugb8n0tn-ypw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_d_11AUBREeugb8n0tn-ypw"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_d_11BUBREeugb8n0tn-ypw" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:PrimitiveType" href="generatorconfiguration.uml#_bH3iUEBREeugb8n0tn-ypw"/>
</styles>
<element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_liSHZj4PEeuntfnsZuNAfg" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_liSHZz4PEeuntfnsZuNAfg"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_liSHaD4PEeuntfnsZuNAfg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_d_11AkBREeugb8n0tn-ypw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_d_11A0BREeugb8n0tn-ypw"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_d_11BEBREeugb8n0tn-ypw"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_GqtsMUBSEeugb8n0tn-ypw" type="StereotypeCommentLink" source="_DkmP0EBSEeugb8n0tn-ypw" target="_GqtFKEBSEeugb8n0tn-ypw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_GqtsMkBSEeugb8n0tn-ypw"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_GqtsNkBSEeugb8n0tn-ypw" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:PrimitiveType" href="generatorconfiguration.uml#_DkkaoEBSEeugb8n0tn-ypw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_GqtsM0BSEeugb8n0tn-ypw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_GqtsNEBSEeugb8n0tn-ypw"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_GqtsNUBSEeugb8n0tn-ypw"/>
</edges>
</notation:Diagram>
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.uml b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.uml
index feeca13..76babf9 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.uml
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/model/generatorconfiguration.uml
@@ -13,6 +13,15 @@
</ownedComment>
<generalization xmi:type="uml:Generalization" xmi:id="_MWW50FCKEemNlsOH2YnpzQ" general="_5Tg7AFCJEemNlsOH2YnpzQ"/>
<interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_oKUnoFCYEemNlsOH2YnpzQ" client="_TQ7eUE1gEemE05tA7eq89g" supplier="_cN08EFB6EemNlsOH2YnpzQ" contract="_cN08EFB6EemNlsOH2YnpzQ"/>
+ <ownedOperation xmi:type="uml:Operation" xmi:id="_J78tEEBKEeugb8n0tn-ypw" name="createTemplateFileURL" redefinedOperation="_rfhm4EBJEeugb8n0tn-ypw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_i2WVIEBKEeugb8n0tn-ypw" source="http://www.eclipse.org/emf/2002/GenModel">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_joNP4EBKEeugb8n0tn-ypw" key="body" value="return org.eclipse.papyrus.model2doc.core.generatorconfiguration.internal.operations.DefaultDocumentGeneratorConfigurationOperations.createTemplateFileURL(this);"/>
+ </eAnnotations>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_J78tEUBKEeugb8n0tn-ypw" annotatedElement="_J78tEEBKEeugb8n0tn-ypw">
+ <body>Create a java.net.URL to access to the template or null if it don't exist.</body>
+ </ownedComment>
+ <ownedParameter xmi:type="uml:Parameter" xmi:id="_J78tEkBKEeugb8n0tn-ypw" name="return" type="_bH3iUEBREeugb8n0tn-ypw" direction="return"/>
+ </ownedOperation>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_PyJqUE1gEemE05tA7eq89g" name="AbstractDocumentStructureGeneratorConfiguration" isAbstract="true">
<ownedComment xmi:type="uml:Comment" xmi:id="_U0gyIE16EemE05tA7eq89g" annotatedElement="_P3A9IFCKEemNlsOH2YnpzQ">
@@ -62,6 +71,12 @@
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#EString"/>
</ownedParameter>
</ownedOperation>
+ <ownedOperation xmi:type="uml:Operation" xmi:id="_rfhm4EBJEeugb8n0tn-ypw" name="createTemplateFileURL">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_En9D4EBKEeugb8n0tn-ypw" annotatedElement="_rfhm4EBJEeugb8n0tn-ypw">
+ <body>Create a java.net.URL to access to the template or null if it don't exist.</body>
+ </ownedComment>
+ <ownedParameter xmi:type="uml:Parameter" xmi:id="_96EPkEBJEeugb8n0tn-ypw" name="return" type="_bH3iUEBREeugb8n0tn-ypw" direction="return"/>
+ </ownedOperation>
</packagedElement>
<packagedElement xmi:type="uml:Interface" xmi:id="_fUlRoFB6EemNlsOH2YnpzQ" name="IDocumentStructureGeneratorConfiguration">
<ownedComment xmi:type="uml:Comment" xmi:id="_0_5HgFB6EemNlsOH2YnpzQ" annotatedElement="_fUlRoFB6EemNlsOH2YnpzQ">
@@ -107,7 +122,7 @@
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#EString"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="_zmVqQD4KEeux05jxrKZ5Sw"/>
</ownedParameter>
- <ownedParameter xmi:type="uml:Parameter" xmi:id="_U5J2ID4IEeufs8vjtFQYVQ" name="URI" type="_zoA6sD4JEeux05jxrKZ5Sw" direction="return"/>
+ <ownedParameter xmi:type="uml:Parameter" xmi:id="_U5J2ID4IEeufs8vjtFQYVQ" name="URI" type="_DkkaoEBSEeugb8n0tn-ypw" direction="return"/>
</ownedOperation>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_5Tg7AFCJEemNlsOH2YnpzQ" name="AbstractDocumentGeneratorConfiguration" isAbstract="true">
@@ -182,7 +197,7 @@
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/EcorePrimitiveTypes.library.uml#EString"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="_PwhoFj4LEeux05jxrKZ5Sw"/>
</ownedParameter>
- <ownedParameter xmi:type="uml:Parameter" xmi:id="_PwhoFz4LEeux05jxrKZ5Sw" name="URI" type="_zoA6sD4JEeux05jxrKZ5Sw" direction="return"/>
+ <ownedParameter xmi:type="uml:Parameter" xmi:id="_PwhoFz4LEeux05jxrKZ5Sw" name="URI" type="_DkkaoEBSEeugb8n0tn-ypw" direction="return"/>
</ownedOperation>
<ownedOperation xmi:type="uml:Operation" xmi:id="_fWRjAD4NEeux05jxrKZ5Sw" name="createDocumentGeneratorConfiguration" redefinedOperation="_Y7WrsE16EemE05tA7eq89g">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ioZbED4NEeux05jxrKZ5Sw" source="http://www.eclipse.org/emf/2002/GenModel">
@@ -219,7 +234,8 @@
</ownedParameter>
</ownedOperation>
</packagedElement>
- <packagedElement xmi:type="uml:Interface" xmi:id="_zoA6sD4JEeux05jxrKZ5Sw" name="URI"/>
+ <packagedElement xmi:type="uml:PrimitiveType" xmi:id="_bH3iUEBREeugb8n0tn-ypw" name="URL"/>
+ <packagedElement xmi:type="uml:PrimitiveType" xmi:id="_DkkaoEBSEeugb8n0tn-ypw" name="URI"/>
<profileApplication xmi:type="uml:ProfileApplication" xmi:id="_ttYQgE13EemE05tA7eq89g">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ttiBgE13EemE05tA7eq89g" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
@@ -228,5 +244,6 @@
</profileApplication>
</uml:Model>
<Ecore:EPackage xmi:id="_Cv3EcE17EemE05tA7eq89g" base_Package="_sirwEE1YEem_xbrXUzuwJg" packageName="generatorconfiguration" nsPrefix="generatorconfiguration" basePackage="org.eclipse.papyrus.model2doc.core" prefix="GeneratorConfiguration"/>
- <Ecore:EClass xmi:id="_7OJloD4JEeux05jxrKZ5Sw" instanceClassName="org.eclipse.emf.common.util.URI" base_Interface="_zoA6sD4JEeux05jxrKZ5Sw" className="URI"/>
+ <Ecore:EDataType xmi:id="_dpysgEBREeugb8n0tn-ypw" instanceClassName="java.net.URL" base_PrimitiveType="_bH3iUEBREeugb8n0tn-ypw" dataTypeName="URL"/>
+ <Ecore:EDataType xmi:id="_GSq_oEBSEeugb8n0tn-ypw" instanceClassName="org.eclipse.emf.common.util.URI" base_PrimitiveType="_DkkaoEBSEeugb8n0tn-ypw" dataTypeName="URI"/>
</xmi:XMI>
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/DefaultDocumentGeneratorConfiguration.java b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/DefaultDocumentGeneratorConfiguration.java
index 8c9e6f7..6edac27 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/DefaultDocumentGeneratorConfiguration.java
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/DefaultDocumentGeneratorConfiguration.java
@@ -26,7 +26,7 @@
*
*
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.GeneratorConfigurationPackage#getDefaultDocumentGeneratorConfiguration()
- * @model
+ * @model annotation="duplicates"
* @generated
*/
public interface DefaultDocumentGeneratorConfiguration extends AbstractDocumentGeneratorConfiguration, IDocumentGeneratorConfiguration {
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/GeneratorConfigurationPackage.java b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/GeneratorConfigurationPackage.java
index e4aac2c..67a694c 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/GeneratorConfigurationPackage.java
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/GeneratorConfigurationPackage.java
@@ -15,6 +15,7 @@
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.EPackage;
@@ -30,7 +31,7 @@
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.GeneratorConfigurationFactory
* @model kind="package"
* annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='GeneratorConfiguration'"
@@ -41,7 +42,7 @@
* The package name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
String eNAME = "generatorconfiguration"; //$NON-NLS-1$
@@ -50,7 +51,7 @@
* The package namespace URI.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
String eNS_URI = "http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration"; //$NON-NLS-1$
@@ -59,7 +60,7 @@
* The package namespace name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
String eNS_PREFIX = "generatorconfiguration"; //$NON-NLS-1$
@@ -68,7 +69,7 @@
* The singleton instance of the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
GeneratorConfigurationPackage eINSTANCE = org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl.init();
@@ -77,7 +78,7 @@
* The meta object id for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IGeneratorConfiguration <em>IGenerator Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IGeneratorConfiguration
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getIGeneratorConfiguration()
* @generated
@@ -88,7 +89,7 @@
* The number of structural features of the '<em>IGenerator Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -98,7 +99,7 @@
* The operation id for the '<em>Get Document Name</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -108,7 +109,7 @@
* The operation id for the '<em>Get Document Folder</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -118,7 +119,7 @@
* The operation id for the '<em>Get Document Generator Id</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -128,7 +129,7 @@
* The operation id for the '<em>Set Document Name</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -138,7 +139,7 @@
* The number of operations of the '<em>IGenerator Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -148,7 +149,7 @@
* The meta object id for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.AbstractDocumentGeneratorConfigurationImpl <em>Abstract Document Generator Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.AbstractDocumentGeneratorConfigurationImpl
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getAbstractDocumentGeneratorConfiguration()
* @generated
@@ -159,7 +160,7 @@
* The feature id for the '<em><b>Save Document Structure</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -169,7 +170,7 @@
* The feature id for the '<em><b>Save Images</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -179,7 +180,7 @@
* The feature id for the '<em><b>Template File</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -189,7 +190,7 @@
* The feature id for the '<em><b>Document Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -199,7 +200,7 @@
* The feature id for the '<em><b>Document Folder</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -209,7 +210,7 @@
* The feature id for the '<em><b>Document Generator Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -219,7 +220,7 @@
* The number of structural features of the '<em>Abstract Document Generator Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -229,7 +230,7 @@
* The operation id for the '<em>Get Document Name</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -239,7 +240,7 @@
* The operation id for the '<em>Get Document Folder</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -249,7 +250,7 @@
* The operation id for the '<em>Get Document Generator Id</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -259,7 +260,7 @@
* The operation id for the '<em>Set Document Name</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -269,7 +270,7 @@
* The number of operations of the '<em>Abstract Document Generator Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -279,7 +280,7 @@
* The meta object id for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.AbstractDocumentStructureGeneratorConfigurationImpl <em>Abstract Document Structure Generator Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.AbstractDocumentStructureGeneratorConfigurationImpl
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getAbstractDocumentStructureGeneratorConfiguration()
* @generated
@@ -290,7 +291,7 @@
* The feature id for the '<em><b>Save Document Structure</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -300,7 +301,7 @@
* The feature id for the '<em><b>Save Images</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -310,7 +311,7 @@
* The feature id for the '<em><b>Template File</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -320,7 +321,7 @@
* The feature id for the '<em><b>Document Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -330,7 +331,7 @@
* The feature id for the '<em><b>Document Folder</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -340,7 +341,7 @@
* The feature id for the '<em><b>Document Generator Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -350,7 +351,7 @@
* The feature id for the '<em><b>Structure Generator Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -360,7 +361,7 @@
* The feature id for the '<em><b>Image Folder</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -370,7 +371,7 @@
* The feature id for the '<em><b>Structure Folder</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -380,7 +381,7 @@
* The number of structural features of the '<em>Abstract Document Structure Generator Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -390,7 +391,7 @@
* The operation id for the '<em>Get Document Name</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -400,7 +401,7 @@
* The operation id for the '<em>Get Document Folder</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -410,7 +411,7 @@
* The operation id for the '<em>Get Document Generator Id</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -420,7 +421,7 @@
* The operation id for the '<em>Set Document Name</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -430,7 +431,7 @@
* The number of operations of the '<em>Abstract Document Structure Generator Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -440,7 +441,7 @@
* The meta object id for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.DefaultDocumentStructureGeneratorConfigurationImpl <em>Default Document Structure Generator Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.DefaultDocumentStructureGeneratorConfigurationImpl
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getDefaultDocumentStructureGeneratorConfiguration()
* @generated
@@ -451,7 +452,7 @@
* The feature id for the '<em><b>Save Document Structure</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -461,7 +462,7 @@
* The feature id for the '<em><b>Save Images</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -471,7 +472,7 @@
* The feature id for the '<em><b>Template File</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -481,7 +482,7 @@
* The feature id for the '<em><b>Document Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -491,7 +492,7 @@
* The feature id for the '<em><b>Document Folder</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -501,7 +502,7 @@
* The feature id for the '<em><b>Document Generator Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -511,7 +512,7 @@
* The feature id for the '<em><b>Structure Generator Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -521,7 +522,7 @@
* The feature id for the '<em><b>Image Folder</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -531,7 +532,7 @@
* The feature id for the '<em><b>Structure Folder</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -541,7 +542,7 @@
* The number of structural features of the '<em>Default Document Structure Generator Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -551,7 +552,7 @@
* The operation id for the '<em>Get Document Name</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -561,7 +562,7 @@
* The operation id for the '<em>Get Document Folder</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -571,7 +572,7 @@
* The operation id for the '<em>Get Document Generator Id</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -581,7 +582,7 @@
* The operation id for the '<em>Set Document Name</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -591,7 +592,7 @@
* The operation id for the '<em>Create Document Generator Configuration</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -601,7 +602,7 @@
* The operation id for the '<em>Get Structure Generator Id</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -611,7 +612,7 @@
* The operation id for the '<em>Get Image Folder</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -621,7 +622,7 @@
* The operation id for the '<em>Get Structure Folder</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -631,7 +632,7 @@
* The operation id for the '<em>Create Document Structure URI</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -641,7 +642,7 @@
* The number of operations of the '<em>Default Document Structure Generator Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -651,7 +652,7 @@
* The meta object id for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration <em>IDocument Structure Generator Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getIDocumentStructureGeneratorConfiguration()
* @generated
@@ -662,7 +663,7 @@
* The meta object id for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration <em>IDocument Generator Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getIDocumentGeneratorConfiguration()
* @generated
@@ -670,21 +671,21 @@
int IDOCUMENT_GENERATOR_CONFIGURATION = 5;
/**
- * The meta object id for the '{@link org.eclipse.emf.common.util.URI <em>URI</em>}' class.
+ * The meta object id for the '<em>URI</em>' data type.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.emf.common.util.URI
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getURI()
* @generated
*/
- int URI = 6;
+ int URI = 8;
/**
* The number of structural features of the '<em>IDocument Structure Generator Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -694,7 +695,7 @@
* The operation id for the '<em>Get Document Name</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -704,7 +705,7 @@
* The operation id for the '<em>Get Document Folder</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -714,7 +715,7 @@
* The operation id for the '<em>Get Document Generator Id</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -724,7 +725,7 @@
* The operation id for the '<em>Set Document Name</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -734,7 +735,7 @@
* The operation id for the '<em>Create Document Generator Configuration</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -744,7 +745,7 @@
* The operation id for the '<em>Get Structure Generator Id</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -754,7 +755,7 @@
* The operation id for the '<em>Get Image Folder</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -764,7 +765,7 @@
* The operation id for the '<em>Get Structure Folder</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -774,7 +775,7 @@
* The operation id for the '<em>Create Document Structure URI</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -784,7 +785,7 @@
* The number of operations of the '<em>IDocument Structure Generator Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -794,7 +795,7 @@
* The number of structural features of the '<em>IDocument Generator Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -804,7 +805,7 @@
* The operation id for the '<em>Get Document Name</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -814,7 +815,7 @@
* The operation id for the '<em>Get Document Folder</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -824,7 +825,7 @@
* The operation id for the '<em>Get Document Generator Id</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -834,7 +835,7 @@
* The operation id for the '<em>Set Document Name</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -844,7 +845,7 @@
* The operation id for the '<em>Is Save Document Structure</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -854,7 +855,7 @@
* The operation id for the '<em>Is Save Images</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -864,58 +865,48 @@
* The operation id for the '<em>Get Template File</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
int IDOCUMENT_GENERATOR_CONFIGURATION___GET_TEMPLATE_FILE = IGENERATOR_CONFIGURATION_OPERATION_COUNT + 2;
/**
+ * The operation id for the '<em>Create Template File URL</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int IDOCUMENT_GENERATOR_CONFIGURATION___CREATE_TEMPLATE_FILE_URL = IGENERATOR_CONFIGURATION_OPERATION_COUNT + 3;
+
+ /**
* The number of operations of the '<em>IDocument Generator Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int IDOCUMENT_GENERATOR_CONFIGURATION_OPERATION_COUNT = IGENERATOR_CONFIGURATION_OPERATION_COUNT + 3;
-
- /**
- * The number of structural features of the '<em>URI</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int URI_FEATURE_COUNT = 0;
-
- /**
- * The number of operations of the '<em>URI</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int URI_OPERATION_COUNT = 0;
+ int IDOCUMENT_GENERATOR_CONFIGURATION_OPERATION_COUNT = IGENERATOR_CONFIGURATION_OPERATION_COUNT + 4;
/**
* The meta object id for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.DefaultDocumentGeneratorConfigurationImpl <em>Default Document Generator Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.DefaultDocumentGeneratorConfigurationImpl
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getDefaultDocumentGeneratorConfiguration()
* @generated
*/
- int DEFAULT_DOCUMENT_GENERATOR_CONFIGURATION = 7;
+ int DEFAULT_DOCUMENT_GENERATOR_CONFIGURATION = 6;
/**
* The feature id for the '<em><b>Save Document Structure</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -925,7 +916,7 @@
* The feature id for the '<em><b>Save Images</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -935,7 +926,7 @@
* The feature id for the '<em><b>Template File</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -945,7 +936,7 @@
* The feature id for the '<em><b>Document Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -955,7 +946,7 @@
* The feature id for the '<em><b>Document Folder</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -965,7 +956,7 @@
* The feature id for the '<em><b>Document Generator Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -975,7 +966,7 @@
* The number of structural features of the '<em>Default Document Generator Configuration</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -985,7 +976,7 @@
* The operation id for the '<em>Get Document Name</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -995,7 +986,7 @@
* The operation id for the '<em>Get Document Folder</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -1005,7 +996,7 @@
* The operation id for the '<em>Get Document Generator Id</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -1015,7 +1006,7 @@
* The operation id for the '<em>Set Document Name</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -1025,7 +1016,7 @@
* The operation id for the '<em>Is Save Document Structure</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -1035,7 +1026,7 @@
* The operation id for the '<em>Is Save Images</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
@@ -1045,28 +1036,50 @@
* The operation id for the '<em>Get Template File</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
int DEFAULT_DOCUMENT_GENERATOR_CONFIGURATION___GET_TEMPLATE_FILE = ABSTRACT_DOCUMENT_GENERATOR_CONFIGURATION_OPERATION_COUNT + 2;
/**
- * The number of operations of the '<em>Default Document Generator Configuration</em>' class.
+ * The operation id for the '<em>Create Template File URL</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
* @ordered
*/
- int DEFAULT_DOCUMENT_GENERATOR_CONFIGURATION_OPERATION_COUNT = ABSTRACT_DOCUMENT_GENERATOR_CONFIGURATION_OPERATION_COUNT + 3;
+ int DEFAULT_DOCUMENT_GENERATOR_CONFIGURATION___CREATE_TEMPLATE_FILE_URL = ABSTRACT_DOCUMENT_GENERATOR_CONFIGURATION_OPERATION_COUNT + 3;
+
+ /**
+ * The number of operations of the '<em>Default Document Generator Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DEFAULT_DOCUMENT_GENERATOR_CONFIGURATION_OPERATION_COUNT = ABSTRACT_DOCUMENT_GENERATOR_CONFIGURATION_OPERATION_COUNT + 4;
+
+
+ /**
+ * The meta object id for the '<em>URL</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see java.net.URL
+ * @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getURL()
+ * @generated
+ */
+ int URL = 7;
/**
* Returns the meta object for class '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.DefaultDocumentStructureGeneratorConfiguration <em>Default Document Structure Generator Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Default Document Structure Generator Configuration</em>'.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.DefaultDocumentStructureGeneratorConfiguration
* @generated
@@ -1077,7 +1090,7 @@
* Returns the meta object for class '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentStructureGeneratorConfiguration <em>Abstract Document Structure Generator Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Abstract Document Structure Generator Configuration</em>'.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentStructureGeneratorConfiguration
* @generated
@@ -1088,7 +1101,7 @@
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentStructureGeneratorConfiguration#getStructureGeneratorId <em>Structure Generator Id</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Structure Generator Id</em>'.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentStructureGeneratorConfiguration#getStructureGeneratorId()
* @see #getAbstractDocumentStructureGeneratorConfiguration()
@@ -1100,7 +1113,7 @@
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentStructureGeneratorConfiguration#getImageFolder <em>Image Folder</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Image Folder</em>'.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentStructureGeneratorConfiguration#getImageFolder()
* @see #getAbstractDocumentStructureGeneratorConfiguration()
@@ -1112,7 +1125,7 @@
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentStructureGeneratorConfiguration#getStructureFolder <em>Structure Folder</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Structure Folder</em>'.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentStructureGeneratorConfiguration#getStructureFolder()
* @see #getAbstractDocumentStructureGeneratorConfiguration()
@@ -1124,7 +1137,7 @@
* Returns the meta object for class '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentGeneratorConfiguration <em>Abstract Document Generator Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Abstract Document Generator Configuration</em>'.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentGeneratorConfiguration
* @generated
@@ -1135,7 +1148,7 @@
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentGeneratorConfiguration#isSaveDocumentStructure <em>Save Document Structure</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Save Document Structure</em>'.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentGeneratorConfiguration#isSaveDocumentStructure()
* @see #getAbstractDocumentGeneratorConfiguration()
@@ -1147,7 +1160,7 @@
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentGeneratorConfiguration#isSaveImages <em>Save Images</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Save Images</em>'.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentGeneratorConfiguration#isSaveImages()
* @see #getAbstractDocumentGeneratorConfiguration()
@@ -1159,7 +1172,7 @@
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentGeneratorConfiguration#getTemplateFile <em>Template File</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Template File</em>'.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentGeneratorConfiguration#getTemplateFile()
* @see #getAbstractDocumentGeneratorConfiguration()
@@ -1171,7 +1184,7 @@
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentGeneratorConfiguration#getDocumentName <em>Document Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Document Name</em>'.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentGeneratorConfiguration#getDocumentName()
* @see #getAbstractDocumentGeneratorConfiguration()
@@ -1183,7 +1196,7 @@
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentGeneratorConfiguration#getDocumentFolder <em>Document Folder</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Document Folder</em>'.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentGeneratorConfiguration#getDocumentFolder()
* @see #getAbstractDocumentGeneratorConfiguration()
@@ -1195,7 +1208,7 @@
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentGeneratorConfiguration#getDocumentGeneratorId <em>Document Generator Id</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the attribute '<em>Document Generator Id</em>'.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentGeneratorConfiguration#getDocumentGeneratorId()
* @see #getAbstractDocumentGeneratorConfiguration()
@@ -1207,7 +1220,7 @@
* Returns the meta object for class '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IGeneratorConfiguration <em>IGenerator Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>IGenerator Configuration</em>'.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IGeneratorConfiguration
* @generated
@@ -1218,7 +1231,7 @@
* Returns the meta object for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IGeneratorConfiguration#getDocumentName() <em>Get Document Name</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the '<em>Get Document Name</em>' operation.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IGeneratorConfiguration#getDocumentName()
* @generated
@@ -1229,7 +1242,7 @@
* Returns the meta object for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IGeneratorConfiguration#getDocumentFolder() <em>Get Document Folder</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the '<em>Get Document Folder</em>' operation.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IGeneratorConfiguration#getDocumentFolder()
* @generated
@@ -1240,7 +1253,7 @@
* Returns the meta object for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IGeneratorConfiguration#getDocumentGeneratorId() <em>Get Document Generator Id</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the '<em>Get Document Generator Id</em>' operation.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IGeneratorConfiguration#getDocumentGeneratorId()
* @generated
@@ -1251,7 +1264,7 @@
* Returns the meta object for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IGeneratorConfiguration#setDocumentName(java.lang.String) <em>Set Document Name</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the '<em>Set Document Name</em>' operation.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IGeneratorConfiguration#setDocumentName(java.lang.String)
* @generated
@@ -1262,7 +1275,7 @@
* Returns the meta object for class '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration <em>IDocument Structure Generator Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>IDocument Structure Generator Configuration</em>'.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration
* @generated
@@ -1273,7 +1286,7 @@
* Returns the meta object for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration#createDocumentGeneratorConfiguration() <em>Create Document Generator Configuration</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the '<em>Create Document Generator Configuration</em>' operation.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration#createDocumentGeneratorConfiguration()
* @generated
@@ -1284,7 +1297,7 @@
* Returns the meta object for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration#getStructureGeneratorId() <em>Get Structure Generator Id</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the '<em>Get Structure Generator Id</em>' operation.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration#getStructureGeneratorId()
* @generated
@@ -1295,7 +1308,7 @@
* Returns the meta object for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration#getImageFolder() <em>Get Image Folder</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the '<em>Get Image Folder</em>' operation.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration#getImageFolder()
* @generated
@@ -1306,7 +1319,7 @@
* Returns the meta object for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration#getStructureFolder() <em>Get Structure Folder</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the '<em>Get Structure Folder</em>' operation.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration#getStructureFolder()
* @generated
@@ -1317,7 +1330,7 @@
* Returns the meta object for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration#createDocumentStructureURI(java.lang.String, java.lang.String) <em>Create Document Structure URI</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the '<em>Create Document Structure URI</em>' operation.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration#createDocumentStructureURI(java.lang.String, java.lang.String)
* @generated
@@ -1328,7 +1341,7 @@
* Returns the meta object for class '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration <em>IDocument Generator Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>IDocument Generator Configuration</em>'.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration
* @generated
@@ -1339,7 +1352,7 @@
* Returns the meta object for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration#isSaveDocumentStructure() <em>Is Save Document Structure</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the '<em>Is Save Document Structure</em>' operation.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration#isSaveDocumentStructure()
* @generated
@@ -1350,7 +1363,7 @@
* Returns the meta object for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration#isSaveImages() <em>Is Save Images</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the '<em>Is Save Images</em>' operation.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration#isSaveImages()
* @generated
@@ -1361,7 +1374,7 @@
* Returns the meta object for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration#getTemplateFile() <em>Get Template File</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for the '<em>Get Template File</em>' operation.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration#getTemplateFile()
* @generated
@@ -1369,22 +1382,33 @@
EOperation getIDocumentGeneratorConfiguration__GetTemplateFile();
/**
- * Returns the meta object for class '{@link org.eclipse.emf.common.util.URI <em>URI</em>}'.
+ * Returns the meta object for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration#createTemplateFileURL() <em>Create Template File URL</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>URI</em>'.
+ *
+ * @return the meta object for the '<em>Create Template File URL</em>' operation.
+ * @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration#createTemplateFileURL()
+ * @generated
+ */
+ EOperation getIDocumentGeneratorConfiguration__CreateTemplateFileURL();
+
+ /**
+ * Returns the meta object for data type '{@link org.eclipse.emf.common.util.URI <em>URI</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for data type '<em>URI</em>'.
* @see org.eclipse.emf.common.util.URI
* @model instanceClass="org.eclipse.emf.common.util.URI"
* @generated
*/
- EClass getURI();
+ EDataType getURI();
/**
* Returns the meta object for class '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.DefaultDocumentGeneratorConfiguration <em>Default Document Generator Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the meta object for class '<em>Default Document Generator Configuration</em>'.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.DefaultDocumentGeneratorConfiguration
* @generated
@@ -1392,10 +1416,22 @@
EClass getDefaultDocumentGeneratorConfiguration();
/**
+ * Returns the meta object for data type '{@link java.net.URL <em>URL</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for data type '<em>URL</em>'.
+ * @see java.net.URL
+ * @model instanceClass="java.net.URL"
+ * @generated
+ */
+ EDataType getURL();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the factory that creates the instances of the model.
* @generated
*/
@@ -1412,7 +1448,7 @@
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
interface Literals {
@@ -1420,7 +1456,7 @@
* The meta object literal for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.DefaultDocumentStructureGeneratorConfigurationImpl <em>Default Document Structure Generator Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.DefaultDocumentStructureGeneratorConfigurationImpl
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getDefaultDocumentStructureGeneratorConfiguration()
* @generated
@@ -1431,7 +1467,7 @@
* The meta object literal for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.AbstractDocumentStructureGeneratorConfigurationImpl <em>Abstract Document Structure Generator Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.AbstractDocumentStructureGeneratorConfigurationImpl
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getAbstractDocumentStructureGeneratorConfiguration()
* @generated
@@ -1442,7 +1478,7 @@
* The meta object literal for the '<em><b>Structure Generator Id</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EAttribute ABSTRACT_DOCUMENT_STRUCTURE_GENERATOR_CONFIGURATION__STRUCTURE_GENERATOR_ID = eINSTANCE.getAbstractDocumentStructureGeneratorConfiguration_StructureGeneratorId();
@@ -1451,7 +1487,7 @@
* The meta object literal for the '<em><b>Image Folder</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EAttribute ABSTRACT_DOCUMENT_STRUCTURE_GENERATOR_CONFIGURATION__IMAGE_FOLDER = eINSTANCE.getAbstractDocumentStructureGeneratorConfiguration_ImageFolder();
@@ -1460,7 +1496,7 @@
* The meta object literal for the '<em><b>Structure Folder</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EAttribute ABSTRACT_DOCUMENT_STRUCTURE_GENERATOR_CONFIGURATION__STRUCTURE_FOLDER = eINSTANCE.getAbstractDocumentStructureGeneratorConfiguration_StructureFolder();
@@ -1469,7 +1505,7 @@
* The meta object literal for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.AbstractDocumentGeneratorConfigurationImpl <em>Abstract Document Generator Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.AbstractDocumentGeneratorConfigurationImpl
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getAbstractDocumentGeneratorConfiguration()
* @generated
@@ -1480,7 +1516,7 @@
* The meta object literal for the '<em><b>Save Document Structure</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EAttribute ABSTRACT_DOCUMENT_GENERATOR_CONFIGURATION__SAVE_DOCUMENT_STRUCTURE = eINSTANCE.getAbstractDocumentGeneratorConfiguration_SaveDocumentStructure();
@@ -1489,7 +1525,7 @@
* The meta object literal for the '<em><b>Save Images</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EAttribute ABSTRACT_DOCUMENT_GENERATOR_CONFIGURATION__SAVE_IMAGES = eINSTANCE.getAbstractDocumentGeneratorConfiguration_SaveImages();
@@ -1498,7 +1534,7 @@
* The meta object literal for the '<em><b>Template File</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EAttribute ABSTRACT_DOCUMENT_GENERATOR_CONFIGURATION__TEMPLATE_FILE = eINSTANCE.getAbstractDocumentGeneratorConfiguration_TemplateFile();
@@ -1507,7 +1543,7 @@
* The meta object literal for the '<em><b>Document Name</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EAttribute ABSTRACT_DOCUMENT_GENERATOR_CONFIGURATION__DOCUMENT_NAME = eINSTANCE.getAbstractDocumentGeneratorConfiguration_DocumentName();
@@ -1516,7 +1552,7 @@
* The meta object literal for the '<em><b>Document Folder</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EAttribute ABSTRACT_DOCUMENT_GENERATOR_CONFIGURATION__DOCUMENT_FOLDER = eINSTANCE.getAbstractDocumentGeneratorConfiguration_DocumentFolder();
@@ -1525,7 +1561,7 @@
* The meta object literal for the '<em><b>Document Generator Id</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EAttribute ABSTRACT_DOCUMENT_GENERATOR_CONFIGURATION__DOCUMENT_GENERATOR_ID = eINSTANCE.getAbstractDocumentGeneratorConfiguration_DocumentGeneratorId();
@@ -1534,7 +1570,7 @@
* The meta object literal for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IGeneratorConfiguration <em>IGenerator Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IGeneratorConfiguration
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getIGeneratorConfiguration()
* @generated
@@ -1545,7 +1581,7 @@
* The meta object literal for the '<em><b>Get Document Name</b></em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EOperation IGENERATOR_CONFIGURATION___GET_DOCUMENT_NAME = eINSTANCE.getIGeneratorConfiguration__GetDocumentName();
@@ -1554,7 +1590,7 @@
* The meta object literal for the '<em><b>Get Document Folder</b></em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EOperation IGENERATOR_CONFIGURATION___GET_DOCUMENT_FOLDER = eINSTANCE.getIGeneratorConfiguration__GetDocumentFolder();
@@ -1563,7 +1599,7 @@
* The meta object literal for the '<em><b>Get Document Generator Id</b></em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EOperation IGENERATOR_CONFIGURATION___GET_DOCUMENT_GENERATOR_ID = eINSTANCE.getIGeneratorConfiguration__GetDocumentGeneratorId();
@@ -1572,7 +1608,7 @@
* The meta object literal for the '<em><b>Set Document Name</b></em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EOperation IGENERATOR_CONFIGURATION___SET_DOCUMENT_NAME__STRING = eINSTANCE.getIGeneratorConfiguration__SetDocumentName__String();
@@ -1581,7 +1617,7 @@
* The meta object literal for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration <em>IDocument Structure Generator Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getIDocumentStructureGeneratorConfiguration()
* @generated
@@ -1592,7 +1628,7 @@
* The meta object literal for the '<em><b>Create Document Generator Configuration</b></em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EOperation IDOCUMENT_STRUCTURE_GENERATOR_CONFIGURATION___CREATE_DOCUMENT_GENERATOR_CONFIGURATION = eINSTANCE.getIDocumentStructureGeneratorConfiguration__CreateDocumentGeneratorConfiguration();
@@ -1601,7 +1637,7 @@
* The meta object literal for the '<em><b>Get Structure Generator Id</b></em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EOperation IDOCUMENT_STRUCTURE_GENERATOR_CONFIGURATION___GET_STRUCTURE_GENERATOR_ID = eINSTANCE.getIDocumentStructureGeneratorConfiguration__GetStructureGeneratorId();
@@ -1610,7 +1646,7 @@
* The meta object literal for the '<em><b>Get Image Folder</b></em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EOperation IDOCUMENT_STRUCTURE_GENERATOR_CONFIGURATION___GET_IMAGE_FOLDER = eINSTANCE.getIDocumentStructureGeneratorConfiguration__GetImageFolder();
@@ -1619,7 +1655,7 @@
* The meta object literal for the '<em><b>Get Structure Folder</b></em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EOperation IDOCUMENT_STRUCTURE_GENERATOR_CONFIGURATION___GET_STRUCTURE_FOLDER = eINSTANCE.getIDocumentStructureGeneratorConfiguration__GetStructureFolder();
@@ -1628,7 +1664,7 @@
* The meta object literal for the '<em><b>Create Document Structure URI</b></em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EOperation IDOCUMENT_STRUCTURE_GENERATOR_CONFIGURATION___CREATE_DOCUMENT_STRUCTURE_URI__STRING_STRING = eINSTANCE.getIDocumentStructureGeneratorConfiguration__CreateDocumentStructureURI__String_String();
@@ -1637,7 +1673,7 @@
* The meta object literal for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration <em>IDocument Generator Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getIDocumentGeneratorConfiguration()
* @generated
@@ -1648,7 +1684,7 @@
* The meta object literal for the '<em><b>Is Save Document Structure</b></em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EOperation IDOCUMENT_GENERATOR_CONFIGURATION___IS_SAVE_DOCUMENT_STRUCTURE = eINSTANCE.getIDocumentGeneratorConfiguration__IsSaveDocumentStructure();
@@ -1657,7 +1693,7 @@
* The meta object literal for the '<em><b>Is Save Images</b></em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EOperation IDOCUMENT_GENERATOR_CONFIGURATION___IS_SAVE_IMAGES = eINSTANCE.getIDocumentGeneratorConfiguration__IsSaveImages();
@@ -1666,33 +1702,53 @@
* The meta object literal for the '<em><b>Get Template File</b></em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
EOperation IDOCUMENT_GENERATOR_CONFIGURATION___GET_TEMPLATE_FILE = eINSTANCE.getIDocumentGeneratorConfiguration__GetTemplateFile();
/**
- * The meta object literal for the '{@link org.eclipse.emf.common.util.URI <em>URI</em>}' class.
+ * The meta object literal for the '<em><b>Create Template File URL</b></em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
+ * @generated
+ */
+ EOperation IDOCUMENT_GENERATOR_CONFIGURATION___CREATE_TEMPLATE_FILE_URL = eINSTANCE.getIDocumentGeneratorConfiguration__CreateTemplateFileURL();
+
+ /**
+ * The meta object literal for the '<em>URI</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
* @see org.eclipse.emf.common.util.URI
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getURI()
* @generated
*/
- EClass URI = eINSTANCE.getURI();
+ EDataType URI = eINSTANCE.getURI();
/**
* The meta object literal for the '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.DefaultDocumentGeneratorConfigurationImpl <em>Default Document Generator Configuration</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.DefaultDocumentGeneratorConfigurationImpl
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getDefaultDocumentGeneratorConfiguration()
* @generated
*/
EClass DEFAULT_DOCUMENT_GENERATOR_CONFIGURATION = eINSTANCE.getDefaultDocumentGeneratorConfiguration();
+ /**
+ * The meta object literal for the '<em>URL</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see java.net.URL
+ * @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl.GeneratorConfigurationPackageImpl#getURL()
+ * @generated
+ */
+ EDataType URL = eINSTANCE.getURL();
+
}
} // GeneratorConfigurationPackage
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/IDocumentGeneratorConfiguration.java b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/IDocumentGeneratorConfiguration.java
index fd8e83e..2fa8d75 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/IDocumentGeneratorConfiguration.java
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/IDocumentGeneratorConfiguration.java
@@ -13,6 +13,8 @@
*/
package org.eclipse.papyrus.model2doc.core.generatorconfiguration;
+import java.net.URL;
+
/**
* <!-- begin-user-doc -->
@@ -32,7 +34,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @model kind="operation" required="true" ordered="false"
* @generated
*/
@@ -41,7 +43,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @model kind="operation" required="true" ordered="false"
* @generated
*/
@@ -50,10 +52,22 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @model kind="operation" required="true" ordered="false"
* @generated
*/
String getTemplateFile();
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Create a java.net.URL to access to the template or null if it don't exist.
+ * <!-- end-model-doc -->
+ *
+ * @model dataType="org.eclipse.papyrus.model2doc.core.generatorconfiguration.URL" required="true" ordered="false"
+ * @generated
+ */
+ URL createTemplateFileURL();
+
} // IDocumentGeneratorConfiguration
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/IDocumentStructureGeneratorConfiguration.java b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/IDocumentStructureGeneratorConfiguration.java
index 9750b2f..1d0985b 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/IDocumentStructureGeneratorConfiguration.java
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/IDocumentStructureGeneratorConfiguration.java
@@ -82,7 +82,7 @@
* @param version
* Optional parameter. A string indicating the version of the document. This string will be a part of the file name.
* <!-- end-model-doc -->
- * @model type="org.eclipse.papyrus.model2doc.core.generatorconfiguration.URI" required="true" ordered="false" fileExtensionRequired="true" fileExtensionOrdered="false" versionOrdered="false"
+ * @model dataType="org.eclipse.papyrus.model2doc.core.generatorconfiguration.URI" required="true" ordered="false" fileExtensionRequired="true" fileExtensionOrdered="false" versionOrdered="false"
* @generated
*/
URI createDocumentStructureURI(String fileExtension, String version);
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/impl/DefaultDocumentGeneratorConfigurationImpl.java b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/impl/DefaultDocumentGeneratorConfigurationImpl.java
index ec6f4c5..0267719 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/impl/DefaultDocumentGeneratorConfigurationImpl.java
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/impl/DefaultDocumentGeneratorConfigurationImpl.java
@@ -13,10 +13,14 @@
*/
package org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URL;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.papyrus.model2doc.core.generatorconfiguration.DefaultDocumentGeneratorConfiguration;
import org.eclipse.papyrus.model2doc.core.generatorconfiguration.GeneratorConfigurationPackage;
+import org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration;
/**
* <!-- begin-user-doc -->
@@ -29,7 +33,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected DefaultDocumentGeneratorConfigurationImpl() {
@@ -39,7 +43,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -47,4 +51,55 @@
return GeneratorConfigurationPackage.Literals.DEFAULT_DOCUMENT_GENERATOR_CONFIGURATION;
}
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public URL createTemplateFileURL() {
+ return org.eclipse.papyrus.model2doc.core.generatorconfiguration.internal.operations.DefaultDocumentGeneratorConfigurationOperations.createTemplateFileURL(this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public int eDerivedOperationID(int baseOperationID, Class<?> baseClass) {
+ if (baseClass == IDocumentGeneratorConfiguration.class) {
+ switch (baseOperationID) {
+ case GeneratorConfigurationPackage.IDOCUMENT_GENERATOR_CONFIGURATION___IS_SAVE_DOCUMENT_STRUCTURE:
+ return GeneratorConfigurationPackage.DEFAULT_DOCUMENT_GENERATOR_CONFIGURATION___IS_SAVE_DOCUMENT_STRUCTURE;
+ case GeneratorConfigurationPackage.IDOCUMENT_GENERATOR_CONFIGURATION___IS_SAVE_IMAGES:
+ return GeneratorConfigurationPackage.DEFAULT_DOCUMENT_GENERATOR_CONFIGURATION___IS_SAVE_IMAGES;
+ case GeneratorConfigurationPackage.IDOCUMENT_GENERATOR_CONFIGURATION___GET_TEMPLATE_FILE:
+ return GeneratorConfigurationPackage.DEFAULT_DOCUMENT_GENERATOR_CONFIGURATION___GET_TEMPLATE_FILE;
+ case GeneratorConfigurationPackage.IDOCUMENT_GENERATOR_CONFIGURATION___CREATE_TEMPLATE_FILE_URL:
+ return GeneratorConfigurationPackage.DEFAULT_DOCUMENT_GENERATOR_CONFIGURATION___CREATE_TEMPLATE_FILE_URL;
+ default:
+ return -1;
+ }
+ }
+ return super.eDerivedOperationID(baseOperationID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case GeneratorConfigurationPackage.DEFAULT_DOCUMENT_GENERATOR_CONFIGURATION___CREATE_TEMPLATE_FILE_URL:
+ return createTemplateFileURL();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
} // DefaultDocumentGeneratorConfigurationImpl
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/impl/GeneratorConfigurationFactoryImpl.java b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/impl/GeneratorConfigurationFactoryImpl.java
index 8e4d631..89bc8fc 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/impl/GeneratorConfigurationFactoryImpl.java
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/impl/GeneratorConfigurationFactoryImpl.java
@@ -13,7 +13,10 @@
*/
package org.eclipse.papyrus.model2doc.core.generatorconfiguration.impl;
+import java.net.URL;
+import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
@@ -27,7 +30,7 @@
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public class GeneratorConfigurationFactoryImpl extends EFactoryImpl implements GeneratorConfigurationFactory {
@@ -35,7 +38,7 @@
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public static GeneratorConfigurationFactory init() {
@@ -54,7 +57,7 @@
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public GeneratorConfigurationFactoryImpl() {
@@ -64,7 +67,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -82,7 +85,43 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case GeneratorConfigurationPackage.URL:
+ return createURLFromString(eDataType, initialValue);
+ case GeneratorConfigurationPackage.URI:
+ return createURIFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case GeneratorConfigurationPackage.URL:
+ return convertURLToString(eDataType, instanceValue);
+ case GeneratorConfigurationPackage.URI:
+ return convertURIToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -94,7 +133,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -106,7 +145,47 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
+ * @generated
+ */
+ public URL createURLFromString(EDataType eDataType, String initialValue) {
+ return (URL) super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertURLToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public URI createURIFromString(EDataType eDataType, String initialValue) {
+ return (URI) super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertURIToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -117,7 +196,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @deprecated
* @generated
*/
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/impl/GeneratorConfigurationPackageImpl.java b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/impl/GeneratorConfigurationPackageImpl.java
index f35c49b..b27bf3c 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/impl/GeneratorConfigurationPackageImpl.java
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/impl/GeneratorConfigurationPackageImpl.java
@@ -15,6 +15,7 @@
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.EPackage;
@@ -34,14 +35,14 @@
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public class GeneratorConfigurationPackageImpl extends EPackageImpl implements GeneratorConfigurationPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass defaultDocumentStructureGeneratorConfigurationEClass = null;
@@ -49,7 +50,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass abstractDocumentStructureGeneratorConfigurationEClass = null;
@@ -57,7 +58,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass abstractDocumentGeneratorConfigurationEClass = null;
@@ -65,7 +66,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass iGeneratorConfigurationEClass = null;
@@ -73,7 +74,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass iDocumentStructureGeneratorConfigurationEClass = null;
@@ -81,7 +82,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
private EClass iDocumentGeneratorConfigurationEClass = null;
@@ -89,18 +90,26 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
- private EClass uriEClass = null;
+ private EClass defaultDocumentGeneratorConfigurationEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
- private EClass defaultDocumentGeneratorConfigurationEClass = null;
+ private EDataType urlEDataType = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EDataType uriEDataType = null;
/**
* Creates an instance of the model <b>Package</b>, registered with
@@ -113,7 +122,7 @@
* if one already exists.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.GeneratorConfigurationPackage#eNS_URI
* @see #init()
@@ -126,7 +135,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
private static boolean isInited = false;
@@ -139,15 +148,16 @@
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static GeneratorConfigurationPackage init() {
- if (isInited)
+ if (isInited) {
return (GeneratorConfigurationPackage) EPackage.Registry.INSTANCE.getEPackage(GeneratorConfigurationPackage.eNS_URI);
+ }
// Obtain or create and register package
Object registeredGeneratorConfigurationPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
@@ -173,7 +183,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -184,7 +194,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -195,7 +205,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -206,7 +216,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -217,7 +227,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -228,7 +238,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -239,7 +249,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -250,7 +260,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -261,7 +271,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -272,7 +282,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -283,7 +293,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -294,7 +304,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -305,7 +315,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -316,7 +326,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -327,7 +337,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -338,7 +348,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -349,7 +359,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -360,7 +370,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -371,7 +381,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -382,7 +392,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -393,7 +403,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -404,7 +414,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -415,7 +425,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -426,7 +436,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -437,7 +447,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -448,7 +458,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -459,7 +469,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -470,18 +480,29 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
- public EClass getURI() {
- return uriEClass;
+ public EOperation getIDocumentGeneratorConfiguration__CreateTemplateFileURL() {
+ return iDocumentGeneratorConfigurationEClass.getEOperations().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
+ * @generated
+ */
+ @Override
+ public EDataType getURI() {
+ return uriEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -492,7 +513,18 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
+ * @generated
+ */
+ @Override
+ public EDataType getURL() {
+ return urlEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -503,7 +535,7 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
private boolean isCreated = false;
@@ -513,12 +545,13 @@
* guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public void createPackageContents() {
- if (isCreated)
+ if (isCreated) {
return;
+ }
isCreated = true;
// Create classes and their features
@@ -554,16 +587,19 @@
createEOperation(iDocumentGeneratorConfigurationEClass, IDOCUMENT_GENERATOR_CONFIGURATION___IS_SAVE_DOCUMENT_STRUCTURE);
createEOperation(iDocumentGeneratorConfigurationEClass, IDOCUMENT_GENERATOR_CONFIGURATION___IS_SAVE_IMAGES);
createEOperation(iDocumentGeneratorConfigurationEClass, IDOCUMENT_GENERATOR_CONFIGURATION___GET_TEMPLATE_FILE);
-
- uriEClass = createEClass(URI);
+ createEOperation(iDocumentGeneratorConfigurationEClass, IDOCUMENT_GENERATOR_CONFIGURATION___CREATE_TEMPLATE_FILE_URL);
defaultDocumentGeneratorConfigurationEClass = createEClass(DEFAULT_DOCUMENT_GENERATOR_CONFIGURATION);
+
+ // Create data types
+ urlEDataType = createEDataType(URL);
+ uriEDataType = createEDataType(URI);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
private boolean isInitialized = false;
@@ -573,12 +609,13 @@
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public void initializePackageContents() {
- if (isInitialized)
+ if (isInitialized) {
return;
+ }
isInitialized = true;
// Initialize package
@@ -658,10 +695,14 @@
initEOperation(getIDocumentGeneratorConfiguration__GetTemplateFile(), ecorePackage.getEString(), "getTemplateFile", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$
- initEClass(uriEClass, org.eclipse.emf.common.util.URI.class, "URI", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEOperation(getIDocumentGeneratorConfiguration__CreateTemplateFileURL(), this.getURL(), "createTemplateFileURL", 1, 1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$
initEClass(defaultDocumentGeneratorConfigurationEClass, DefaultDocumentGeneratorConfiguration.class, "DefaultDocumentGeneratorConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ // Initialize data types
+ initEDataType(urlEDataType, java.net.URL.class, "URL", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEDataType(uriEDataType, org.eclipse.emf.common.util.URI.class, "URI", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
// Create resource
createResource(eNS_URI);
@@ -676,7 +717,7 @@
* Initializes the annotations for <b>http://www.eclipse.org/uml2/2.0.0/UML</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected void createUMLAnnotations() {
@@ -692,7 +733,7 @@
* Initializes the annotations for <b>duplicates</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected void createDuplicatesAnnotations() {
@@ -701,6 +742,10 @@
source,
new String[] {
});
+ addAnnotation(defaultDocumentGeneratorConfigurationEClass,
+ source,
+ new String[] {
+ });
}
} // GeneratorConfigurationPackageImpl
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/util/GeneratorConfigurationAdapterFactory.java b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/util/GeneratorConfigurationAdapterFactory.java
index 2a7eb71..5e6e6a6 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/util/GeneratorConfigurationAdapterFactory.java
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/util/GeneratorConfigurationAdapterFactory.java
@@ -17,8 +17,6 @@
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-
-import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.model2doc.core.generatorconfiguration.*;
@@ -28,7 +26,7 @@
* The <b>Adapter Factory</b> for the model.
* It provides an adapter <code>createXXX</code> method for each class of the model.
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.GeneratorConfigurationPackage
* @generated
*/
@@ -37,7 +35,7 @@
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected static GeneratorConfigurationPackage modelPackage;
@@ -46,7 +44,7 @@
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public GeneratorConfigurationAdapterFactory() {
@@ -60,7 +58,7 @@
* <!-- begin-user-doc -->
* This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
* <!-- end-user-doc -->
- *
+ *
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@@ -79,10 +77,10 @@
* The switch that delegates to the <code>createXXX</code> methods.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
- protected GeneratorConfigurationSwitch<Adapter> modelSwitch = new GeneratorConfigurationSwitch<Adapter>() {
+ protected GeneratorConfigurationSwitch<Adapter> modelSwitch = new GeneratorConfigurationSwitch<>() {
@Override
public Adapter caseDefaultDocumentStructureGeneratorConfiguration(DefaultDocumentStructureGeneratorConfiguration object) {
return createDefaultDocumentStructureGeneratorConfigurationAdapter();
@@ -114,11 +112,6 @@
}
@Override
- public Adapter caseURI(URI object) {
- return createURIAdapter();
- }
-
- @Override
public Adapter caseDefaultDocumentGeneratorConfiguration(DefaultDocumentGeneratorConfiguration object) {
return createDefaultDocumentGeneratorConfigurationAdapter();
}
@@ -133,7 +126,7 @@
* Creates an adapter for the <code>target</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @param target
* the object to adapt.
* @return the adapter for the <code>target</code>.
@@ -151,7 +144,7 @@
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.DefaultDocumentStructureGeneratorConfiguration
* @generated
@@ -166,7 +159,7 @@
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentStructureGeneratorConfiguration
* @generated
@@ -181,7 +174,7 @@
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.AbstractDocumentGeneratorConfiguration
* @generated
@@ -196,7 +189,7 @@
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IGeneratorConfiguration
* @generated
@@ -211,7 +204,7 @@
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentStructureGeneratorConfiguration
* @generated
@@ -226,7 +219,7 @@
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration
* @generated
@@ -236,27 +229,12 @@
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.common.util.URI <em>URI</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- *
- * @return the new adapter.
- * @see org.eclipse.emf.common.util.URI
- * @generated
- */
- public Adapter createURIAdapter() {
- return null;
- }
-
- /**
* Creates a new adapter for an object of class '{@link org.eclipse.papyrus.model2doc.core.generatorconfiguration.DefaultDocumentGeneratorConfiguration <em>Default Document Generator Configuration</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.DefaultDocumentGeneratorConfiguration
* @generated
@@ -270,7 +248,7 @@
* <!-- begin-user-doc -->
* This default implementation returns null.
* <!-- end-user-doc -->
- *
+ *
* @return the new adapter.
* @generated
*/
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/util/GeneratorConfigurationSwitch.java b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/util/GeneratorConfigurationSwitch.java
index 6738718..51e860a 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/util/GeneratorConfigurationSwitch.java
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src-gen/org/eclipse/papyrus/model2doc/core/generatorconfiguration/util/GeneratorConfigurationSwitch.java
@@ -13,7 +13,6 @@
*/
package org.eclipse.papyrus.model2doc.core.generatorconfiguration.util;
-import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
@@ -31,7 +30,7 @@
* until a non-null result is returned,
* which is the result of the switch.
* <!-- end-user-doc -->
- *
+ *
* @see org.eclipse.papyrus.model2doc.core.generatorconfiguration.GeneratorConfigurationPackage
* @generated
*/
@@ -40,7 +39,7 @@
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected static GeneratorConfigurationPackage modelPackage;
@@ -49,7 +48,7 @@
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public GeneratorConfigurationSwitch() {
@@ -62,7 +61,7 @@
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @param ePackage
* the package in question.
* @return whether this is a switch for the given package.
@@ -77,7 +76,7 @@
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@@ -87,81 +86,93 @@
case GeneratorConfigurationPackage.DEFAULT_DOCUMENT_STRUCTURE_GENERATOR_CONFIGURATION: {
DefaultDocumentStructureGeneratorConfiguration defaultDocumentStructureGeneratorConfiguration = (DefaultDocumentStructureGeneratorConfiguration) theEObject;
T result = caseDefaultDocumentStructureGeneratorConfiguration(defaultDocumentStructureGeneratorConfiguration);
- if (result == null)
+ if (result == null) {
result = caseAbstractDocumentStructureGeneratorConfiguration(defaultDocumentStructureGeneratorConfiguration);
- if (result == null)
+ }
+ if (result == null) {
result = caseIDocumentStructureGeneratorConfiguration(defaultDocumentStructureGeneratorConfiguration);
- if (result == null)
+ }
+ if (result == null) {
result = caseAbstractDocumentGeneratorConfiguration(defaultDocumentStructureGeneratorConfiguration);
- if (result == null)
+ }
+ if (result == null) {
result = caseIGeneratorConfiguration(defaultDocumentStructureGeneratorConfiguration);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case GeneratorConfigurationPackage.ABSTRACT_DOCUMENT_STRUCTURE_GENERATOR_CONFIGURATION: {
AbstractDocumentStructureGeneratorConfiguration abstractDocumentStructureGeneratorConfiguration = (AbstractDocumentStructureGeneratorConfiguration) theEObject;
T result = caseAbstractDocumentStructureGeneratorConfiguration(abstractDocumentStructureGeneratorConfiguration);
- if (result == null)
+ if (result == null) {
result = caseAbstractDocumentGeneratorConfiguration(abstractDocumentStructureGeneratorConfiguration);
- if (result == null)
+ }
+ if (result == null) {
result = caseIGeneratorConfiguration(abstractDocumentStructureGeneratorConfiguration);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case GeneratorConfigurationPackage.ABSTRACT_DOCUMENT_GENERATOR_CONFIGURATION: {
AbstractDocumentGeneratorConfiguration abstractDocumentGeneratorConfiguration = (AbstractDocumentGeneratorConfiguration) theEObject;
T result = caseAbstractDocumentGeneratorConfiguration(abstractDocumentGeneratorConfiguration);
- if (result == null)
+ if (result == null) {
result = caseIGeneratorConfiguration(abstractDocumentGeneratorConfiguration);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case GeneratorConfigurationPackage.IGENERATOR_CONFIGURATION: {
IGeneratorConfiguration iGeneratorConfiguration = (IGeneratorConfiguration) theEObject;
T result = caseIGeneratorConfiguration(iGeneratorConfiguration);
- if (result == null)
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case GeneratorConfigurationPackage.IDOCUMENT_STRUCTURE_GENERATOR_CONFIGURATION: {
IDocumentStructureGeneratorConfiguration iDocumentStructureGeneratorConfiguration = (IDocumentStructureGeneratorConfiguration) theEObject;
T result = caseIDocumentStructureGeneratorConfiguration(iDocumentStructureGeneratorConfiguration);
- if (result == null)
+ if (result == null) {
result = caseIGeneratorConfiguration(iDocumentStructureGeneratorConfiguration);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
case GeneratorConfigurationPackage.IDOCUMENT_GENERATOR_CONFIGURATION: {
IDocumentGeneratorConfiguration iDocumentGeneratorConfiguration = (IDocumentGeneratorConfiguration) theEObject;
T result = caseIDocumentGeneratorConfiguration(iDocumentGeneratorConfiguration);
- if (result == null)
+ if (result == null) {
result = caseIGeneratorConfiguration(iDocumentGeneratorConfiguration);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
- return result;
- }
- case GeneratorConfigurationPackage.URI: {
- URI uri = (URI) theEObject;
- T result = caseURI(uri);
- if (result == null)
- result = defaultCase(theEObject);
+ }
return result;
}
case GeneratorConfigurationPackage.DEFAULT_DOCUMENT_GENERATOR_CONFIGURATION: {
DefaultDocumentGeneratorConfiguration defaultDocumentGeneratorConfiguration = (DefaultDocumentGeneratorConfiguration) theEObject;
T result = caseDefaultDocumentGeneratorConfiguration(defaultDocumentGeneratorConfiguration);
- if (result == null)
+ if (result == null) {
result = caseAbstractDocumentGeneratorConfiguration(defaultDocumentGeneratorConfiguration);
- if (result == null)
+ }
+ if (result == null) {
result = caseIDocumentGeneratorConfiguration(defaultDocumentGeneratorConfiguration);
- if (result == null)
+ }
+ if (result == null) {
result = caseIGeneratorConfiguration(defaultDocumentGeneratorConfiguration);
- if (result == null)
+ }
+ if (result == null) {
result = defaultCase(theEObject);
+ }
return result;
}
default:
@@ -175,7 +186,7 @@
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Default Document Structure Generator Configuration</em>'.
@@ -192,7 +203,7 @@
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Abstract Document Structure Generator Configuration</em>'.
@@ -209,7 +220,7 @@
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Abstract Document Generator Configuration</em>'.
@@ -226,7 +237,7 @@
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '<em>IGenerator Configuration</em>'.
@@ -243,7 +254,7 @@
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '<em>IDocument Structure Generator Configuration</em>'.
@@ -260,7 +271,7 @@
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '<em>IDocument Generator Configuration</em>'.
@@ -272,29 +283,12 @@
}
/**
- * Returns the result of interpreting the object as an instance of '<em>URI</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>URI</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseURI(URI object) {
- return null;
- }
-
- /**
* Returns the result of interpreting the object as an instance of '<em>Default Document Generator Configuration</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Default Document Generator Configuration</em>'.
@@ -311,7 +305,7 @@
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
* <!-- end-user-doc -->
- *
+ *
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/internal/operations/DefaultDocumentGeneratorConfigurationOperations.java b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/internal/operations/DefaultDocumentGeneratorConfigurationOperations.java
new file mode 100755
index 0000000..80f3858
--- /dev/null
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/internal/operations/DefaultDocumentGeneratorConfigurationOperations.java
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ * Copyright (c) 2020 CEA LIST and others.
+ *
+ * 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
+ * http://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
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.model2doc.core.generatorconfiguration.internal.operations;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.model2doc.core.generatorconfiguration.DefaultDocumentGeneratorConfiguration;
+import org.eclipse.papyrus.model2doc.core.generatorconfiguration.IDocumentGeneratorConfiguration;
+import org.eclipse.papyrus.model2doc.core.generatorconfiguration.internal.Activator;
+import org.osgi.framework.Bundle;
+
+/**
+ * Operations for {@link DefaultDocumentGeneratorConfiguration}
+ */
+public final class DefaultDocumentGeneratorConfigurationOperations {
+
+ /**
+ *
+ * @param configuration
+ * an {@link IDocumentGeneratorConfiguration}
+ * @return
+ * the URL allowing to access to an existing file used as document template for the generation
+ */
+ public static final URL createTemplateFileURL(final IDocumentGeneratorConfiguration configuration) {
+ final URI uri = createPlatformURIFromFilePath(configuration, configuration.getTemplateFile());
+ if (uri == null) {
+ return null;
+ }
+ if (uri.isPlatformResource() && configuration.eResource() != null && configuration.eResource().getURI().isPlatformPlugin()) {
+ Activator.log.warn("We can't get a file referenced as platform:/resource from a file saved as platform:/plugin"); //$NON-NLS-1$
+ return null;
+ }
+ return getFileURLFromPlatformURI(uri);
+ }
+
+ /**
+ *
+ * @param eobject
+ * an eobject
+ * @param filePath
+ * a path to convert , the path can be a platform:/plugin, and platform:/resource a just a string. In this case we build a path from the location of the EObject given in parameter
+ * @return
+ * a platform URI
+ *
+ */
+ private static final URI createPlatformURIFromFilePath(final EObject eobject, final String filePath) {
+ if (null == filePath || filePath.isEmpty()) {
+ return null;
+ }
+ URI templateURI = URI.createURI(filePath, true);
+ final String scheme = templateURI.scheme(); // Windows C: or platform for example is not supported
+ if (false == templateURI.isPlatform() && null != scheme && false == scheme.isEmpty()) {
+ Activator.log.warn(NLS.bind("File system path like {0} are not supported", filePath)); //$NON-NLS-1$
+ return null;
+ }
+ if (false == templateURI.isPlatform()) {
+ if (eobject.eResource() == null) {
+ Activator.log.warn(NLS.bind("The EObject {0} must be attached to a Resource.", eobject)); //$NON-NLS-1$
+ return null;
+ }
+ // it is a local URI
+ final URI documentURI = eobject.eResource().getURI();
+ // should always be true
+ Assert.isTrue(documentURI.isPlatform());
+ final String projectName = documentURI.segmentsList().get(1);
+ URI templateURIPath = URI.createPlatformResourceURI(projectName, false);
+ templateURI = templateURIPath.appendSegments(templateURI.segments());
+ }
+
+ // should always be true;
+ Assert.isTrue(templateURI.isPlatform());
+ return templateURI;
+ }
+
+
+ /**
+ *
+ * @param bundleId
+ * the ID of a bundle
+ * @param filePathInBundle
+ * the path in the bundle
+ * @return
+ * the full path of the file, conformed to the OS, or <code>null</code> if not found
+ */
+ private static final URL getFileURLFromPlatformURI(final URI uri) {
+ if (uri == null) {
+ return null;
+ }
+ if (uri.isPlatformPlugin()) {
+ final String bundleId = uri.segment(1);
+ int nbSegment = uri.segmentCount();
+ int index = 2;
+ URI pathInBundle = null;
+ while (index < nbSegment) {
+ if (pathInBundle == null) {
+ pathInBundle = URI.createURI(uri.segment(index));
+ } else {
+ pathInBundle = pathInBundle.appendSegment(uri.segment(index));
+ }
+ index++;
+ }
+
+ // final URI relativeURI = uri.retrimSegments(1);// (URI.createPlatformPluginURI(bundleId, true), null);
+ final Bundle bundle = Platform.getBundle(bundleId); // $NON-NLS-1$
+ if (null == bundle) {
+ Activator.log.warn(NLS.bind("The bundle {0} doesn't exist", bundleId)); //$NON-NLS-1$
+ return null;
+ }
+ String path = pathInBundle.toString();
+ path = URI.decode(path);
+ final URL eclipseURL = FileLocator.find(bundle, new Path(path), null);
+ if (null == eclipseURL) {
+ Activator.log.warn(NLS.bind("The file {0} doesn't exist in the bundle {1}", pathInBundle.toString(), bundleId)); //$NON-NLS-1$
+ return null;
+ }
+ try {
+ // convert the URL of the file in the compiled eclipse bundle into an URL in D:git/... in my installation (useful or not ? )
+ return FileLocator.toFileURL(eclipseURL);
+ } catch (IOException e) {
+ Activator.log.error(e);
+ }
+
+ } else if (uri.isPlatformResource()) {
+ final IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(uri.toPlatformString(true)));
+ if (f.exists()) {
+ try {
+ return f.getLocationURI().toURL();
+ } catch (MalformedURLException e) {
+ Activator.log.error(e);
+ }
+ }
+
+ }
+ return null;
+ }
+}
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/internal/operations/DefaultDocumentStructureGeneratorConfigurationOperations.java b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/internal/operations/DefaultDocumentStructureGeneratorConfigurationOperations.java
index a64eebc..874dc3d 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/internal/operations/DefaultDocumentStructureGeneratorConfigurationOperations.java
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/internal/operations/DefaultDocumentStructureGeneratorConfigurationOperations.java
@@ -86,7 +86,7 @@
final String scheme = uri.scheme(); // Windows C: for example
if (null != scheme && false == scheme.isEmpty() && !uri.isPlatform()) {
- Activator.log.warn(NLS.bind("A such path for DocumentStructure is not supported, path= ", uri.toString())); //$NON-NLS-1$
+ Activator.log.warn(NLS.bind("A such path for DocumentStructure is not supported, path= {0} ", uri.toString())); //$NON-NLS-1$
return null;
}
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/operations/GeneratorConfigurationOperations.java b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/operations/GeneratorConfigurationOperations.java
index e4630c1..0cd6d59 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/operations/GeneratorConfigurationOperations.java
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/operations/GeneratorConfigurationOperations.java
@@ -11,6 +11,7 @@
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - bug 569382
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - bug 569817
*****************************************************************************/
package org.eclipse.papyrus.model2doc.core.generatorconfiguration.operations;
@@ -228,18 +229,6 @@
return projectsToRefresh;
}
-
- /**
- *
- * @param configuration
- * the generator configuration
- * @return
- * the file uri as local path (in C:/ for windows), prefixed with file:/
- */
- public static final String getTemplateFilePathInLocalPath(final IDocumentGeneratorConfiguration configuration) {
- return getFilePathInLocalPath(configuration, configuration.getTemplateFile());
- }
-
/**
*
* @param eobject
diff --git a/plugins/doc/org.eclipse.papyrus.model2doc.doc/src/site/mediawiki/model2doc-userDoc.mediawiki b/plugins/doc/org.eclipse.papyrus.model2doc.doc/src/site/mediawiki/model2doc-userDoc.mediawiki
index c24f780..e4eb946 100755
--- a/plugins/doc/org.eclipse.papyrus.model2doc.doc/src/site/mediawiki/model2doc-userDoc.mediawiki
+++ b/plugins/doc/org.eclipse.papyrus.model2doc.doc/src/site/mediawiki/model2doc-userDoc.mediawiki
@@ -64,7 +64,6 @@
***''platform:/resource/aPluginName/aFolderName/myTemplatefile'' : the template is located in an Eclipse project of the workspace
***''folder1/folder2/myTemplateFile'': interpreted as ''platform:/resource/currentPluginName/folder1/folder2/myTemplateFile'' : template owned by the current Eclipse project
***''platform:/plugin/aPluginName/aFolderName/myTemplatefile'' : the template is located in an installed Eclipse plugin
-***''OS file system ''C:\aFolder\myTemplatefile'': the template is located somewhere in the file sytem
*'''TableOfContents''': this element is used to declare that you want a Table Of Contents
**'''TocTitle''': the title to use for the TableOfContents. If nothing is defined, the table of contents will be name ''Table Of Contents'' in the generated file
*'''TableOfFigures''': this element is used to declare that you want a Table Of Fiures
diff --git a/plugins/docx/org.eclipse.papyrus.model2doc.docx/src/org/eclipse/papyrus/model2doc/docx/internal/transcription/DocxTranscription.java b/plugins/docx/org.eclipse.papyrus.model2doc.docx/src/org/eclipse/papyrus/model2doc/docx/internal/transcription/DocxTranscription.java
index d2a5f9a..0467d9e 100755
--- a/plugins/docx/org.eclipse.papyrus.model2doc.docx/src/org/eclipse/papyrus/model2doc/docx/internal/transcription/DocxTranscription.java
+++ b/plugins/docx/org.eclipse.papyrus.model2doc.docx/src/org/eclipse/papyrus/model2doc/docx/internal/transcription/DocxTranscription.java
@@ -12,7 +12,7 @@
* Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Initial API and implementation
* Vincent LORENZO (CEA LIST) vincent.lorenzo@cea.fr - bug 569059
* Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Bug 569249
- *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - bug 569817
*****************************************************************************/
package org.eclipse.papyrus.model2doc.docx.internal.transcription;
@@ -22,6 +22,7 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.math.BigInteger;
+import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
@@ -118,12 +119,12 @@
* @throws InvalidFormatException
*/
private InputStream getFileWithTemplateLoaded() throws IOException, InvalidFormatException {
- String templateURI = GeneratorConfigurationOperations.getTemplateFilePathInLocalPath(docxGeneratorConfig);
- if (templateURI != null) {
- templateURI = templateURI.replaceFirst(ECORE_FILE_PREFIX, EMPTY_STRING);
+ final URL templateURL = this.docxGeneratorConfig.createTemplateFileURL();
+
+ if (templateURL != null) {
String destURI = GeneratorConfigurationOperations.getDocumentFileLocalPath(docxGeneratorConfig, DOCX_FILE_EXTENTION);
destURI = destURI.replaceFirst(ECORE_FILE_PREFIX, EMPTY_STRING);
- FileInputStream templateIS = new FileInputStream(templateURI);
+ InputStream templateIS = templateURL.openStream();
FileOutputStream destIS = new FileOutputStream(destURI);
OPCPackage pkg = OPCPackage.open(templateIS);
diff --git a/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/editor/ODTEditor.java b/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/editor/ODTEditor.java
index b56946d..0e11946 100755
--- a/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/editor/ODTEditor.java
+++ b/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/editor/ODTEditor.java
@@ -12,6 +12,7 @@
* Yupanqui Munoz (CEA LIST) yupanqui.munozjulho@cea.fr - Initial API and implementation
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - bug 559826
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - bug 569817
*****************************************************************************/
package org.eclipse.papyrus.model2doc.odt.internal.editor;
@@ -118,7 +119,7 @@
if (officeLoader != null) {
// Create text document
fileIOService = new ODTFileIOServiceImpl();
- final String templateURL = GeneratorConfigurationOperations.getTemplateFilePathInLocalPath(generatorConfig);
+ final String templateURL = generatorConfig.createTemplateFileURL().toString();
createTextDocument(templateURL);
xMultiServiceFactory = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
try {
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/build.properties b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/build.properties
index 0565497..5a7a072 100755
--- a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/build.properties
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/build.properties
@@ -3,5 +3,6 @@
bin.includes = META-INF/,\
.,\
about.html,\
- OSGI-INF/
+ OSGI-INF/,\
+ resources/
src.includes = about.html
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/InTheAir/Test_01_TemplateInPlatformPluginURI.dotx b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/InTheAir/Test_01_TemplateInPlatformPluginURI.dotx
new file mode 100755
index 0000000..96f49b0
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/InTheAir/Test_01_TemplateInPlatformPluginURI.dotx
Binary files differ
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/AnotherFolder With Spaces/Test_07_TemplateInAnotherFolder With Spaces.dotx b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/AnotherFolder With Spaces/Test_07_TemplateInAnotherFolder With Spaces.dotx
new file mode 100755
index 0000000..96f49b0
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/AnotherFolder With Spaces/Test_07_TemplateInAnotherFolder With Spaces.dotx
Binary files differ
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/AnotherFolder/Test_06_TemplateInAnotherFolder.dotx b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/AnotherFolder/Test_06_TemplateInAnotherFolder.dotx
new file mode 100755
index 0000000..96f49b0
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/AnotherFolder/Test_06_TemplateInAnotherFolder.dotx
Binary files differ
diff --git "a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/AnotherFolderWithAccentuatedChar\303\251\303\240\303\271/Test_08_TemplateInAnotherFolderWithAccentuatedChar\303\251\303\240\303\271.dotx" "b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/AnotherFolderWithAccentuatedChar\303\251\303\240\303\271/Test_08_TemplateInAnotherFolderWithAccentuatedChar\303\251\303\240\303\271.dotx"
new file mode 100755
index 0000000..96f49b0
--- /dev/null
+++ "b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/AnotherFolderWithAccentuatedChar\303\251\303\240\303\271/Test_08_TemplateInAnotherFolderWithAccentuatedChar\303\251\303\240\303\271.dotx"
Binary files differ
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_01_TemplateInPlatformPluginURI.dotx b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_01_TemplateInPlatformPluginURI.dotx
new file mode 100755
index 0000000..96f49b0
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_01_TemplateInPlatformPluginURI.dotx
Binary files differ
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_01_TemplateInPlatformPluginURI.generatorConfiguration b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_01_TemplateInPlatformPluginURI.generatorConfiguration
new file mode 100755
index 0000000..2ad8640
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_01_TemplateInPlatformPluginURI.generatorConfiguration
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<generatorconfiguration:DefaultDocumentGeneratorConfiguration
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration"
+ templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_01_TemplateInPlatformPluginURI.dotx"/>
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_02_TemplateWithRelativeURI.dotx b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_02_TemplateWithRelativeURI.dotx
new file mode 100755
index 0000000..96f49b0
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_02_TemplateWithRelativeURI.dotx
Binary files differ
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_02_TemplateWithRelativeURI.generatorConfiguration b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_02_TemplateWithRelativeURI.generatorConfiguration
new file mode 100755
index 0000000..710a019
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_02_TemplateWithRelativeURI.generatorConfiguration
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<generatorconfiguration:DefaultDocumentGeneratorConfiguration
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration"
+ templateFile="resources/TemplateFileURL/PlatformPlugin/Test_02_TemplateWithRelativeURI.dotx"/>
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_03_TemplateWithRelativeURI.dotx b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_03_TemplateWithRelativeURI.dotx
new file mode 100755
index 0000000..96f49b0
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_03_TemplateWithRelativeURI.dotx
Binary files differ
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_03_TemplateWithRelativeURI.generatorConfiguration b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_03_TemplateWithRelativeURI.generatorConfiguration
new file mode 100755
index 0000000..eb4a796
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_03_TemplateWithRelativeURI.generatorConfiguration
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<generatorconfiguration:DefaultDocumentGeneratorConfiguration
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration"
+ templateFile="/resources/TemplateFileURL/PlatformPlugin/Test_03_TemplateWithRelativeURI.dotx"/>
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_04_TemplateURI With Spaces.dotx b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_04_TemplateURI With Spaces.dotx
new file mode 100755
index 0000000..96f49b0
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_04_TemplateURI With Spaces.dotx
Binary files differ
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_04_TemplateURI With Spaces.generatorConfiguration b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_04_TemplateURI With Spaces.generatorConfiguration
new file mode 100755
index 0000000..23b8210
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_04_TemplateURI With Spaces.generatorConfiguration
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<generatorconfiguration:DefaultDocumentGeneratorConfiguration
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration"
+ templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_04_TemplateURI With Spaces.dotx"/>
diff --git "a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_05_TemplateURIWithAccentuatedChar\303\251\303\240\303\271.dotx" "b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_05_TemplateURIWithAccentuatedChar\303\251\303\240\303\271.dotx"
new file mode 100755
index 0000000..96f49b0
--- /dev/null
+++ "b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_05_TemplateURIWithAccentuatedChar\303\251\303\240\303\271.dotx"
Binary files differ
diff --git "a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_05_TemplateURIWithAccentuatedChar\303\251\303\240\303\271.generatorConfiguration" "b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_05_TemplateURIWithAccentuatedChar\303\251\303\240\303\271.generatorConfiguration"
new file mode 100755
index 0000000..fcfeb3a
--- /dev/null
+++ "b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_05_TemplateURIWithAccentuatedChar\303\251\303\240\303\271.generatorConfiguration"
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<generatorconfiguration:DefaultDocumentGeneratorConfiguration
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration"
+ templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_05_TemplateURIWithAccentuatedCharéàù.dotx"/>
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_06_TemplateInAnotherFolder.generatorConfiguration b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_06_TemplateInAnotherFolder.generatorConfiguration
new file mode 100755
index 0000000..81a793a
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_06_TemplateInAnotherFolder.generatorConfiguration
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<generatorconfiguration:DefaultDocumentGeneratorConfiguration
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration"
+ templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/AnotherFolder/Test_06_TemplateInAnotherFolder.dotx"/>
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_07_TemplateInAnotherFolder With Spaces.generatorConfiguration b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_07_TemplateInAnotherFolder With Spaces.generatorConfiguration
new file mode 100755
index 0000000..24b9c7e
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_07_TemplateInAnotherFolder With Spaces.generatorConfiguration
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<generatorconfiguration:DefaultDocumentGeneratorConfiguration
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration"
+ templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/AnotherFolder With Spaces/Test_07_TemplateInAnotherFolder With Spaces.dotx"/>
diff --git "a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_08_TemplateInAnotherFolderWithAccentuatedChar\303\251\303\240\303\271.generatorConfiguration" "b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_08_TemplateInAnotherFolderWithAccentuatedChar\303\251\303\240\303\271.generatorConfiguration"
new file mode 100755
index 0000000..5b66274
--- /dev/null
+++ "b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_08_TemplateInAnotherFolderWithAccentuatedChar\303\251\303\240\303\271.generatorConfiguration"
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<generatorconfiguration:DefaultDocumentGeneratorConfiguration
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration"
+ templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/AnotherFolderWithAccentuatedCharéàù/Test_08_TemplateInAnotherFolderWithAccentuatedCharéàù.dotx"/>
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_09_NullTemplateURI.generatorConfiguration b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_09_NullTemplateURI.generatorConfiguration
new file mode 100755
index 0000000..f93f4ce
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_09_NullTemplateURI.generatorConfiguration
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ASCII"?>
+<generatorconfiguration:DefaultDocumentGeneratorConfiguration
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration"/>
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_10_EmptyTemplateURI.generatorConfiguration b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_10_EmptyTemplateURI.generatorConfiguration
new file mode 100755
index 0000000..a420366
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_10_EmptyTemplateURI.generatorConfiguration
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ASCII"?>
+<generatorconfiguration:DefaultDocumentGeneratorConfiguration
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration"
+ templateFile=""/>
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_11_TemplateNotFound.generatorConfiguration b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_11_TemplateNotFound.generatorConfiguration
new file mode 100755
index 0000000..0cf2192
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_11_TemplateNotFound.generatorConfiguration
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ASCII"?>
+<generatorconfiguration:DefaultDocumentGeneratorConfiguration
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration"
+ templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/fantomFile.txt"/>
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_12_TemplateInPlatformResource.generatorConfiguration b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_12_TemplateInPlatformResource.generatorConfiguration
new file mode 100755
index 0000000..83109fd
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_12_TemplateInPlatformResource.generatorConfiguration
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ASCII"?>
+<generatorconfiguration:DefaultDocumentGeneratorConfiguration
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration"
+ templateFile="platform:/resource/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/fantomFile.txt"/>
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformResource/Test_01_TemplateInPlatformPluginURI.dotx b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformResource/Test_01_TemplateInPlatformPluginURI.dotx
new file mode 100755
index 0000000..96f49b0
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformResource/Test_01_TemplateInPlatformPluginURI.dotx
Binary files differ
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformResource/Test_14_TemplateInPlatformPluginURI.dotx b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformResource/Test_14_TemplateInPlatformPluginURI.dotx
new file mode 100755
index 0000000..96f49b0
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformResource/Test_14_TemplateInPlatformPluginURI.dotx
Binary files differ
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/AbstractGeneratorConfigurationTests.java b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/AbstractGeneratorConfigurationTests.java
index e78ca0f..b3c6db4 100755
--- a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/AbstractGeneratorConfigurationTests.java
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/AbstractGeneratorConfigurationTests.java
@@ -19,6 +19,7 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.papyrus.model2doc.core.generatorconfiguration.DefaultDocumentGeneratorConfiguration;
import org.eclipse.papyrus.model2doc.core.generatorconfiguration.DefaultDocumentStructureGeneratorConfiguration;
import org.eclipse.papyrus.model2doc.core.generatorconfiguration.GeneratorConfigurationFactory;
import org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests.Activator;
@@ -28,7 +29,6 @@
*/
public abstract class AbstractGeneratorConfigurationTests {
-
protected static final String DOCUMENT_FOLDER = "DocumentFolder"; //$NON-NLS-1$
protected static final String GENERATOR_DOCUMENT_ID = "GeneratorDocumentId"; //$NON-NLS-1$
@@ -72,12 +72,12 @@
}
/**
- * this method create {@link DefaultDocumentStructureGeneratorConfiguration} with default field values
+ * this method creates a {@link DefaultDocumentStructureGeneratorConfiguration} with default field values
*
* @return
* a new {@link DefaultDocumentStructureGeneratorConfiguration}
*/
- protected DefaultDocumentStructureGeneratorConfiguration createDocumentGeneratorConfiguration() {
+ protected DefaultDocumentStructureGeneratorConfiguration createDocumentStructureGeneratorConfiguration() {
final DefaultDocumentStructureGeneratorConfiguration defaultConf = GeneratorConfigurationFactory.eINSTANCE.createDefaultDocumentStructureGeneratorConfiguration();
defaultConf.setDocumentFolder(DOCUMENT_FOLDER);
defaultConf.setDocumentGeneratorId(GENERATOR_DOCUMENT_ID);
@@ -93,6 +93,25 @@
return defaultConf;
}
+
+ /**
+ * this method creates a {@link DefaultDocumentGeneratorConfiguration} with default field values
+ *
+ * @return
+ * a new {@link DefaultDocumentGeneratorConfiguration}
+ */
+ protected DefaultDocumentGeneratorConfiguration createDefaultDocumentGeneratorConfiguration() {
+ final DefaultDocumentGeneratorConfiguration defaultConf = GeneratorConfigurationFactory.eINSTANCE.createDefaultDocumentGeneratorConfiguration();
+ defaultConf.setDocumentFolder(DOCUMENT_FOLDER);
+ defaultConf.setDocumentGeneratorId(GENERATOR_DOCUMENT_ID);
+ defaultConf.setDocumentName(DOCUMENT_NAME);
+ defaultConf.setTemplateFile(TEMPLATE_FILE);
+
+ defaultConf.setSaveDocumentStructure(SAVE_DOCUMENT_STRUCTURE_TRUE);
+ defaultConf.setSaveImages(SAVE_IMAGE_TRUE);
+ return defaultConf;
+ }
+
/**
*
* @param project
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/AbstractTemplateFileURLTests.java b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/AbstractTemplateFileURLTests.java
new file mode 100755
index 0000000..bcef61c
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/AbstractTemplateFileURLTests.java
@@ -0,0 +1,189 @@
+/*****************************************************************************
+ * Copyright (c) 2020 CEA LIST and others.
+ *
+ * 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
+ * http://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
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests.internal.metamodel;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.papyrus.model2doc.core.generatorconfiguration.DefaultDocumentGeneratorConfiguration;
+import org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests.Activator;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+
+/**
+ * Abstract class for tests on the calculus of Template File URL
+ */
+public abstract class AbstractTemplateFileURLTests extends AbstractGeneratorConfigurationTests {
+
+
+ /**
+ * the name of the project created in the workspace
+ */
+ protected static final String PROJECT_NAME = "org.eclipse.papyrus.model2doc.uri.tests"; //$NON-NLS-1$
+
+ /**
+ * the name of the project in the workspace the GeneratorConfiguration file
+ */
+ private static final String GENERATOR_CONFIGURATION_FOLDER_NAME = "resources"; //$NON-NLS-1$
+
+ /**
+ * the name of the GeneratorConfiguration file
+ */
+ private static final String GENERATOR_FILE_NAME = "generatorTest"; //$NON-NLS-1$
+
+
+ /**
+ * the file extension of the GeneratorFile
+ */
+ private static final String GENERATOR_CONFIFURATION_FILE_EXTENSION = "generatorConfiguration"; //$NON-NLS-1$
+
+ /**
+ * the created project used to run the tests
+ */
+ protected IProject projectForTest;
+
+ /**
+ * the resource set used by the tests
+ */
+ protected ResourceSet resourceSet;
+
+ /**
+ * init the test
+ */
+ @Before
+ public void setUp() {
+ this.projectForTest = createProject(PROJECT_NAME);
+ Assert.assertNotNull(this.projectForTest);
+ resourceSet = new ResourceSetImpl();
+ }
+
+ /**
+ * clean the test environment
+ */
+ @After
+ public void tearDown() {
+ destroyProject(this.projectForTest);
+ resourceSet = null;
+ }
+
+
+ /**
+ *
+ * @param parentResource
+ * the parent resource
+ * @param folderName
+ * the name of the folder to create in the parent resource
+ * @return
+ * the created folder
+ */
+ protected IFolder createFolderInContainer(final IContainer parentResource, final String folderName) {
+ IFolder folder = parentResource.getFolder(new Path(folderName));
+ try {
+ folder.create(true, true, new NullProgressMonitor());
+ } catch (CoreException e) {
+ Activator.log.error(e);
+ }
+ return folder;
+ }
+
+ /**
+ *
+ * @param parentResource
+ * the parent resource
+ * @param fileName
+ * the name of the file to create
+ * @return
+ * the created file
+ */
+ protected IFile createFileInContainer(final IContainer parentResource, final String fileName) {
+ final IFile file = parentResource.getFile(new Path(fileName));
+ Assert.assertTrue(!file.exists());
+ try {
+ file.create(new InputStream() {
+
+ @Override
+ public int read() throws IOException {
+ return -1;
+ }
+ }, true, new NullProgressMonitor());
+ } catch (CoreException e) {
+ Activator.log.error(e);
+ }
+ return file;
+ }
+
+ /**
+ * @param folderName
+ * a folder to create in the project
+ * @param fileName
+ * the name of a file to create inside the folder
+ */
+ protected void createFileInProject(final String folderName, final String fileName) {
+ final IFolder folder = createFolderInContainer(this.projectForTest, folderName);
+ Assert.assertNotNull(folder);
+ final IFile file = createFileInContainer(folder, fileName);
+ Assert.assertNotNull(file);
+ }
+
+ /**
+ *
+ * @param templatePath
+ * the path of the template to set in the created {@link DefaultDocumentGeneratorConfiguration}
+ * @return
+ */
+ protected DefaultDocumentGeneratorConfiguration createDefaultDocumentGeneratorConfiguration(final String templatePath) {
+ DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration();
+ conf.setTemplateFile(templatePath);
+ saveConfiguration(conf);
+ return conf;
+ }
+
+ /**
+ * @param conf
+ * the configuration to save in the resource set
+ * @return
+ * <code>true</code> if the save action succeeds
+ */
+ private boolean saveConfiguration(final EObject conf) {
+ URI uri = URI.createPlatformResourceURI(PROJECT_NAME, true);
+ uri = uri.appendSegment(GENERATOR_CONFIGURATION_FOLDER_NAME);
+ uri = uri.appendSegment(GENERATOR_FILE_NAME);
+ uri = uri.appendFileExtension(GENERATOR_CONFIFURATION_FILE_EXTENSION);
+
+ final Resource res = this.resourceSet.createResource(uri);
+ res.getContents().add(conf);
+ try {
+ res.save(null);
+ return true;
+ } catch (IOException e) {
+ Activator.log.error(e);
+ }
+ return false;
+ }
+}
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/GeneratorConfigurationTest.java b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/DocumentGeneratorConfigurationCreationTest.java
similarity index 90%
rename from tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/GeneratorConfigurationTest.java
rename to tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/DocumentGeneratorConfigurationCreationTest.java
index 5587e8b..c717f24 100755
--- a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/GeneratorConfigurationTest.java
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/DocumentGeneratorConfigurationCreationTest.java
@@ -21,9 +21,10 @@
import org.junit.Test;
/**
- * This class checks the methods provided by the elements of the metamodel
+ * This class checks the method {@link DefaultDocumentStructureGeneratorConfiguration#createDocumentStructureURI(String, String)}
+ *
*/
-public class GeneratorConfigurationTest extends AbstractGeneratorConfigurationTests {
+public class DocumentGeneratorConfigurationCreationTest extends AbstractGeneratorConfigurationTests {
/**
* This method checks the method {@link DefaultDocumentStructureGeneratorConfiguration#createDocumentGeneratorConfiguration()}
@@ -31,7 +32,7 @@
*/
@Test
public void createDocumentGeneratorConfiguration_Test1() {
- final DefaultDocumentStructureGeneratorConfiguration defaultConf = createDocumentGeneratorConfiguration();
+ final DefaultDocumentStructureGeneratorConfiguration defaultConf = createDocumentStructureGeneratorConfiguration();
final IDocumentGeneratorConfiguration conf = defaultConf.createDocumentGeneratorConfiguration();
Assert.assertNotNull("The creation of DocumentGeneratorConfiguration failed", conf); //$NON-NLS-1$
@@ -44,7 +45,7 @@
*/
@Test
public void createDocumentGeneratorConfiguration_Test2() {
- final DefaultDocumentStructureGeneratorConfiguration defaultConf = createDocumentGeneratorConfiguration();
+ final DefaultDocumentStructureGeneratorConfiguration defaultConf = createDocumentStructureGeneratorConfiguration();
// we test with the other boolean value
defaultConf.setSaveDocumentStructure(!defaultConf.isSaveDocumentStructure());
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/DocumentStructureURITest.java b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/DocumentStructureURITest.java
index 7edbf60..1d45d34 100755
--- a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/DocumentStructureURITest.java
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/DocumentStructureURITest.java
@@ -63,11 +63,13 @@
*/
private ResourceSet resourceSet;
+ // TODO check calling the method to an object not yet attache to a resource
+
/**
* init the test
*/
@Before
- public void startUp() {
+ public void setUp() {
this.projectForTest = createProject(PROJECT_NAME);
Assert.assertNotNull(this.projectForTest);
resourceSet = new ResourceSetImpl();
@@ -536,7 +538,7 @@
* the version of the created document structure
*/
private void checkDocumentStructureURI(final String expectedResult, final String documentName, final String documentStructureOutputFolder, final String documentVersion) {
- final DefaultDocumentStructureGeneratorConfiguration conf = createDocumentGeneratorConfiguration();
+ final DefaultDocumentStructureGeneratorConfiguration conf = createDocumentStructureGeneratorConfiguration();
conf.setStructureFolder(documentStructureOutputFolder);
conf.setDocumentName(documentName);
org.junit.Assert.assertTrue("The save of the tested GeneratorConfiguration failed", saveConfiguration(conf)); //$NON-NLS-1$
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/TemplateFileURLFromInTheAirTest.java b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/TemplateFileURLFromInTheAirTest.java
new file mode 100755
index 0000000..10ac42c
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/TemplateFileURLFromInTheAirTest.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Copyright (c) 2020 CEA LIST and others.
+ *
+ * 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
+ * http://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
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests.internal.metamodel;
+
+import java.net.URL;
+
+import org.eclipse.papyrus.model2doc.core.generatorconfiguration.DefaultDocumentGeneratorConfiguration;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Check the calculus of the URL of the referenced template when the Generator configuration is not in a Resource
+ */
+public class TemplateFileURLFromInTheAirTest extends AbstractTemplateFileURLTests {
+
+ private static final String TEST_01_TEMPLATE_DECLARED_FILE_NAME = "platform:/plugin/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformResource/Test_01_TemplateInPlatformPluginURI.dotx"; //$NON-NLS-1$
+
+ private static final String TEST_02_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_02_TEMPLATE_FILE_NAME = "Test_02_TemplateWithPlatformResourceURI.dotx"; //$NON-NLS-1$
+ private static final String TEST_02_DECLARED_TEMPLATE_FILE_NAME = "platform:/resource/" + PROJECT_NAME + "/" + TEST_02_FOLDER + "/" + TEST_02_TEMPLATE_FILE_NAME; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+ private static final String TEST_03_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_03_TEMPLATE_FILE_NAME = "Test_03_TemplateWithPlatformResourceURI.dotx"; //$NON-NLS-1$
+ private static final String TEST_03_DECLARED_TEMPLATE_FILE_NAME = TEST_03_FOLDER + "/" + TEST_03_TEMPLATE_FILE_NAME; //$NON-NLS-1$
+
+
+ protected void checkCreatedURL(final URL url, final String expectedEndResult) {
+ if (expectedEndResult == null) {
+ Assert.assertNull(url);
+ } else {
+ url.toString().endsWith(expectedEndResult);
+ }
+ }
+
+ protected String buildExpectedTemplateURIAsString(final String folderName, final String templateName) {
+ return this.projectForTest.getName() + "/" + folderName + "/" + templateName; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+
+ @Test
+ public void test_01_TemplateInPlatformPluginURI() {
+ final DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration();
+ conf.setTemplateFile(TEST_01_TEMPLATE_DECLARED_FILE_NAME);
+ Assert.assertNull(conf.eResource());
+
+ final String expectedResult = "/resources/TemplateFileURL/PlatformResource/Test_01_TemplateInPlatformPluginURI.dotx/"; //$NON-NLS-1$
+ checkCreatedURL(conf.createTemplateFileURL(), expectedResult);
+ }
+
+ @Test
+ public void test_02_TemplateInPlatformResourceURI() {
+ createFileInProject(TEST_02_FOLDER, TEST_02_TEMPLATE_FILE_NAME);
+ final DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration();
+ conf.setTemplateFile(TEST_02_DECLARED_TEMPLATE_FILE_NAME);
+ Assert.assertNull(conf.eResource());
+ final String expectedResult = buildExpectedTemplateURIAsString(TEST_02_FOLDER, TEST_02_TEMPLATE_FILE_NAME);
+ checkCreatedURL(conf.createTemplateFileURL(), expectedResult);
+ }
+
+ @Test
+ public void test_03_TemplateWithRelativeURI() {
+ createFileInProject(TEST_03_FOLDER, TEST_03_TEMPLATE_FILE_NAME);
+ final DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration();
+ conf.setTemplateFile(TEST_03_DECLARED_TEMPLATE_FILE_NAME);
+ Assert.assertNull(conf.eResource());
+ final String expectedResult = null;
+ checkCreatedURL(conf.createTemplateFileURL(), expectedResult);
+
+ }
+
+}
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/TemplateFileURLFromPlatformPluginTest.java b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/TemplateFileURLFromPlatformPluginTest.java
new file mode 100755
index 0000000..2c86c1d
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/TemplateFileURLFromPlatformPluginTest.java
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ * Copyright (c) 2020 CEA LIST and others.
+ *
+ * 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
+ * http://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
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests.internal.metamodel;
+
+import java.net.URL;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.papyrus.model2doc.core.generatorconfiguration.DefaultDocumentGeneratorConfiguration;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Check the calculus of the URL of the referenced template when the Generator configuration is in a Plaform plugin
+ */
+public class TemplateFileURLFromPlatformPluginTest {
+
+
+ private static final String TEST_01 = "Test_01_TemplateInPlatformPluginURI.generatorConfiguration"; //$NON-NLS-1$
+ private static final String TEST_02 = "Test_02_TemplateWithRelativeURI.generatorConfiguration"; //$NON-NLS-1$
+ private static final String TEST_03 = "Test_03_TemplateWithRelativeURI.generatorConfiguration"; //$NON-NLS-1$
+ private static final String TEST_04 = "Test_04_TemplateURI With Spaces.generatorConfiguration"; //$NON-NLS-1$
+ private static final String TEST_05 = "Test_05_TemplateURIWithAccentuatedCharéàù.generatorConfiguration"; //$NON-NLS-1$
+ private static final String TEST_06 = "Test_06_TemplateInAnotherFolder.generatorConfiguration"; //$NON-NLS-1$
+ private static final String TEST_07 = "Test_07_TemplateInAnotherFolder With Spaces.generatorConfiguration"; //$NON-NLS-1$
+ private static final String TEST_08 = "Test_08_TemplateInAnotherFolderWithAccentuatedCharéàù.generatorConfiguration"; //$NON-NLS-1$
+ private static final String TEST_09 = "Test_09_NullTemplateURI.generatorConfiguration"; //$NON-NLS-1$
+ private static final String TEST_10 = "Test_10_EmptyTemplateURI.generatorConfiguration"; //$NON-NLS-1$
+ private static final String TEST_11 = "Test_11_TemplateNotFound.generatorConfiguration"; //$NON-NLS-1$
+ private static final String TEST_12 = "Test_12_TemplateInPlatformResource.generatorConfiguration"; //$NON-NLS-1$
+
+
+ private final URI createURI(final String fileName) {
+ URI uri = URI.createPlatformPluginURI("org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin", true); //$NON-NLS-1$
+ uri = uri.appendSegment(fileName);
+ return uri;
+ }
+
+ private URL getTemplateURL(final URI modelURi) {
+ final ResourceSet set = new ResourceSetImpl();
+ final Resource res = set.getResource(modelURi, true);
+ Assert.assertTrue(res.getContents().size() > 0);
+ final EObject root = res.getContents().get(0);
+ Assert.assertTrue(root instanceof DefaultDocumentGeneratorConfiguration);
+ DefaultDocumentGeneratorConfiguration conf = (DefaultDocumentGeneratorConfiguration) root;
+
+ return conf.createTemplateFileURL();
+ }
+
+ protected void checkCreatedURL(final URL url, final String expectedEndResult) {
+ if (expectedEndResult == null) {
+ Assert.assertNull(url);
+ } else {
+ url.toString().endsWith(expectedEndResult);
+ }
+ }
+
+ @Test
+ public void test_01_TemplateInPlatformPluginURI() {
+ final URL templateURL = getTemplateURL(createURI(TEST_01));
+ final String expectedResult = "Test_01_TemplateInPlatformPluginURI.dotx"; //$NON-NLS-1$
+ checkCreatedURL(templateURL, expectedResult);
+ }
+
+ @Test
+ public void test_02_TemplateWithRelativeURI() {
+ final URL templateURL = getTemplateURL(createURI(TEST_02));
+ checkCreatedURL(templateURL, null);
+ }
+
+ @Test
+ public void test_03_TemplateWithRelativeURI() {
+ final URL templateURL = getTemplateURL(createURI(TEST_03));
+ checkCreatedURL(templateURL, null);
+ }
+
+ @Test
+ public void test_04_TemplateURIWithSpaces() {
+ final URL templateURL = getTemplateURL(createURI(TEST_04));
+ final String expectedResult = "Test_04_TemplateURI With Spaces.dotx"; //$NON-NLS-1$
+ checkCreatedURL(templateURL, expectedResult);
+ }
+
+ @Test
+ public void test_05_TemplateURIWithAccentuatedChar() {
+ final URL templateURL = getTemplateURL(createURI(TEST_05));
+ final String expectedResult = "Test_05_TemplateURIWithAccentuatedCharéàù"; //$NON-NLS-1$
+ checkCreatedURL(templateURL, expectedResult);
+ }
+
+ @Test
+ public void test_06_TemplateInAnotherFolder() {
+ final URL templateURL = getTemplateURL(createURI(TEST_06));
+ final String expectedResult = "AnotherFolder/Test_06_TemplateInAnotherFolder.dotx"; //$NON-NLS-1$
+ checkCreatedURL(templateURL, expectedResult);
+ }
+
+ @Test
+ public void test_07_TemplateInAnotherFolderWithSpaces() {
+ final URL templateURL = getTemplateURL(createURI(TEST_07));
+ final String expectedResult = "AnotherFolder With Spaces/Test_07_TemplateInAnotherFolder With Spaces.dotx"; //$NON-NLS-1$
+
+ checkCreatedURL(templateURL, expectedResult);
+ }
+
+ @Test
+ public void test_08_TemplateInAnotherFolderWithAccentuatedChar() {
+ final URL templateURL = getTemplateURL(createURI(TEST_08));
+
+ final String expectedResult = "AnotherFolderWithAccentuatedCharéàù/Test_08_TemplateInAnotherFolderWithAccentuatedCharéàù.dotx"; //$NON-NLS-1$
+ checkCreatedURL(templateURL, expectedResult);
+ }
+
+ @Test
+ public void test_09_NullTemplateURI() {
+ final URL templateURL = getTemplateURL(createURI(TEST_09));
+ checkCreatedURL(templateURL, null);
+ }
+
+ @Test
+ public void test_10_EmptyTemplateURI() {
+ final URL templateURL = getTemplateURL(createURI(TEST_10));
+ checkCreatedURL(templateURL, null);
+ }
+
+ @Test
+ public void test_11_TemplateNotFound() {
+ final URL templateURL = getTemplateURL(createURI(TEST_11));
+ checkCreatedURL(templateURL, null);
+ }
+
+ /**
+ * this case must not be able excepted if the developer made a mistake
+ */
+ @Test
+ public void test_12_TemplateInPlatformResource() {
+ final URL templateURL = getTemplateURL(createURI(TEST_12));
+ checkCreatedURL(templateURL, null);
+ }
+}
diff --git a/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/TemplateFileURLFromPlatformResourceTest.java b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/TemplateFileURLFromPlatformResourceTest.java
new file mode 100755
index 0000000..eb7388b
--- /dev/null
+++ b/tests/core/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/src/org/eclipse/papyrus/model2doc/core/generatorconfiguration/tests/internal/metamodel/TemplateFileURLFromPlatformResourceTest.java
@@ -0,0 +1,199 @@
+/*****************************************************************************
+ * Copyright (c) 2020 CEA LIST and others.
+ *
+ * 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
+ * http://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
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests.internal.metamodel;
+
+import java.net.URL;
+
+import org.eclipse.papyrus.model2doc.core.generatorconfiguration.DefaultDocumentGeneratorConfiguration;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Check the calculus of the URL of the referenced template when the Generator configuration is in a Plaform resource
+ */
+public class TemplateFileURLFromPlatformResourceTest extends AbstractTemplateFileURLTests {
+
+ private static final String TEST_01_TEMPLATE_DECLARED_FILE_NAME = "platform:/plugin/org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformResource/Test_01_TemplateInPlatformPluginURI.dotx"; //$NON-NLS-1$
+
+ private static final String TEST_02_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_02_TEMPLATE_FILE_NAME = "Test_02_TemplateWithRelativeURI.dotx"; //$NON-NLS-1$
+ private static final String TEST_02_DECLARED_TEMPLATE_FILE_NAME = TEST_02_FOLDER + "/" + TEST_02_TEMPLATE_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_03_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_03_TEMPLATE_FILE_NAME = "Test_03_TemplateWithRelativeURI.dotx"; //$NON-NLS-1$
+ private static final String TEST_03_DECLARED_TEMPLATE_FILE_NAME = "/" + TEST_03_FOLDER + "/" + TEST_03_TEMPLATE_FILE_NAME; //$NON-NLS-1$ //$NON-NLS-2$
+
+ private static final String TEST_04_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_04_TEMPLATE_FILE_NAME = "Test_04_TemplateURI With Spaces.dotx"; //$NON-NLS-1$
+ private static final String TEST_04_DECLARED_TEMPLATE_FILE_NAME = TEST_04_FOLDER + "/" + TEST_04_TEMPLATE_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_05_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_05_TEMPLATE_FILE_NAME = "Test_05_TemplateURIWithAccentuatedCharéàù.dotx"; //$NON-NLS-1$
+ private static final String TEST_05_DECLARED_TEMPLATE_FILE_NAME = TEST_05_FOLDER + "/" + TEST_05_TEMPLATE_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_06_FOLDER = "AnotherFolder"; //$NON-NLS-1$
+ private static final String TEST_06_TEMPLATE_FILE_NAME = "Test_06_TemplateInAnotherFolder.dotx"; //$NON-NLS-1$
+ private static final String TEST_06_DECLARED_TEMPLATE_FILE_NAME = TEST_06_FOLDER + "/" + TEST_06_TEMPLATE_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_07_FOLDER = "AnotherFolder With Spaces"; //$NON-NLS-1$
+ private static final String TEST_07_TEMPLATE_FILE_NAME = "Test_07_TemplateInAnotherFolder With Spaces.dotx"; //$NON-NLS-1$
+ private static final String TEST_07_DECLARED_TEMPLATE_FILE_NAME = TEST_07_FOLDER + "/" + TEST_07_TEMPLATE_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_08_FOLDER = "AnotherFolderWithAccentuatedCharéàù"; //$NON-NLS-1$
+ private static final String TEST_08_TEMPLATE_FILE_NAME = "Test_08_TemplateInAnotherFolderWithAccentuatedCharéàù.dotx"; //$NON-NLS-1$
+ private static final String TEST_08_DECLARED_TEMPLATE_FILE_NAME = TEST_08_FOLDER + "/" + TEST_08_TEMPLATE_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_09_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_09_TEMPLATE_FILE_NAME = null;
+ private static final String TEST_09_DECLARED_TEMPLATE_FILE_NAME = TEST_09_FOLDER + "/" + TEST_09_TEMPLATE_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_10_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_10_TEMPLATE_FILE_NAME = ""; //$NON-NLS-1$
+ private static final String TEST_10_DECLARED_TEMPLATE_FILE_NAME = TEST_10_FOLDER + "/" + TEST_10_TEMPLATE_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_11_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_11_TEMPLATE_FILE_NAME = "fantom.dotx"; //$NON-NLS-1$
+ private static final String TEST_11_DECLARED_TEMPLATE_FILE_NAME = TEST_11_FOLDER + "/" + TEST_11_TEMPLATE_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_12_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_12_TEMPLATE_FILE_NAME = "Test_12_TemplateInPlatformResourceURI"; //$NON-NLS-1$
+ private static final String TEST_12_DECLARED_TEMPLATE_FILE_NAME = "platform:/resource/" + PROJECT_NAME + "/" + TEST_12_FOLDER + "/" + TEST_12_TEMPLATE_FILE_NAME; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+
+ private static final String TEST_13_TEMPLATE_FILE_NAME = "Test_13_TemplateInPlatformResourceURI"; //$NON-NLS-1$
+ private static final String TEST_13_DECLARED_TEMPLATE_FILE_NAME = "C:/Somewhereplatform" + "/" + TEST_13_TEMPLATE_FILE_NAME; //$NON-NLS-1$ //$NON-NLS-2$
+
+
+ protected void checkCreatedURL(final URL url, final String expectedEndResult) {
+ if (expectedEndResult == null) {
+ Assert.assertNull(url);
+ } else {
+ url.toString().endsWith(expectedEndResult);
+ }
+ }
+
+ protected String buildExpectedTemplateURIAsString(final String folderName, final String templateName) {
+ return this.projectForTest.getName() + "/" + folderName + "/" + templateName; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test
+ public void test_01_TemplateInPlatformPluginURI() {
+ final DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration(TEST_01_TEMPLATE_DECLARED_FILE_NAME);
+ final String expectedResult = "org.eclipse.papyrus.model2doc.core.generatorconfiguration.tests/resources/TemplateFileURL/PlatformPlugin/Test_01_TemplateInPlatformPluginURI.dotx"; //$NON-NLS-1$
+ checkCreatedURL(conf.createTemplateFileURL(), expectedResult);
+ }
+
+ @Test
+ public void test_02_TemplateWithRelativeURI() {
+ createFileInProject(TEST_02_FOLDER, TEST_02_TEMPLATE_FILE_NAME);
+ final DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration(TEST_02_DECLARED_TEMPLATE_FILE_NAME);
+ final String expectedResult = buildExpectedTemplateURIAsString(TEST_02_FOLDER, TEST_02_TEMPLATE_FILE_NAME);
+ checkCreatedURL(conf.createTemplateFileURL(), expectedResult);
+ }
+
+ @Test
+ public void test_03_TemplateWithRelativeURI() {
+ createFileInProject(TEST_03_FOLDER, TEST_03_TEMPLATE_FILE_NAME);
+ final DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration(TEST_03_DECLARED_TEMPLATE_FILE_NAME);
+ final String expectedResult = buildExpectedTemplateURIAsString(TEST_03_FOLDER, TEST_03_TEMPLATE_FILE_NAME);
+ checkCreatedURL(conf.createTemplateFileURL(), expectedResult);
+ }
+
+ @Test
+ public void test_04_TemplateURIWithSpaces() {
+ createFileInProject(TEST_04_FOLDER, TEST_04_TEMPLATE_FILE_NAME);
+ final DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration(TEST_04_DECLARED_TEMPLATE_FILE_NAME);
+ final String expectedResult = buildExpectedTemplateURIAsString(TEST_04_FOLDER, TEST_04_TEMPLATE_FILE_NAME);
+ checkCreatedURL(conf.createTemplateFileURL(), expectedResult);
+ }
+
+ @Test
+ public void test_05_TemplateURIWithAccentuatedChar() {
+ createFileInProject(TEST_05_FOLDER, TEST_05_TEMPLATE_FILE_NAME);
+ final DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration(TEST_05_DECLARED_TEMPLATE_FILE_NAME);
+ final String expectedResult = buildExpectedTemplateURIAsString(TEST_05_FOLDER, TEST_05_TEMPLATE_FILE_NAME);
+ checkCreatedURL(conf.createTemplateFileURL(), expectedResult);
+ }
+
+
+ @Test
+ public void test_06_TemplateInAnotherFolder() {
+ createFileInProject(TEST_06_FOLDER, TEST_06_TEMPLATE_FILE_NAME);
+ final DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration(TEST_06_DECLARED_TEMPLATE_FILE_NAME);
+ final String expectedResult = buildExpectedTemplateURIAsString(TEST_06_FOLDER, TEST_06_TEMPLATE_FILE_NAME);
+ checkCreatedURL(conf.createTemplateFileURL(), expectedResult);
+ }
+
+ @Test
+ public void test_07_TemplateInAnotherFolderWithSpaces() {
+ createFileInProject(TEST_07_FOLDER, TEST_07_TEMPLATE_FILE_NAME);
+ final DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration(TEST_07_DECLARED_TEMPLATE_FILE_NAME);
+ final String expectedResult = buildExpectedTemplateURIAsString(TEST_07_FOLDER, TEST_07_TEMPLATE_FILE_NAME);
+ checkCreatedURL(conf.createTemplateFileURL(), expectedResult);
+ }
+
+ @Test
+ public void test_08_TemplateInAnotherFolderWithAccentuatedChar() {
+ createFileInProject(TEST_08_FOLDER, TEST_08_TEMPLATE_FILE_NAME);
+ final DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration(TEST_08_DECLARED_TEMPLATE_FILE_NAME);
+ final String expectedResult = buildExpectedTemplateURIAsString(TEST_08_FOLDER, TEST_08_TEMPLATE_FILE_NAME);
+ checkCreatedURL(conf.createTemplateFileURL(), expectedResult);
+
+ }
+
+ @Test
+ public void test_09_NullTemplateURI() {
+ final DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration(TEST_09_DECLARED_TEMPLATE_FILE_NAME);
+ final String expectedResult = null;
+ checkCreatedURL(conf.createTemplateFileURL(), expectedResult);
+ }
+
+ @Test
+ public void test_10_EmptyTemplateURI() {
+ final DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration(TEST_10_DECLARED_TEMPLATE_FILE_NAME);
+ final String expectedResult = null;
+ checkCreatedURL(conf.createTemplateFileURL(), expectedResult);
+ }
+
+ @Test
+ public void test_11_TemplateNotFound() {
+ createFolderInContainer(this.projectForTest, TEST_11_FOLDER); // we don't create the file in it the goal of the test
+ final DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration(TEST_11_DECLARED_TEMPLATE_FILE_NAME);
+ final String expectedResult = null;
+ checkCreatedURL(conf.createTemplateFileURL(), expectedResult);
+ }
+
+ /**
+ * this case must not be possible excepted if the developer made a mistake
+ */
+ @Test
+ public void test_12_TemplateInPlatformResource() {
+ createFileInProject(TEST_12_FOLDER, TEST_12_TEMPLATE_FILE_NAME);
+ final DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration(TEST_12_DECLARED_TEMPLATE_FILE_NAME);
+ final String expectedResult = buildExpectedTemplateURIAsString(TEST_12_FOLDER, TEST_12_TEMPLATE_FILE_NAME);
+ checkCreatedURL(conf.createTemplateFileURL(), expectedResult);
+ }
+
+
+ @Test
+ public void test_13_TemplateURIOSPath() {
+ final DefaultDocumentGeneratorConfiguration conf = createDefaultDocumentGeneratorConfiguration(TEST_13_DECLARED_TEMPLATE_FILE_NAME);
+ final String expectedResult = null;
+ checkCreatedURL(conf.createTemplateFileURL(), expectedResult);
+ }
+
+
+}