Bug 570040: [Model2Doc] org.eclipse.papyrus.model2doc.emf.documentstructure.Image must extends DefaultFileReferenceImpl
- add the required extension to Image
- create JUnit tests for it
Change-Id: I1b6911d76e81a2b14e7decbf57dd90afc34f6df3
Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
diff --git a/features/org.eclipse.papyrus.model2doc.tests.feature/feature.xml b/features/org.eclipse.papyrus.model2doc.tests.feature/feature.xml
index 20e18f0..3f8bbd0 100755
--- a/features/org.eclipse.papyrus.model2doc.tests.feature/feature.xml
+++ b/features/org.eclipse.papyrus.model2doc.tests.feature/feature.xml
@@ -75,4 +75,10 @@
install-size="0"
version="0.0.0"/>
+ <plugin
+ id="org.eclipse.papyrus.model2doc.emf.documentstructure.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
</feature>
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/EmptyLineItemProvider.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/EmptyLineItemProvider.java
index 06f17cc..414dd06 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/EmptyLineItemProvider.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/EmptyLineItemProvider.java
@@ -161,7 +161,7 @@
updateChildren(notification);
switch (notification.getFeatureID(EmptyLine.class)) {
- case DocumentStructurePackage.NEW_LINE__DATA_SOURCE:
+ case DocumentStructurePackage.EMPTY_LINE__DATA_SOURCE:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/ImageItemProvider.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/ImageItemProvider.java
index 4e7a933..7073c92 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/ImageItemProvider.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/ImageItemProvider.java
@@ -19,23 +19,14 @@
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IChildCreationExtender;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.model2doc.core.builtintypes.provider.DefaultFileReferenceItemProvider;
import org.eclipse.papyrus.model2doc.emf.documentstructure.DocumentStructureFactory;
import org.eclipse.papyrus.model2doc.emf.documentstructure.DocumentStructurePackage;
import org.eclipse.papyrus.model2doc.emf.documentstructure.Image;
@@ -48,13 +39,7 @@
* @generated
*/
public class ImageItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
+ extends DefaultFileReferenceItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
@@ -190,7 +175,7 @@
*/
@Override
public String getText(Object object) {
- String label = ((Image) object).getImagePath();
+ String label = ((Image) object).getFilePath();
return label == null || label.length() == 0 ? getString("_UI_Image_type") : //$NON-NLS-1$
getString("_UI_Image_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -236,16 +221,4 @@
DocumentStructureFactory.eINSTANCE.createEMFDataSource()));
}
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return ((IChildCreationExtender) adapterFactory).getResourceLocator();
- }
-
}
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.ecore b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.ecore
index f6923c8..f1e763b 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.ecore
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.ecore
@@ -59,7 +59,7 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="title" ordered="false"
lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Image" eSuperTypes="#//LeafBodyPart">
+ <eClassifiers xsi:type="ecore:EClass" name="Image" eSuperTypes="../../org.eclipse.papyrus.model2doc.core.builtintypes/model/BuiltInTypes.ecore#//DefaultFileReference #//LeafBodyPart">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="This object represents an image inserted in the document."/>
</eAnnotations>
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.genmodel b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.genmodel
index 8846915..75c8ec0 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.genmodel
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.genmodel
@@ -24,11 +24,11 @@
<details key="COMMENTS" value="PROCESS"/>
<details key="DERIVED_FEATURES" value="PROCESS"/>
<details key="SUPER_CLASS_ORDER" value="PROCESS"/>
- <details key="DUPLICATE_OPERATION_INHERITANCE" value="DISCARD"/>
- <details key="REDEFINING_OPERATIONS" value="REPORT"/>
+ <details key="DUPLICATE_OPERATION_INHERITANCE" value="PROCESS"/>
+ <details key="REDEFINING_OPERATIONS" value="PROCESS"/>
<details key="INVARIANT_CONSTRAINTS" value="PROCESS"/>
<details key="UNION_PROPERTIES" value="REPORT"/>
- <details key="DUPLICATE_OPERATIONS" value="DISCARD"/>
+ <details key="DUPLICATE_OPERATIONS" value="PROCESS"/>
<details key="NON_API_INVARIANTS" value="IGNORE"/>
<details key="CAMEL_CASE_NAMES" value="IGNORE"/>
<details key="SUBSETTING_PROPERTIES" value="REPORT"/>
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.notation b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.notation
index cad3af2..621fc52 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.notation
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.notation
@@ -826,6 +826,10 @@
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_XNGN9pcXEemjzoOvLRrzSw"/>
</children>
<children xmi:type="notation:BasicCompartment" xmi:id="_XNG1AJcXEemjzoOvLRrzSw" type="Class_OperationCompartment">
+ <children xmi:type="notation:Shape" xmi:id="_S2FZsEUwEeuZlM4bILw9_g" type="Operation_ClassOperationLabel">
+ <element xmi:type="uml:Operation" href="pathmap://MODEL2DOC/BUILTIN_TYPES/BuiltInTypes.uml#_c4WUkELaEeuyx6IwESzSjg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_S2FZsUUwEeuZlM4bILw9_g"/>
+ </children>
<styles xmi:type="notation:TitleStyle" xmi:id="_XNG1AZcXEemjzoOvLRrzSw"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_XNG1ApcXEemjzoOvLRrzSw"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_XNG1A5cXEemjzoOvLRrzSw"/>
@@ -1457,6 +1461,17 @@
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_wlf7IDoHEeutb_jRObmUug" id="(1.0,0.6)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_wlf7IToHEeutb_jRObmUug" id="(0.4968944099378882,1.0)"/>
</edges>
+ <edges xmi:type="notation:Connector" xmi:id="_Uc8p0EUwEeuZlM4bILw9_g" type="Generalization_Edge" source="_bYhZ8B4gEemmq_cjeiIGww" target="_XM-SIJcXEemjzoOvLRrzSw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Uc-fAEUwEeuZlM4bILw9_g" type="Generalization_StereotypeLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_hDr08EU9EeuiX_bKpBiolQ" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Uc_GEEUwEeuZlM4bILw9_g" y="40"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_Uc8p0UUwEeuZlM4bILw9_g"/>
+ <element xmi:type="uml:Generalization" href="documentstructure.uml#_Ubc1AEUwEeuZlM4bILw9_g"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Uc8p0kUwEeuZlM4bILw9_g" points="[1120, 681, -643984, -643984]$[1120, 760, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Uf2M0EUwEeuZlM4bILw9_g" id="(0.5,1.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Uf2M0UUwEeuZlM4bILw9_g" id="(0.4968944099378882,0.0)"/>
+ </edges>
</notation:Diagram>
<css:ModelStyleSheets xmi:id="_MwqUgB4nEemmq_cjeiIGww">
<stylesheets xmi:type="css:StyleSheetReference" xmi:id="_Mwq7kB4nEemmq_cjeiIGww" path="/org.eclipse.papyrus.model2doc.emf.documentstructure/model/custom.css"/>
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.uml b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.uml
index be02ff7..a86779c 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.uml
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.uml
@@ -59,6 +59,9 @@
<ownedComment xmi:type="uml:Comment" xmi:id="_YhIsgFwuEemF3-UZXrtb4g" annotatedElement="_bYgy4B4gEemmq_cjeiIGww">
<body>This object represents an image inserted in the document.</body>
</ownedComment>
+ <generalization xmi:type="uml:Generalization" xmi:id="_Ubc1AEUwEeuZlM4bILw9_g">
+ <general xmi:type="uml:Class" href="pathmap://MODEL2DOC/BUILTIN_TYPES/BuiltInTypes.uml#_tL-NYJQUEemHKPZQudxUGA"/>
+ </generalization>
<ownedAttribute xmi:type="uml:Property" xmi:id="_A6mgEFwuEemF3-UZXrtb4g" name="imagePath">
<ownedComment xmi:type="uml:Comment" xmi:id="_TkU0QFwuEemF3-UZXrtb4g" annotatedElement="_A6mgEFwuEemF3-UZXrtb4g">
<body>The path can be in the user workspace in platform:/resource or, somewhere on the user computer, so for windows, it will be in C:/ for example.</body>
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/DocumentStructurePackage.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/DocumentStructurePackage.java
index aaf723a..242b727 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/DocumentStructurePackage.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/DocumentStructurePackage.java
@@ -598,6 +598,97 @@
int LEAF_BODY_PART = 11;
/**
+ * The meta object id for the '{@link org.eclipse.papyrus.model2doc.emf.documentstructure.impl.ImageImpl <em>Image</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.model2doc.emf.documentstructure.impl.ImageImpl
+ * @see org.eclipse.papyrus.model2doc.emf.documentstructure.impl.DocumentStructurePackageImpl#getImage()
+ * @generated
+ */
+ int IMAGE = 10;
+
+ /**
+ * The feature id for the '<em><b>File Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int IMAGE__FILE_PATH = BuiltInTypesPackage.DEFAULT_FILE_REFERENCE__FILE_PATH;
+
+ /**
+ * The feature id for the '<em><b>Data Source</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int IMAGE__DATA_SOURCE = BuiltInTypesPackage.DEFAULT_FILE_REFERENCE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Image Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int IMAGE__IMAGE_PATH = BuiltInTypesPackage.DEFAULT_FILE_REFERENCE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Caption</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int IMAGE__CAPTION = BuiltInTypesPackage.DEFAULT_FILE_REFERENCE_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Image</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int IMAGE_FEATURE_COUNT = BuiltInTypesPackage.DEFAULT_FILE_REFERENCE_FEATURE_COUNT + 3;
+
+ /**
+ * The operation id for the '<em>Get File Path</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int IMAGE___GET_FILE_PATH = BuiltInTypesPackage.DEFAULT_FILE_REFERENCE___GET_FILE_PATH;
+
+ /**
+ * The operation id for the '<em>Get File Accessor</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int IMAGE___GET_FILE_ACCESSOR = BuiltInTypesPackage.DEFAULT_FILE_REFERENCE___GET_FILE_ACCESSOR;
+
+ /**
+ * The number of operations of the '<em>Image</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int IMAGE_OPERATION_COUNT = BuiltInTypesPackage.DEFAULT_FILE_REFERENCE_OPERATION_COUNT + 0;
+
+ /**
* The feature id for the '<em><b>Data Source</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -628,67 +719,6 @@
int LEAF_BODY_PART_OPERATION_COUNT = BODY_PART_OPERATION_COUNT + 0;
/**
- * The meta object id for the '{@link org.eclipse.papyrus.model2doc.emf.documentstructure.impl.ImageImpl <em>Image</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.model2doc.emf.documentstructure.impl.ImageImpl
- * @see org.eclipse.papyrus.model2doc.emf.documentstructure.impl.DocumentStructurePackageImpl#getImage()
- * @generated
- */
- int IMAGE = 10;
-
- /**
- * The feature id for the '<em><b>Data Source</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int IMAGE__DATA_SOURCE = LEAF_BODY_PART__DATA_SOURCE;
-
- /**
- * The feature id for the '<em><b>Image Path</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int IMAGE__IMAGE_PATH = LEAF_BODY_PART_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Caption</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int IMAGE__CAPTION = LEAF_BODY_PART_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Image</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int IMAGE_FEATURE_COUNT = LEAF_BODY_PART_FEATURE_COUNT + 2;
-
- /**
- * The number of operations of the '<em>Image</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int IMAGE_OPERATION_COUNT = LEAF_BODY_PART_OPERATION_COUNT + 0;
-
- /**
* The meta object id for the '{@link org.eclipse.papyrus.model2doc.emf.documentstructure.impl.EMFDataSourceImpl <em>EMF Data Source</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1218,6 +1248,16 @@
int INSERTED_FILE___GET_FILE_PATH = BuiltInTypesPackage.DEFAULT_FILE_REFERENCE___GET_FILE_PATH;
/**
+ * The operation id for the '<em>Get File Accessor</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int INSERTED_FILE___GET_FILE_ACCESSOR = BuiltInTypesPackage.DEFAULT_FILE_REFERENCE___GET_FILE_ACCESSOR;
+
+ /**
* The number of operations of the '<em>Inserted File</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1237,7 +1277,7 @@
* @see org.eclipse.papyrus.model2doc.emf.documentstructure.impl.DocumentStructurePackageImpl#getEmptyLine()
* @generated
*/
- int NEW_LINE = 21;
+ int EMPTY_LINE = 21;
/**
* The feature id for the '<em><b>Data Source</b></em>' containment reference.
@@ -1247,7 +1287,7 @@
* @generated
* @ordered
*/
- int NEW_LINE__DATA_SOURCE = LEAF_BODY_PART__DATA_SOURCE;
+ int EMPTY_LINE__DATA_SOURCE = LEAF_BODY_PART__DATA_SOURCE;
/**
* The number of structural features of the '<em>Empty Line</em>' class.
@@ -1257,7 +1297,7 @@
* @generated
* @ordered
*/
- int NEW_LINE_FEATURE_COUNT = LEAF_BODY_PART_FEATURE_COUNT + 0;
+ int EMPTY_LINE_FEATURE_COUNT = LEAF_BODY_PART_FEATURE_COUNT + 0;
/**
* The number of operations of the '<em>Empty Line</em>' class.
@@ -1267,8 +1307,7 @@
* @generated
* @ordered
*/
- int NEW_LINE_OPERATION_COUNT = LEAF_BODY_PART_OPERATION_COUNT + 0;
-
+ int EMPTY_LINE_OPERATION_COUNT = LEAF_BODY_PART_OPERATION_COUNT + 0;
/**
* Returns the meta object for class '{@link org.eclipse.papyrus.model2doc.emf.documentstructure.TextDocument <em>Text Document</em>}'.
@@ -2216,7 +2255,7 @@
* @see org.eclipse.papyrus.model2doc.emf.documentstructure.impl.DocumentStructurePackageImpl#getEmptyLine()
* @generated
*/
- EClass NEW_LINE = eINSTANCE.getEmptyLine();
+ EClass EMPTY_LINE = eINSTANCE.getEmptyLine();
}
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/Image.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/Image.java
index f55eaff..86a19c4 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/Image.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/Image.java
@@ -13,6 +13,8 @@
*/
package org.eclipse.papyrus.model2doc.emf.documentstructure;
+import org.eclipse.papyrus.model2doc.core.builtintypes.DefaultFileReference;
+
/**
* <!-- begin-user-doc -->
@@ -35,7 +37,7 @@
* @model
* @generated
*/
-public interface Image extends LeafBodyPart {
+public interface Image extends DefaultFileReference, LeafBodyPart {
/**
* Returns the value of the '<em><b>Image Path</b></em>' attribute.
* <!-- begin-user-doc -->
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/DocumentStructureFactoryImpl.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/DocumentStructureFactoryImpl.java
index 364118e..35b7354 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/DocumentStructureFactoryImpl.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/DocumentStructureFactoryImpl.java
@@ -98,7 +98,7 @@
return createStringVersion();
case DocumentStructurePackage.INSERTED_FILE:
return createInsertedFile();
- case DocumentStructurePackage.NEW_LINE:
+ case DocumentStructurePackage.EMPTY_LINE:
return createEmptyLine();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/DocumentStructurePackageImpl.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/DocumentStructurePackageImpl.java
index 7505293..41e4460 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/DocumentStructurePackageImpl.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/DocumentStructurePackageImpl.java
@@ -882,7 +882,7 @@
insertedFileEClass = createEClass(INSERTED_FILE);
- emptyLineEClass = createEClass(NEW_LINE);
+ emptyLineEClass = createEClass(EMPTY_LINE);
}
/**
@@ -928,6 +928,7 @@
paragraphEClass.getESuperTypes().add(this.getComposedBodyPart());
composedBodyPartEClass.getESuperTypes().add(this.getBodyPart());
titleEClass.getESuperTypes().add(this.getComposedBodyPart());
+ imageEClass.getESuperTypes().add(theBuiltInTypesPackage.getDefaultFileReference());
imageEClass.getESuperTypes().add(this.getLeafBodyPart());
leafBodyPartEClass.getESuperTypes().add(this.getBodyPart());
emfDataSourceEClass.getESuperTypes().add(this.getDataSource());
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/EmptyLineImpl.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/EmptyLineImpl.java
index b03007a..eb8a052 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/EmptyLineImpl.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/EmptyLineImpl.java
@@ -69,7 +69,7 @@
*/
@Override
protected EClass eStaticClass() {
- return DocumentStructurePackage.Literals.NEW_LINE;
+ return DocumentStructurePackage.Literals.EMPTY_LINE;
}
/**
@@ -93,7 +93,7 @@
DataSource oldDataSource = dataSource;
dataSource = newDataSource;
if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DocumentStructurePackage.NEW_LINE__DATA_SOURCE, oldDataSource, newDataSource);
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DocumentStructurePackage.EMPTY_LINE__DATA_SOURCE, oldDataSource, newDataSource);
if (msgs == null) {
msgs = notification;
} else {
@@ -114,17 +114,17 @@
if (newDataSource != dataSource) {
NotificationChain msgs = null;
if (dataSource != null) {
- msgs = ((InternalEObject) dataSource).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DocumentStructurePackage.NEW_LINE__DATA_SOURCE, null, msgs);
+ msgs = ((InternalEObject) dataSource).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DocumentStructurePackage.EMPTY_LINE__DATA_SOURCE, null, msgs);
}
if (newDataSource != null) {
- msgs = ((InternalEObject) newDataSource).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DocumentStructurePackage.NEW_LINE__DATA_SOURCE, null, msgs);
+ msgs = ((InternalEObject) newDataSource).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DocumentStructurePackage.EMPTY_LINE__DATA_SOURCE, null, msgs);
}
msgs = basicSetDataSource(newDataSource, msgs);
if (msgs != null) {
msgs.dispatch();
}
} else if (eNotificationRequired()) {
- eNotify(new ENotificationImpl(this, Notification.SET, DocumentStructurePackage.NEW_LINE__DATA_SOURCE, newDataSource, newDataSource));
+ eNotify(new ENotificationImpl(this, Notification.SET, DocumentStructurePackage.EMPTY_LINE__DATA_SOURCE, newDataSource, newDataSource));
}
}
@@ -137,7 +137,7 @@
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case DocumentStructurePackage.NEW_LINE__DATA_SOURCE:
+ case DocumentStructurePackage.EMPTY_LINE__DATA_SOURCE:
return basicSetDataSource(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
@@ -152,7 +152,7 @@
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case DocumentStructurePackage.NEW_LINE__DATA_SOURCE:
+ case DocumentStructurePackage.EMPTY_LINE__DATA_SOURCE:
return getDataSource();
}
return super.eGet(featureID, resolve, coreType);
@@ -167,7 +167,7 @@
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case DocumentStructurePackage.NEW_LINE__DATA_SOURCE:
+ case DocumentStructurePackage.EMPTY_LINE__DATA_SOURCE:
setDataSource((DataSource) newValue);
return;
}
@@ -183,7 +183,7 @@
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case DocumentStructurePackage.NEW_LINE__DATA_SOURCE:
+ case DocumentStructurePackage.EMPTY_LINE__DATA_SOURCE:
setDataSource((DataSource) null);
return;
}
@@ -199,7 +199,7 @@
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case DocumentStructurePackage.NEW_LINE__DATA_SOURCE:
+ case DocumentStructurePackage.EMPTY_LINE__DATA_SOURCE:
return dataSource != null;
}
return super.eIsSet(featureID);
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/ImageImpl.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/ImageImpl.java
index ce7158a..8d005ac 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/ImageImpl.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/ImageImpl.java
@@ -20,11 +20,12 @@
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
-
+import org.eclipse.papyrus.model2doc.core.builtintypes.impl.DefaultFileReferenceImpl;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.BodyPart;
import org.eclipse.papyrus.model2doc.emf.documentstructure.DataSource;
import org.eclipse.papyrus.model2doc.emf.documentstructure.DocumentStructurePackage;
import org.eclipse.papyrus.model2doc.emf.documentstructure.Image;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.LeafBodyPart;
/**
* <!-- begin-user-doc -->
@@ -41,7 +42,7 @@
*
* @generated
*/
-public class ImageImpl extends MinimalEObjectImpl.Container implements Image {
+public class ImageImpl extends DefaultFileReferenceImpl implements Image {
/**
* The cached value of the '{@link #getDataSource() <em>Data Source</em>}' containment reference.
* <!-- begin-user-doc -->
@@ -330,6 +331,56 @@
* @generated
*/
@Override
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
+ if (baseClass == BodyPart.class) {
+ switch (derivedFeatureID) {
+ case DocumentStructurePackage.IMAGE__DATA_SOURCE:
+ return DocumentStructurePackage.BODY_PART__DATA_SOURCE;
+ default:
+ return -1;
+ }
+ }
+ if (baseClass == LeafBodyPart.class) {
+ switch (derivedFeatureID) {
+ default:
+ return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
+ if (baseClass == BodyPart.class) {
+ switch (baseFeatureID) {
+ case DocumentStructurePackage.BODY_PART__DATA_SOURCE:
+ return DocumentStructurePackage.IMAGE__DATA_SOURCE;
+ default:
+ return -1;
+ }
+ }
+ if (baseClass == LeafBodyPart.class) {
+ switch (baseFeatureID) {
+ default:
+ return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
public String toString() {
if (eIsProxy()) {
return super.toString();
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/util/DocumentStructureAdapterFactory.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/util/DocumentStructureAdapterFactory.java
index 251a1fc..93adcd0 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/util/DocumentStructureAdapterFactory.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/util/DocumentStructureAdapterFactory.java
@@ -204,6 +204,16 @@
}
@Override
+ public Adapter caseIFileReference(IFileReference object) {
+ return createIFileReferenceAdapter();
+ }
+
+ @Override
+ public Adapter caseDefaultFileReference(DefaultFileReference object) {
+ return createDefaultFileReferenceAdapter();
+ }
+
+ @Override
public Adapter caseAbstractTable(AbstractTable object) {
return createAbstractTableAdapter();
}
@@ -249,16 +259,6 @@
}
@Override
- public Adapter caseIFileReference(IFileReference object) {
- return createIFileReferenceAdapter();
- }
-
- @Override
- public Adapter caseDefaultFileReference(DefaultFileReference object) {
- return createDefaultFileReferenceAdapter();
- }
-
- @Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/util/DocumentStructureSwitch.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/util/DocumentStructureSwitch.java
index a85644b..72a7e19 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/util/DocumentStructureSwitch.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/util/DocumentStructureSwitch.java
@@ -199,9 +199,15 @@
Image image = (Image) theEObject;
T result = caseImage(image);
if (result == null) {
+ result = caseDefaultFileReference(image);
+ }
+ if (result == null) {
result = caseLeafBodyPart(image);
}
if (result == null) {
+ result = caseIFileReference(image);
+ }
+ if (result == null) {
result = caseBodyPart(image);
}
if (result == null) {
@@ -355,7 +361,7 @@
}
return result;
}
- case DocumentStructurePackage.NEW_LINE: {
+ case DocumentStructurePackage.EMPTY_LINE: {
EmptyLine emptyLine = (EmptyLine) theEObject;
T result = caseEmptyLine(emptyLine);
if (result == null) {
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.classpath b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.classpath
new file mode 100755
index 0000000..a42a828
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src">
+ <attributes>
+ <attribute name="test" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.project b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.project
new file mode 100755
index 0000000..0bd8456
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.model2doc.emf.documentstructure.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.settings/org.eclipse.core.resources.prefs b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..896a9a5
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
\ No newline at end of file
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.settings/org.eclipse.core.runtime.prefs b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.settings/org.eclipse.core.runtime.prefs
new file mode 100755
index 0000000..5a0ad22
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.settings/org.eclipse.jdt.core.prefs b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..037f04a
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,319 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..1a3bd02
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,127 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License 2.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_modifiers=false
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.settings/org.eclipse.pde.api.tools.prefs b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..b2260f8
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,104 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_FIELD=Warning
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Warning
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Warning
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+changed_execution_env=Warning
+eclipse.preferences.version=1
+incompatible_api_component_version=Warning
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+incompatible_api_component_version_report_major_without_breaking_change=Error
+incompatible_api_component_version_report_minor_without_api_change=Error
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/META-INF/MANIFEST.MF b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..e52b0cf
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.model2doc.emf.documentstructure.tests
+Bundle-Version: 0.8.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.model2doc.emf.documentstructure.tests.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.ui;bundle-version="[3.118.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
+ org.eclipse.papyrus.infra.core.log;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.model2doc.emf.documentstructure;bundle-version="[0.8.0,1.0.0)",
+ org.eclipse.papyrus.model2doc.core.builtintypes;bundle-version="[0.8.0,1.0.0)",
+ org.junit;bundle-version="[4.13.0,5.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.13.0,4.0.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.23.0,3.0.0)",
+ org.eclipse.emf.ecore.xmi;bundle-version="[2.16.0,3.0.0)"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Automatic-Module-Name: org.eclipse.papyrus.model2doc.emf.documentstructure.tests
+Bundle-ActivationPolicy: lazy
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/OSGI-INF/l10n/bundle.properties b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/OSGI-INF/l10n/bundle.properties
new file mode 100755
index 0000000..92ab3b9
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.model2doc.emf.documentstructure.tests
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus-Model2doc - Document Structure Tests (Incubation)
\ No newline at end of file
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/about.html b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/about.html
new file mode 100755
index 0000000..ef2872f
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/build.properties b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/build.properties
new file mode 100755
index 0000000..0a42dee
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ OSGI-INF/,\
+ about.html,\
+ resources/
+src.includes = about.html
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/pom.xml b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/pom.xml
new file mode 100755
index 0000000..bfad51c
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.papyrus.model2doc.tests-emf</groupId>
+ <artifactId>org.eclipse.papyrus.model2doc.tests.emf</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.papyrus.model2doc.emf.documentstructure.tests</artifactId>
+ <version>0.8.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+</project>
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/InTheAir/Test_01_ImageInPlatformPluginURI.png b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/InTheAir/Test_01_ImageInPlatformPluginURI.png
new file mode 100755
index 0000000..e2bd361
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/InTheAir/Test_01_ImageInPlatformPluginURI.png
Binary files differ
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/AnotherFolder With Spaces/Test_07_ImageInAnotherFolder With Spaces.png b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/AnotherFolder With Spaces/Test_07_ImageInAnotherFolder With Spaces.png
new file mode 100755
index 0000000..e2bd361
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/AnotherFolder With Spaces/Test_07_ImageInAnotherFolder With Spaces.png
Binary files differ
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/AnotherFolder/Test_06_ImageInAnotherFolder.png b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/AnotherFolder/Test_06_ImageInAnotherFolder.png
new file mode 100755
index 0000000..e2bd361
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/AnotherFolder/Test_06_ImageInAnotherFolder.png
Binary files differ
diff --git "a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/AnotherFolderWithAccentuatedChar\303\251\303\240\303\271/Test_08_ImageInAnotherFolderWithAccentuatedChar\303\251\303\240\303\271.png" "b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/AnotherFolderWithAccentuatedChar\303\251\303\240\303\271/Test_08_ImageInAnotherFolderWithAccentuatedChar\303\251\303\240\303\271.png"
new file mode 100755
index 0000000..e2bd361
--- /dev/null
+++ "b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/AnotherFolderWithAccentuatedChar\303\251\303\240\303\271/Test_08_ImageInAnotherFolderWithAccentuatedChar\303\251\303\240\303\271.png"
Binary files differ
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_01_ImageInPlatformPluginURI.pds b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_01_ImageInPlatformPluginURI.pds
new file mode 100755
index 0000000..49afe56
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_01_ImageInPlatformPluginURI.pds
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:Image xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmi:id="_5QOlIEqmEeuo7_8Ih1SA6A" filePath="platform:/plugin/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_01_ImageInPlatformPluginURI.png" />
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_01_ImageInPlatformPluginURI.png b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_01_ImageInPlatformPluginURI.png
new file mode 100755
index 0000000..e2bd361
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_01_ImageInPlatformPluginURI.png
Binary files differ
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_02_ImageWithRelativeURI.pds b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_02_ImageWithRelativeURI.pds
new file mode 100755
index 0000000..ff21615
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_02_ImageWithRelativeURI.pds
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:Image xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmi:id="_5QOlIEqmEeuo7_8Ih1SA6A" filePath="resources/ImageURL/PlatformPlugin/Test_02_ImageWithRelativeURI.png" />
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_02_ImageWithRelativeURI.png b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_02_ImageWithRelativeURI.png
new file mode 100755
index 0000000..e2bd361
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_02_ImageWithRelativeURI.png
Binary files differ
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_03_ImageWithRelativeURI.pds b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_03_ImageWithRelativeURI.pds
new file mode 100755
index 0000000..666d75b
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_03_ImageWithRelativeURI.pds
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:Image xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmi:id="_5QOlIEqmEeuo7_8Ih1SA6A" filePath="/resources/ImageURL/PlatformPlugin/Test_02_ImageWithRelativeURI.png" />
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_03_ImageWithRelativeURI.png b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_03_ImageWithRelativeURI.png
new file mode 100755
index 0000000..e2bd361
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_03_ImageWithRelativeURI.png
Binary files differ
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_04_ImageURI With Spaces.pds b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_04_ImageURI With Spaces.pds
new file mode 100755
index 0000000..10763bc
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_04_ImageURI With Spaces.pds
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:Image xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmi:id="_5QOlIEqmEeuo7_8Ih1SA6A" filePath="platform:/plugin/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_04_ImageURI With Spaces.png" />
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_04_ImageURI With Spaces.png b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_04_ImageURI With Spaces.png
new file mode 100755
index 0000000..e2bd361
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_04_ImageURI With Spaces.png
Binary files differ
diff --git "a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_05_ImageURIWithAccentuatedChar\303\251\303\240\303\271.pds" "b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_05_ImageURIWithAccentuatedChar\303\251\303\240\303\271.pds"
new file mode 100755
index 0000000..4a64c44
--- /dev/null
+++ "b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_05_ImageURIWithAccentuatedChar\303\251\303\240\303\271.pds"
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:Image xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmi:id="_5QOlIEqmEeuo7_8Ih1SA6A" filePath="platform:/plugin/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_05_ImageURIWithAccentuatedCharéàù.png" />
diff --git "a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_05_ImageURIWithAccentuatedChar\303\251\303\240\303\271.png" "b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_05_ImageURIWithAccentuatedChar\303\251\303\240\303\271.png"
new file mode 100755
index 0000000..e2bd361
--- /dev/null
+++ "b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_05_ImageURIWithAccentuatedChar\303\251\303\240\303\271.png"
Binary files differ
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_06_ImageInAnotherFolder.pds b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_06_ImageInAnotherFolder.pds
new file mode 100755
index 0000000..c65acb3
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_06_ImageInAnotherFolder.pds
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:Image xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmi:id="_5QOlIEqmEeuo7_8Ih1SA6A" filePath="platform:/plugin/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/AnotherFolder/Test_06_ImageInAnotherFolder.png" />
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_07_ImageInAnotherFolder With Spaces.pds b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_07_ImageInAnotherFolder With Spaces.pds
new file mode 100755
index 0000000..192158d
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_07_ImageInAnotherFolder With Spaces.pds
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:Image xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmi:id="_5QOlIEqmEeuo7_8Ih1SA6A" filePath="platform:/plugin/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/AnotherFolder With Spaces/Test_07_ImageInAnotherFolder With Spaces.png" />
diff --git "a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_08_ImageInAnotherFolderWithAccentuatedChar\303\251\303\240\303\271.pds" "b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_08_ImageInAnotherFolderWithAccentuatedChar\303\251\303\240\303\271.pds"
new file mode 100755
index 0000000..19c8663
--- /dev/null
+++ "b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_08_ImageInAnotherFolderWithAccentuatedChar\303\251\303\240\303\271.pds"
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:Image xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmi:id="_5QOlIEqmEeuo7_8Ih1SA6A" filePath="platform:/plugin/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/AnotherFolderWithAccentuatedCharéàù/Test_08_ImageInAnotherFolderWithAccentuatedCharéàù.png" />
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_09_NullImageURI.pds b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_09_NullImageURI.pds
new file mode 100755
index 0000000..6270821
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_09_NullImageURI.pds
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:Image xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmi:id="_5QOlIEqmEeuo7_8Ih1SA6A" />
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_10_EmptyImageURI.pds b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_10_EmptyImageURI.pds
new file mode 100755
index 0000000..be1fa6b
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_10_EmptyImageURI.pds
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:Image xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmi:id="_5QOlIEqmEeuo7_8Ih1SA6A" filePath=""/>
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_11_ImageNotFound.pds b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_11_ImageNotFound.pds
new file mode 100755
index 0000000..477ce9e
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_11_ImageNotFound.pds
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:Image xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmi:id="_5QOlIEqmEeuo7_8Ih1SA6A" filePath="platform:/plugin/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/fantomFile.png"/>
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_12_ImageInPlatformResource.pds b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_12_ImageInPlatformResource.pds
new file mode 100755
index 0000000..6459691
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin/Test_12_ImageInPlatformResource.pds
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:Image xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmi:id="_5QOlIEqmEeuo7_8Ih1SA6A" filePath="platform:/resource/Test_12_ImageInPlatformResource/resources/Test_12_ImageInPlatformResource.png"/>
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformResource/Test_01_ImageInPlatformPluginURI.png b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformResource/Test_01_ImageInPlatformPluginURI.png
new file mode 100755
index 0000000..e2bd361
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformResource/Test_01_ImageInPlatformPluginURI.png
Binary files differ
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/Activator.java b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/Activator.java
new file mode 100755
index 0000000..17a242e
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/Activator.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2020 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.model2doc.emf.documentstructure.tests;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.model2doc.emf.documentstructure.tests"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/internal/images/AbstractDocumentStructureTests.java b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/internal/images/AbstractDocumentStructureTests.java
new file mode 100755
index 0000000..a754256
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/internal/images/AbstractDocumentStructureTests.java
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ * 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.emf.documentstructure.tests.internal.images;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.DocumentStructureFactory;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.Image;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.tests.Activator;
+
+/**
+ * This abstract class provides useful method for JUnit tests of GeneratorConfiguration
+ */
+public abstract class AbstractDocumentStructureTests {
+
+ /**
+ *
+ * @param projectName
+ * the name of a project
+ * @return
+ * the created project or <code>null</code> in case of creation failure
+ */
+ protected IProject createProject(final String projectName) {
+ final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ if (!project.exists()) {
+ try {
+ project.create(new NullProgressMonitor());
+ project.open(new NullProgressMonitor());
+ } catch (CoreException e) {
+ Activator.log.error(e);
+ }
+ }
+ if (project.exists() && project.isOpen()) {
+ return project;
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @return
+ * a new {@link Image}
+ */
+ protected Image createImage() {
+ return DocumentStructureFactory.eINSTANCE.createImage();
+ }
+
+ /**
+ *
+ * @param project
+ * the project to destroy
+ */
+ protected void destroyProject(final IProject project) {
+ try {
+ project.delete(true, true, new NullProgressMonitor());
+ } catch (CoreException e) {
+ Activator.log.error(e);
+ }
+ }
+}
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/internal/images/AbstractImageURLTests.java b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/internal/images/AbstractImageURLTests.java
new file mode 100755
index 0000000..fa5e599
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/internal/images/AbstractImageURLTests.java
@@ -0,0 +1,182 @@
+/*****************************************************************************
+ * 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.emf.documentstructure.tests.internal.images;
+
+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.emf.documentstructure.Image;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.internal.resource.DocumentStructureResource;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.tests.Activator;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+
+/**
+ * Abstract class for tests on the calculus of Image URL
+ */
+public abstract class AbstractImageURLTests extends AbstractDocumentStructureTests {
+
+ /**
+ * the name of the project created in the workspace
+ */
+ protected static final String PROJECT_NAME = "org.eclipse.papyrus.model2doc.emf.documentstructure.image.tests"; //$NON-NLS-1$
+
+ /**
+ * the name of the project in the workspace the GeneratorConfiguration file
+ */
+ private static final String RESOURCES = "resources"; //$NON-NLS-1$
+
+ /**
+ * the name of the GeneratorConfiguration file
+ */
+ private static final String IMAGE_FILE_NAME = "image"; //$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 filePath
+ * the path of the file to import in the generated document
+ * @return
+ */
+ protected Image createImageFileReference(final String filePath) {
+ final Image conf = createImage();
+ conf.setFilePath(filePath);
+ 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(RESOURCES);
+ uri = uri.appendSegment(IMAGE_FILE_NAME);
+ uri = uri.appendFileExtension(DocumentStructureResource.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/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/internal/images/ImageURLFromInTheAirTest.java b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/internal/images/ImageURLFromInTheAirTest.java
new file mode 100755
index 0000000..6b5035b
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/internal/images/ImageURLFromInTheAirTest.java
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ * 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.emf.documentstructure.tests.internal.images;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.Image;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.tests.Activator;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Check the calculus of the URL of the referenced image when the Generator configuration is not in a Resource
+ */
+public class ImageURLFromInTheAirTest extends AbstractImageURLTests {
+
+ private static final String TEST_01_IMAGE_DECLARED_FILE_NAME = "platform:/plugin/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/InTheAir/Test_01_ImageInPlatformPluginURI.png"; //$NON-NLS-1$
+
+ private static final String TEST_02_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_02_IMAGE_NAME = "Test_02_ImageWithPlatformResourceURI.dotx"; //$NON-NLS-1$
+ private static final String TEST_02_DECLARED_IMAGE_NAME = "platform:/resource/" + PROJECT_NAME + "/" + TEST_02_FOLDER + "/" + TEST_02_IMAGE_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_IMAGE_NAME = "Test_03_ImageWithPlatformResourceURI.dotx"; //$NON-NLS-1$
+ private static final String TEST_03_DECLARED_IMAGE_NAME = TEST_03_FOLDER + "/" + TEST_03_IMAGE_NAME; //$NON-NLS-1$
+
+
+ private void checkCreatedURL(final URL url) {
+ Assert.assertNotNull("The URL must not be null", url); //$NON-NLS-1$
+ File f = null;
+ try {
+ f = new File(url.toURI());
+ } catch (URISyntaxException e1) {
+ Activator.log.error(e1);
+ }
+ Assert.assertNotNull(NLS.bind("The file can't be created from url {0}", url), f); //$NON-NLS-1$
+ Assert.assertTrue(NLS.bind("The file with the url {0} doesn't exist", url), f.exists()); //$NON-NLS-1$
+ }
+
+ @Test
+ public void test_01_ImageInPlatformPluginURI() {
+ final Image image = createImage();
+ image.setFilePath(TEST_01_IMAGE_DECLARED_FILE_NAME);
+ Assert.assertNull(image.eResource());
+ checkCreatedURL(image.getFileAccessor().createFileURL());
+ }
+
+ @Test
+ public void test_02_ImageInPlatformResourceURI() {
+ createFileInProject(TEST_02_FOLDER, TEST_02_IMAGE_NAME);
+ final Image image = createImage();
+ image.setFilePath(TEST_02_DECLARED_IMAGE_NAME);
+ Assert.assertNull(image.eResource());
+ checkCreatedURL(image.getFileAccessor().createFileURL());
+ }
+
+ @Test
+ public void test_03_ImageWithRelativeURI() {
+ createFileInProject(TEST_03_FOLDER, TEST_03_IMAGE_NAME);
+ final Image image = createImage();
+ image.setFilePath(TEST_03_DECLARED_IMAGE_NAME);
+ Assert.assertNull(image.eResource());
+ Assert.assertNull(image.getFileAccessor().createFileURL());
+ }
+
+}
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/internal/images/ImageURLFromPlatformPluginTest.java b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/internal/images/ImageURLFromPlatformPluginTest.java
new file mode 100755
index 0000000..ac31ca1
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/internal/images/ImageURLFromPlatformPluginTest.java
@@ -0,0 +1,178 @@
+/*****************************************************************************
+ * 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.emf.documentstructure.tests.internal.images;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.eclipse.core.resources.IProject;
+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.osgi.util.NLS;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.Image;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.tests.Activator;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Check the calculus of the URL of the referenced image when the Generator configuration is in a Plaform plugin
+ */
+public class ImageURLFromPlatformPluginTest extends AbstractDocumentStructureTests {
+
+
+ private static final String TEST_01 = "Test_01_ImageInPlatformPluginURI.pds"; //$NON-NLS-1$
+ private static final String TEST_02 = "Test_02_ImageWithRelativeURI.pds"; //$NON-NLS-1$
+ private static final String TEST_03 = "Test_03_ImageWithRelativeURI.pds"; //$NON-NLS-1$
+ private static final String TEST_04 = "Test_04_ImageURI With Spaces.pds"; //$NON-NLS-1$
+ private static final String TEST_05 = "Test_05_ImageURIWithAccentuatedCharéàù.pds"; //$NON-NLS-1$
+ private static final String TEST_06 = "Test_06_ImageInAnotherFolder.pds"; //$NON-NLS-1$
+ private static final String TEST_07 = "Test_07_ImageInAnotherFolder With Spaces.pds"; //$NON-NLS-1$
+ private static final String TEST_08 = "Test_08_ImageInAnotherFolderWithAccentuatedCharéàù.pds"; //$NON-NLS-1$
+ private static final String TEST_09 = "Test_09_NullImageURI.pds"; //$NON-NLS-1$
+ private static final String TEST_10 = "Test_10_EmptyImageURI.pds"; //$NON-NLS-1$
+ private static final String TEST_11 = "Test_11_ImageNotFound.pds"; //$NON-NLS-1$
+ private static final String TEST_12 = "Test_12_ImageInPlatformResource.pds"; //$NON-NLS-1$
+
+
+ private final URI createURI(final String fileName) {
+ URI uri = URI.createPlatformPluginURI("org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformPlugin", true); //$NON-NLS-1$
+ uri = uri.appendSegment(fileName);
+ return uri;
+ }
+
+ private URL getImageURL(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 Image);
+ Image image = (Image) root;
+ return image.getFileAccessor().createFileURL();
+ }
+
+ private void checkCreatedURL(final URL url) {
+ Assert.assertNotNull("The URL must not be null", url); //$NON-NLS-1$
+ File f = null;
+ try {
+ f = new File(url.toURI());
+ } catch (URISyntaxException e1) {
+ Activator.log.error(e1);
+ }
+ Assert.assertNotNull(NLS.bind("The file can't be created from url {0}", url), f); //$NON-NLS-1$
+ Assert.assertTrue(NLS.bind("The file with the url {0} doesn't exist", url), f.exists()); //$NON-NLS-1$
+ }
+
+ @Test
+ public void test_01_ImageInPlatformPluginURI() {
+ final URL imageURL = getImageURL(createURI(TEST_01));
+ checkCreatedURL(imageURL);
+ }
+
+ @Test
+ public void test_02_ImageWithRelativeURI() {
+ final URL imageURL = getImageURL(createURI(TEST_02));
+ Assert.assertNull(imageURL);
+ }
+
+ @Test
+ public void test_03_ImageWithRelativeURI() {
+ final URL imageURL = getImageURL(createURI(TEST_03));
+ Assert.assertNull(imageURL);
+ }
+
+ @Test
+ public void test_04_ImageURIWithSpaces() {
+ final URL imageURL = getImageURL(createURI(TEST_04));
+ checkCreatedURL(imageURL);
+ }
+
+ @Test
+ public void test_05_ImageURIWithAccentuatedChar() {
+ final URL imageURL = getImageURL(createURI(TEST_05));
+ checkCreatedURL(imageURL);
+ }
+
+ @Test
+ public void test_06_ImageInAnotherFolder() {
+ final URL imageURL = getImageURL(createURI(TEST_06));
+ checkCreatedURL(imageURL);
+ }
+
+ @Test
+ public void test_07_ImageInAnotherFolderWithSpaces() {
+ final URL imageURL = getImageURL(createURI(TEST_07));
+ checkCreatedURL(imageURL);
+ }
+
+ @Test
+ public void test_08_ImageInAnotherFolderWithAccentuatedChar() {
+ final URL imageURL = getImageURL(createURI(TEST_08));
+ checkCreatedURL(imageURL);
+ }
+
+ @Test
+ public void test_09_NullImageURI() {
+ final URL imageURL = getImageURL(createURI(TEST_09));
+ Assert.assertNull(imageURL);
+ }
+
+ @Test
+ public void test_10_EmptyImageURI() {
+ final URL imageURL = getImageURL(createURI(TEST_10));
+ Assert.assertNull(imageURL);
+ }
+
+ @Test
+ public void test_11_ImageNotFound() {
+ final URL imageURL = getImageURL(createURI(TEST_11));
+ Assert.assertNull(imageURL);
+ }
+
+ /**
+ * this case must not be able excepted if the developer made a mistake
+ */
+ @Test
+ public void test_12_ImageInPlatformResource() {
+ // we create a real project, with an real file, the goal is to check we don't found it
+ final URI uri = createURI(TEST_12);
+ ResourceSet rSet = new ResourceSetImpl();
+ final Resource res = rSet.getResource(uri, true);
+ final Image image = (Image) res.getContents().get(0);
+ final String filePath = image.getFilePath();
+ // create an empty resource to be sure it is available for the tests
+ // the goal of this test is to NOT find it. (we refuse the reference of a platform:/resource from a platform:/plugin
+ final URI txtFileURI = URI.createURI(filePath);
+ final String projectName = txtFileURI.segment(1);
+ final IProject project = createProject(projectName);
+ final Resource txtFile = rSet.createResource(txtFileURI);
+ try {
+ txtFile.save(null);
+ } catch (IOException e) {
+ Activator.log.error(e);
+ }
+ Assert.assertNotNull(txtFile);
+
+ final URL imageURL = getImageURL(uri);
+ Assert.assertNull(imageURL);
+ destroyProject(project);
+ }
+
+}
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/internal/images/ImageURLFromPlatformResourceTest.java b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/internal/images/ImageURLFromPlatformResourceTest.java
new file mode 100755
index 0000000..958ad9d
--- /dev/null
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/src/org/eclipse/papyrus/model2doc/emf/documentstructure/tests/internal/images/ImageURLFromPlatformResourceTest.java
@@ -0,0 +1,187 @@
+/*****************************************************************************
+ * 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.emf.documentstructure.tests.internal.images;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.model2doc.core.builtintypes.DefaultFileReference;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.Image;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.tests.Activator;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Check the calculus of the URL of the referenced file when {@link DefaultFileReference} is in a Plaform resource
+ */
+public class ImageURLFromPlatformResourceTest extends AbstractImageURLTests {
+
+ private static final String TEST_01_DECLARED_REFERENCED_FILE_NAME = "platform:/plugin/org.eclipse.papyrus.model2doc.emf.documentstructure.tests/resources/ImageURL/PlatformResource/Test_01_ImageInPlatformPluginURI.png"; //$NON-NLS-1$
+
+ private static final String TEST_02_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_02_REFERENCED_FILE_NAME = "Test_02_ImageWithRelativeURI.png"; //$NON-NLS-1$
+ private static final String TEST_02_DECLARED_REFERENCED_FILE_NAME = TEST_02_FOLDER + "/" + TEST_02_REFERENCED_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_03_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_03_REFERENCED_FILE_NAME = "Test_03_ImageWithRelativeURI.png"; //$NON-NLS-1$
+ private static final String TEST_03_DECLARED_REFERENCED_FILE_NAME = "/" + TEST_03_FOLDER + "/" + TEST_03_REFERENCED_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_REFERENCED_FILE_NAME = "Test_04_ImageURI With Spaces.png"; //$NON-NLS-1$
+ private static final String TEST_04_DECLARED_REFERENCED_FILE_NAME = TEST_04_FOLDER + "/" + TEST_04_REFERENCED_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_05_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_05_REFERENCED_FILE_NAME = "Test_05_ImageURIWithAccentuatedCharéàù.png"; //$NON-NLS-1$
+ private static final String TEST_05_DECLARED_REFERENCED_FILE_NAME = TEST_05_FOLDER + "/" + TEST_05_REFERENCED_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_06_FOLDER = "AnotherFolder"; //$NON-NLS-1$
+ private static final String TEST_06_REFERENCED_FILE_NAME = "Test_06_ImageInAnotherFolder.png"; //$NON-NLS-1$
+ private static final String TEST_06_DECLARED_REFERENCED_FILE_NAME = TEST_06_FOLDER + "/" + TEST_06_REFERENCED_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_07_FOLDER = "AnotherFolder With Spaces"; //$NON-NLS-1$
+ private static final String TEST_07_REFERENCED_FILE_NAME = "Test_07_ImageInAnotherFolder With Spaces.png"; //$NON-NLS-1$
+ private static final String TEST_07_DECLARED_REFERENCED_FILE_NAME = TEST_07_FOLDER + "/" + TEST_07_REFERENCED_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_08_FOLDER = "AnotherFolderWithAccentuatedCharéàù"; //$NON-NLS-1$
+ private static final String TEST_08_REFERENCED_FILE_NAME = "Test_08_ImageInAnotherFolderWithAccentuatedCharéàù.png"; //$NON-NLS-1$
+ private static final String TEST_08_DECLARED_REFERENCED_FILE_NAME = TEST_08_FOLDER + "/" + TEST_08_REFERENCED_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_09_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_09_REFERENCED_FILE_NAME = null;
+ private static final String TEST_09_DECLARED_REFERENCED_FILE_NAME = TEST_09_FOLDER + "/" + TEST_09_REFERENCED_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_10_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_10_REFERENCED_FILE_NAME = ""; //$NON-NLS-1$
+ private static final String TEST_10_DECLARED_REFERENCED_FILE_NAME = TEST_10_FOLDER + "/" + TEST_10_REFERENCED_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_11_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_11_REFERENCED_FILE_NAME = "fantom.png"; //$NON-NLS-1$
+ private static final String TEST_11_DECLARED_REFERENCED_FILE_NAME = TEST_11_FOLDER + "/" + TEST_11_REFERENCED_FILE_NAME; //$NON-NLS-1$
+
+ private static final String TEST_12_FOLDER = "resources"; //$NON-NLS-1$
+ private static final String TEST_12_REFERENCED_FILE_NAME = "Test_12_ImageInPlatformResourceURI.png"; //$NON-NLS-1$
+ private static final String TEST_12_DECLARED_REFERENCED_FILE_NAME = "platform:/resource/" + PROJECT_NAME + "/" + TEST_12_FOLDER + "/" + TEST_12_REFERENCED_FILE_NAME; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+
+ private static final String TEST_13_REFERENCED_FILE_NAME = "Test_13_ImageInPlatformResourceURI.png"; //$NON-NLS-1$
+ private static final String TEST_13_DECLARED_REFERENCED_FILE_NAME = "C:/Somewhereplatform" + "/" + TEST_13_REFERENCED_FILE_NAME; //$NON-NLS-1$ //$NON-NLS-2$
+
+
+ private void checkCreatedURL(final URL url) {
+ Assert.assertNotNull("The URL must not be null", url); //$NON-NLS-1$
+ File f = null;
+ try {
+ f = new File(url.toURI());
+ } catch (URISyntaxException e1) {
+ Activator.log.error(e1);
+ }
+ Assert.assertNotNull(NLS.bind("The file can't be created from url {0}", url), f); //$NON-NLS-1$
+ Assert.assertTrue(NLS.bind("The file with the url {0} doesn't exist", url), f.exists()); //$NON-NLS-1$
+ }
+
+ @Test
+ public void test_01_ImageInPlatformPluginURI() {
+ final Image imageReference = createImageFileReference(TEST_01_DECLARED_REFERENCED_FILE_NAME);
+ checkCreatedURL(imageReference.getFileAccessor().createFileURL());
+ }
+
+ @Test
+ public void test_02_ImageWithRelativeURI() {
+ createFileInProject(TEST_02_FOLDER, TEST_02_REFERENCED_FILE_NAME);
+ final Image imageReference = createImageFileReference(TEST_02_DECLARED_REFERENCED_FILE_NAME);
+ checkCreatedURL(imageReference.getFileAccessor().createFileURL());
+ }
+
+ @Test
+ public void test_03_ImageWithRelativeURI() {
+ createFileInProject(TEST_03_FOLDER, TEST_03_REFERENCED_FILE_NAME);
+ final Image imageReference = createImageFileReference(TEST_03_DECLARED_REFERENCED_FILE_NAME);
+ checkCreatedURL(imageReference.getFileAccessor().createFileURL());
+ }
+
+ @Test
+ public void test_04_ImageURIWithSpaces() {
+ createFileInProject(TEST_04_FOLDER, TEST_04_REFERENCED_FILE_NAME);
+ final Image imageReference = createImageFileReference(TEST_04_DECLARED_REFERENCED_FILE_NAME);
+ checkCreatedURL(imageReference.getFileAccessor().createFileURL());
+ }
+
+ @Test
+ public void test_05_ImageURIWithAccentuatedChar() {
+ createFileInProject(TEST_05_FOLDER, TEST_05_REFERENCED_FILE_NAME);
+ final Image imageReference = createImageFileReference(TEST_05_DECLARED_REFERENCED_FILE_NAME);
+ checkCreatedURL(imageReference.getFileAccessor().createFileURL());
+ }
+
+ @Test
+ public void test_06_ImageInAnotherFolder() {
+ createFileInProject(TEST_06_FOLDER, TEST_06_REFERENCED_FILE_NAME);
+ final Image imageReference = createImageFileReference(TEST_06_DECLARED_REFERENCED_FILE_NAME);
+ checkCreatedURL(imageReference.getFileAccessor().createFileURL());
+ }
+
+ @Test
+ public void test_07_ImageInAnotherFolderWithSpaces() {
+ createFileInProject(TEST_07_FOLDER, TEST_07_REFERENCED_FILE_NAME);
+ final Image imageReference = createImageFileReference(TEST_07_DECLARED_REFERENCED_FILE_NAME);
+ checkCreatedURL(imageReference.getFileAccessor().createFileURL());
+ }
+
+ @Test
+ public void test_08_ImageInAnotherFolderWithAccentuatedChar() {
+ createFileInProject(TEST_08_FOLDER, TEST_08_REFERENCED_FILE_NAME);
+ final Image imageReference = createImageFileReference(TEST_08_DECLARED_REFERENCED_FILE_NAME);
+ checkCreatedURL(imageReference.getFileAccessor().createFileURL());
+ }
+
+ @Test
+ public void test_09_NullFileReferenceURI() {
+ final Image imageReference = createImageFileReference(TEST_09_DECLARED_REFERENCED_FILE_NAME);
+ Assert.assertNull(imageReference.getFileAccessor().createFileURL());
+ }
+
+ @Test
+ public void test_10_EmptyFileReferenceURI() {
+ final Image imageReference = createImageFileReference(TEST_10_DECLARED_REFERENCED_FILE_NAME);
+ Assert.assertNull(imageReference.getFileAccessor().createFileURL());
+ }
+
+ @Test
+ public void test_11_ImageNotFound() {
+ createFolderInContainer(this.projectForTest, TEST_11_FOLDER); // we don't create the file in it the goal of the test
+ final Image imageReference = createImageFileReference(TEST_11_DECLARED_REFERENCED_FILE_NAME);
+ Assert.assertNull(imageReference.getFileAccessor().createFileURL());
+ }
+
+ /**
+ * this case must not be possible excepted if the developer made a mistake
+ */
+ @Test
+ public void test_12_ImageInPlatformResource() {
+ createFileInProject(TEST_12_FOLDER, TEST_12_REFERENCED_FILE_NAME);
+ final Image imageReference = createImageFileReference(TEST_12_DECLARED_REFERENCED_FILE_NAME);
+ checkCreatedURL(imageReference.getFileAccessor().createFileURL());
+ }
+
+ @Test
+ public void test_13_ImageURIOSPath() {
+ final Image imageReference = createImageFileReference(TEST_13_DECLARED_REFERENCED_FILE_NAME);
+ Assert.assertNull(imageReference.getFileAccessor().createFileURL());
+ }
+
+}
diff --git a/tests/emf/pom.xml b/tests/emf/pom.xml
index 3138aeb..4e2a0ca 100755
--- a/tests/emf/pom.xml
+++ b/tests/emf/pom.xml
@@ -18,6 +18,7 @@
<description>Container of the Papyrus Model to Documentation EMF Tests Plugins</description>
<modules>
+ <module>org.eclipse.papyrus.model2doc.emf.documentstructure.tests</module>
<module>org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.tests</module>
<module>org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.editor.tests</module>
</modules>