Bug 570743 - [Model2Doc][Test] We must provide JUnit Tests for Papyrus
GMF mapper (plugin
org.eclipse.papyrus.model2doc.integration.gmf.template2structure )]

Change-Id: I2e109397a9488bd451170c7be6d17939ee58d4fd
Signed-off-by: Pauline DEVILLE <pauline.deville@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 35505fb..1ef34e5 100755
--- a/features/org.eclipse.papyrus.model2doc.tests.feature/feature.xml
+++ b/features/org.eclipse.papyrus.model2doc.tests.feature/feature.xml
@@ -62,6 +62,12 @@
          version="0.0.0"/>
 
    <plugin
+         id="org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
          id="org.eclipse.papyrus.model2doc.bundles.tests"
          download-size="0"
          install-size="0"
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core.builtintypes/src/org/eclipse/papyrus/model2doc/core/builtintypes/internal/accessors/AbstractFileAccessor.java b/plugins/core/org.eclipse.papyrus.model2doc.core.builtintypes/src/org/eclipse/papyrus/model2doc/core/builtintypes/internal/accessors/AbstractFileAccessor.java
index efe59ca..bd40c1f 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core.builtintypes/src/org/eclipse/papyrus/model2doc/core/builtintypes/internal/accessors/AbstractFileAccessor.java
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core.builtintypes/src/org/eclipse/papyrus/model2doc/core/builtintypes/internal/accessors/AbstractFileAccessor.java
@@ -50,7 +50,7 @@
 	/**
 	 * the file prefix
 	 */
-	private static final String FILE_PREFIX = "file:/";//$NON-NLS-1$
+	private static final String FILE_PREFIX = "file:";//$NON-NLS-1$
 
 	/**
 	 * the {@link EObject} referencing a file
diff --git a/plugins/integration/org.eclipse.papyrus.model2doc.integration.gmf.documentstructuretemplate/src/org/eclipse/papyrus/model2doc/integration/gmf/documentstructuretemplate/internal/impl/CustomPapyrusGMFDiagramViewImpl.java b/plugins/integration/org.eclipse.papyrus.model2doc.integration.gmf.documentstructuretemplate/src/org/eclipse/papyrus/model2doc/integration/gmf/documentstructuretemplate/internal/impl/CustomPapyrusGMFDiagramViewImpl.java
index 74e78ce..b889ad3 100755
--- a/plugins/integration/org.eclipse.papyrus.model2doc.integration.gmf.documentstructuretemplate/src/org/eclipse/papyrus/model2doc/integration/gmf/documentstructuretemplate/internal/impl/CustomPapyrusGMFDiagramViewImpl.java
+++ b/plugins/integration/org.eclipse.papyrus.model2doc.integration.gmf.documentstructuretemplate/src/org/eclipse/papyrus/model2doc/integration/gmf/documentstructuretemplate/internal/impl/CustomPapyrusGMFDiagramViewImpl.java
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * Copyright (c) 2019 CEA LIST and others.
+ * Copyright (c) 2019, 2021 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
@@ -10,6 +10,7 @@
  *
  * Contributors:
  *  Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *  Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Bug 570743
  *
  *****************************************************************************/
 
@@ -83,7 +84,9 @@
 			// we take all tables when tableType and table kind are not defined
 			// otherwise, we check
 			if (matchDiagramKind(diagram) && matchDiagramType(diagram)) {
-				filteredDiagram.add(diagram);
+				if (false == filteredDiagram.contains(diagram)) {
+					filteredDiagram.add(diagram);
+				}
 			}
 		}
 
diff --git a/plugins/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/internal/mapping/GMFDiagramImageUtils.java b/plugins/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/internal/mapping/GMFDiagramImageUtils.java
index afec35d..e99c528 100755
--- a/plugins/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/internal/mapping/GMFDiagramImageUtils.java
+++ b/plugins/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/internal/mapping/GMFDiagramImageUtils.java
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * Copyright (c) 2019 CEA LIST and others.
+ * Copyright (c) 2019, 2021 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
@@ -10,22 +10,28 @@
  *
  * Contributors:
  * 	Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *  Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Bug 570743
  *
  *****************************************************************************/
 
 package org.eclipse.papyrus.model2doc.integration.gmf.template2structure.internal.mapping;
 
-import java.io.File;
+import java.net.URL;
 
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
 import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
 import org.eclipse.gmf.runtime.diagram.ui.image.ImageFileFormat;
 import org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil;
 import org.eclipse.gmf.runtime.notation.Diagram;
 import org.eclipse.papyrus.model2doc.core.builtintypes.ImageFormat;
+import org.eclipse.papyrus.model2doc.core.generatorconfiguration.accessors.IOutputFileAccessor;
 import org.eclipse.papyrus.model2doc.integration.gmf.template2structure.Activator;
 
 
@@ -43,37 +49,54 @@
 	 * @param format
 	 * @return
 	 */
-	public static void generateImageOfDiagram(final Diagram diagram, final String pathRoot, final int margin, ImageFormat format) {
-		final Path imagePath = new Path(pathRoot.toString());
+	public static void generateImageOfDiagram(final Diagram diagram, final URI uri, IOutputFileAccessor accessor, final int margin, ImageFormat format) {
+		final URL url = accessor.convertToURL(uri);
+		final String pathRoot = accessor.urlToPathString(url, true);
 
 		// we check all folders tree already exists, and we create them if not
-		if (imagePath.segmentCount() > 1) {
-			final IPath folderPath = imagePath.removeLastSegments(1);
-			final File folder = folderPath.toFile();
-			if (false == folder.exists()) {
-				folder.mkdirs();
-			}
+		if (uri.segmentCount() > 1) {
+			URI folderURI = uri.trimSegments(1);
+			String folderPath = folderURI.toPlatformString(true);
+			IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(new Path(folderPath));
+
+			createFolders(folder);
 		}
 
 		final CopyToImageUtil copyImageUtil = new CustomCopyToImageUtils(margin);
 
-
 		try {
-			// Dimension d = new Dimension(1402, 757).scale(0.70);
-			// copyImageUtil.copyToConstrainedImage(diagram, imagePath, ImageFileFormat.SVG, d.width, d.height, new NullProgressMonitor(),
-			// PreferencesHint.USE_DEFAULTS, false);
-			copyImageUtil.copyToImage(diagram, imagePath, getFileFormat(format), new NullProgressMonitor(),
+			copyImageUtil.copyToImage(diagram, new Path(pathRoot), getFileFormat(format), new NullProgressMonitor(),
 					PreferencesHint.USE_DEFAULTS);
 		} catch (CoreException e) {
 			Activator.log.error(e);
 		}
-		if (true) {
-			return;
-		}
 
 	}
 
 	/**
+	 * If the folder does not exist we create it and its parents if necessary
+	 *
+	 * @param folder
+	 *            the folder to create
+	 */
+	private static void createFolders(IContainer folder) {
+		if (false == folder.exists()) {
+			try {
+				if (false == folder.getParent().exists()) {
+					createFolders(folder.getParent());
+				}
+				if (folder instanceof IFolder) {
+					((IFolder) folder).create(true, true, new NullProgressMonitor());
+				} else if (folder instanceof IProject) {
+					((IProject) folder).create(new NullProgressMonitor());
+				}
+			} catch (CoreException e) {
+				Activator.log.error(e);
+			}
+		}
+	}
+
+	/**
 	 * @param format
 	 * @return
 	 */
@@ -86,4 +109,5 @@
 			return ImageFileFormat.SVG;
 		}
 	}
+
 }
diff --git a/plugins/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/internal/mapping/PapyrusGMFDiagramViewMapper.java b/plugins/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/internal/mapping/PapyrusGMFDiagramViewMapper.java
index 2d9af39..8b67a20 100755
--- a/plugins/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/internal/mapping/PapyrusGMFDiagramViewMapper.java
+++ b/plugins/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/internal/mapping/PapyrusGMFDiagramViewMapper.java
@@ -11,12 +11,12 @@
  * Contributors:
  *    Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
  *    Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Bug 570133
+ *    Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Bug 570743
  *
  *****************************************************************************/
 
 package org.eclipse.papyrus.model2doc.integration.gmf.template2structure.internal.mapping;
 
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
@@ -104,9 +104,7 @@
 			}
 			final IOutputFileAccessor accessor = conf.createImageOutputAccessor();
 			final URI uri = accessor.createOutputFileURI(imageNameBuilder.toString(), gmfDiagramView.getImageFormat().getLiteral());
-			final URL url = accessor.convertToURL(uri);
-			final String imagePath = accessor.urlToPathString(url, true);
-			GMFDiagramImageUtils.generateImageOfDiagram(current, imagePath, gmfDiagramView.getDiagramImageMargin(), gmfDiagramView.getImageFormat());
+			GMFDiagramImageUtils.generateImageOfDiagram(current, uri, accessor, gmfDiagramView.getDiagramImageMargin(), gmfDiagramView.getImageFormat());
 			image.setFilePath(uri.toString());
 			returnedValue.add(returnedClassType.cast(image));
 		}
diff --git a/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/editor/ODTEditor.java b/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/editor/ODTEditor.java
index 1c104fa..b541c7b 100755
--- a/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/editor/ODTEditor.java
+++ b/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/editor/ODTEditor.java
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * Copyright (c) 2019-2020 CEA LIST.
+ * Copyright (c) 2019-2021 CEA LIST.
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -13,6 +13,8 @@
  *  Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
  *  Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - bug 559826
  *  Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - bug 569817
+ *  Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Bug 570743
+ *
  *****************************************************************************/
 package org.eclipse.papyrus.model2doc.odt.internal.editor;
 
@@ -68,9 +70,7 @@
 
 	private static final String STANDART_FILE_PREFIX = "file:/";//$NON-NLS-1$
 
-	private static final String ODT_FILE_EXTENSION = "odt"; //$NON-NLS-1$
-
-	public static final String LIBREOFFICE_FILE_SEPARATOR = "/"; //$NON-NLS-1$
+	public static final String FILE_SEPARATOR = "/"; //$NON-NLS-1$
 
 	private XComponentLoader officeLoader = null;
 	private XTextDocument xTextDocument = null;
@@ -645,8 +645,10 @@
 	 */
 	public static final String convertToLibreOfficeFileURI(final String fileURI) {
 		String newFileURI = fileURI;
-		if (fileURI.startsWith(STANDART_FILE_PREFIX) && false == newFileURI.startsWith(LIBREOFFICE_FILE_PREFIX)) {
+		if (newFileURI.startsWith(STANDART_FILE_PREFIX) && false == newFileURI.startsWith(LIBREOFFICE_FILE_PREFIX)) {
 			newFileURI = newFileURI.replaceFirst(STANDART_FILE_PREFIX, LIBREOFFICE_FILE_PREFIX);
+		} else if (newFileURI.startsWith(FILE_SEPARATOR)) {
+			newFileURI = newFileURI.replaceFirst(FILE_SEPARATOR, LIBREOFFICE_FILE_PREFIX);
 		}
 		return newFileURI;
 	}
diff --git a/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/pdf/PDFExporter.java b/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/pdf/PDFExporter.java
index a818064..ffa1183 100755
--- a/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/pdf/PDFExporter.java
+++ b/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/pdf/PDFExporter.java
@@ -21,8 +21,8 @@
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.papyrus.model2doc.odt.Activator;
-import org.eclipse.papyrus.model2doc.odt.internal.editor.ODTFilterName;
 import org.eclipse.papyrus.model2doc.odt.internal.editor.ODTEditor;
+import org.eclipse.papyrus.model2doc.odt.internal.editor.ODTFilterName;
 import org.eclipse.papyrus.model2doc.odt.internal.editor.StorePropertiesConstants;
 import org.eclipse.papyrus.model2doc.odt.internal.message.Messages;
 import org.eclipse.swt.widgets.Display;
@@ -84,11 +84,11 @@
 	 * @return
 	 */
 	public String exportToPDF(final String inputFileURI, final String outputFolderURI) throws Exception {
-		final int lastSeparator = inputFileURI.lastIndexOf(ODTEditor.LIBREOFFICE_FILE_SEPARATOR);
+		final int lastSeparator = inputFileURI.lastIndexOf(ODTEditor.FILE_SEPARATOR);
 		final String outputFileName = inputFileURI.substring(lastSeparator + 1, inputFileURI.lastIndexOf(DOT));
 		final StringBuffer outputFilePathBuilder = new StringBuffer(outputFolderURI);
-		if (!outputFolderURI.endsWith(ODTEditor.LIBREOFFICE_FILE_SEPARATOR)) {
-			outputFilePathBuilder.append(ODTEditor.LIBREOFFICE_FILE_SEPARATOR);
+		if (!outputFolderURI.endsWith(ODTEditor.FILE_SEPARATOR)) {
+			outputFilePathBuilder.append(ODTEditor.FILE_SEPARATOR);
 		}
 		outputFilePathBuilder.append(outputFileName);
 		outputFilePathBuilder.append(DOT);
@@ -104,8 +104,8 @@
 			throw new Exception("The fileURI is not conform to the expected one"); //$NON-NLS-1$
 		}
 		final StringBuffer outputFilePathBuilder = new StringBuffer(outputFolderURI);
-		if (!outputFolderURI.endsWith(ODTEditor.LIBREOFFICE_FILE_SEPARATOR)) {
-			outputFilePathBuilder.append(ODTEditor.LIBREOFFICE_FILE_SEPARATOR);
+		if (!outputFolderURI.endsWith(ODTEditor.FILE_SEPARATOR)) {
+			outputFilePathBuilder.append(ODTEditor.FILE_SEPARATOR);
 		}
 		outputFilePathBuilder.append(outputFileName);
 		outputFilePathBuilder.append(DOT);
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/META-INF/MANIFEST.MF b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/META-INF/MANIFEST.MF
index 85d30ec..c100ed6 100644
--- a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/META-INF/MANIFEST.MF
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/META-INF/MANIFEST.MF
@@ -17,3 +17,4 @@
  org.eclipse.papyrus.model2doc.emf.documentstructure;bundle-version="[0.8.0,1.0.0)"
 Bundle-RequiredExecutionEnvironment: JavaSE-11
 Automatic-Module-Name: org.eclipse.papyrus.model2doc.emf.template2structure.tests
+Export-Package: org.eclipse.papyrus.model2doc.emf.template2structure.tests
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/AbstractTemplateToStructureTests.java b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/AbstractTemplateToStructureTests.java
index 3617666..f744d56 100644
--- a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/AbstractTemplateToStructureTests.java
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/AbstractTemplateToStructureTests.java
@@ -30,13 +30,12 @@
 import org.eclipse.emf.ecore.resource.ResourceSet;
 import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
 import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture;
+import org.eclipse.papyrus.junit.utils.rules.AbstractModelFixture;
 import org.eclipse.papyrus.model2doc.emf.documentstructure.TextDocument;
 import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.TextDocumentTemplate;
 import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.utils.DocumentStructureTemplateConstants;
 import org.eclipse.papyrus.model2doc.emf.template2structure.command.Template2StructureCommandFactory;
 import org.junit.Assert;
-import org.junit.Rule;
 
 
 
@@ -48,11 +47,7 @@
 
 	public static final String PLUGIN_EXPECTED_RESOURCE_PATH = Activator.PLUGIN_ID + "/resources/";
 
-	/**
-	 * The editor fixture
-	 */
-	@Rule
-	public ModelSetFixture fixture = new ModelSetFixture();
+	public abstract AbstractModelFixture<TransactionalEditingDomain> getFixture();
 
 	/**
 	 * Constructor.
@@ -68,9 +63,9 @@
 	 *         the *.pdst resource associated to the current model
 	 */
 	protected final Resource getPDSTResourceForCurrentModel() {
-		for (final Resource current : this.fixture.getResourceSet().getResources()) {
+		for (final Resource current : getFixture().getResourceSet().getResources()) {
 			if (DocumentStructureTemplateConstants.DOCUMENT_STRUCTURE_TEMPLATE_FILE_EXTENSION.equals(current.getURI().fileExtension())) {
-				if (this.fixture.getModelResourceURI().trimFileExtension().equals(current.getURI().trimFileExtension())) {
+				if (getFixture().getModelResourceURI().trimFileExtension().equals(current.getURI().trimFileExtension())) {
 					return current;
 				}
 			}
@@ -114,7 +109,7 @@
 	 *         the result of the generation (transformation for template to structure)
 	 */
 	protected final Collection<?> generateDocumentStructure(TextDocumentTemplate textDocumentTemplate) {
-		TransactionalEditingDomain domain = this.fixture.getEditingDomain();
+		TransactionalEditingDomain domain = getFixture().getEditingDomain();
 		Command command = Template2StructureCommandFactory.eINSTANCE.getGenerateDocumentStructureCommand(domain, textDocumentTemplate, null);
 		domain.getCommandStack().execute(command);
 
@@ -146,7 +141,7 @@
 		StringBuilder builder = new StringBuilder();
 
 		String wsPath = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();
-		String projectName = fixture.getProject().getProject().getName();
+		String projectName = getFixture().getProject().getProject().getName();
 
 		StringBuilder pathBuilder = new StringBuilder(wsPath);
 		pathBuilder.append(File.separatorChar);
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/EAttributeAsParagraphMapperTest.java b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/EAttributeAsParagraphMapperTest.java
index 9bced21..a57921c 100644
--- a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/EAttributeAsParagraphMapperTest.java
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/EAttributeAsParagraphMapperTest.java
@@ -19,9 +19,13 @@
 
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.junit.utils.rules.AbstractModelFixture;
+import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture;
 import org.eclipse.papyrus.junit.utils.rules.PluginResource;
 import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.TextDocumentTemplate;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
 
 /**
@@ -34,6 +38,22 @@
 	public static final String EXPECTED_RESOURCE_PATH = PLUGIN_EXPECTED_RESOURCE_PATH + "EAttributeAsParagraph/expectedOutput/";
 
 	/**
+	 * The editor fixture
+	 */
+	@Rule
+	public AbstractModelFixture<TransactionalEditingDomain> fixture = new ModelSetFixture();
+
+	/**
+	 * @see org.eclipse.papyrus.model2doc.emf.template2structure.tests.AbstractTemplateToStructureTests#getFixture()
+	 *
+	 * @return
+	 */
+	@Override
+	public AbstractModelFixture<TransactionalEditingDomain> getFixture() {
+		return fixture;
+	}
+
+	/**
 	 * Test the default EAttributeAsParagraph
 	 */
 	@Test
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/EClassPartTemplateMapperTest.java b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/EClassPartTemplateMapperTest.java
index ff119a1..489b7d3 100644
--- a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/EClassPartTemplateMapperTest.java
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/EClassPartTemplateMapperTest.java
@@ -19,9 +19,13 @@
 
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.junit.utils.rules.AbstractModelFixture;
+import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture;
 import org.eclipse.papyrus.junit.utils.rules.PluginResource;
 import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.TextDocumentTemplate;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
 
 /**
@@ -34,6 +38,22 @@
 	public static final String EXPECTED_RESOURCE_PATH = PLUGIN_EXPECTED_RESOURCE_PATH + "EClassPartTemplate/expectedOutput/";
 
 	/**
+	 * The editor fixture
+	 */
+	@Rule
+	public AbstractModelFixture<TransactionalEditingDomain> fixture = new ModelSetFixture();
+
+	/**
+	 * @see org.eclipse.papyrus.model2doc.emf.template2structure.tests.AbstractTemplateToStructureTests#getFixture()
+	 *
+	 * @return
+	 */
+	@Override
+	public AbstractModelFixture<TransactionalEditingDomain> getFixture() {
+		return fixture;
+	}
+
+	/**
 	 * Test the default EClassPartTemplate
 	 */
 	@Test
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/EReferencePartTemplateMapperTest.java b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/EReferencePartTemplateMapperTest.java
index 6a4159e..6b714d1 100644
--- a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/EReferencePartTemplateMapperTest.java
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/EReferencePartTemplateMapperTest.java
@@ -19,9 +19,13 @@
 
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.junit.utils.rules.AbstractModelFixture;
+import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture;
 import org.eclipse.papyrus.junit.utils.rules.PluginResource;
 import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.TextDocumentTemplate;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
 
 /**
@@ -33,6 +37,19 @@
 
 	public static final String EXPECTED_RESOURCE_PATH = PLUGIN_EXPECTED_RESOURCE_PATH + "EReferencePartTemplate/expectedOutput/";
 
+	@Rule
+	public AbstractModelFixture<TransactionalEditingDomain> fixture = new ModelSetFixture();
+
+	/**
+	 * @see org.eclipse.papyrus.model2doc.emf.template2structure.tests.AbstractTemplateToStructureTests#getFixture()
+	 *
+	 * @return
+	 */
+	@Override
+	public AbstractModelFixture<TransactionalEditingDomain> getFixture() {
+		return fixture;
+	}
+
 	/**
 	 * Test the default EReferencePartTemplate
 	 */
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/EReferenceTableViewMapperTest.java b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/EReferenceTableViewMapperTest.java
index c4bfc58..b663bf7 100644
--- a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/EReferenceTableViewMapperTest.java
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/EReferenceTableViewMapperTest.java
@@ -19,9 +19,13 @@
 
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.junit.utils.rules.AbstractModelFixture;
+import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture;
 import org.eclipse.papyrus.junit.utils.rules.PluginResource;
 import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.TextDocumentTemplate;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
 
 /**
@@ -33,6 +37,19 @@
 
 	public static final String EXPECTED_RESOURCE_PATH = PLUGIN_EXPECTED_RESOURCE_PATH + "EReferenceTableView/expectedOutput/";
 
+	@Rule
+	public AbstractModelFixture<TransactionalEditingDomain> fixture = new ModelSetFixture();
+
+	/**
+	 * @see org.eclipse.papyrus.model2doc.emf.template2structure.tests.AbstractTemplateToStructureTests#getFixture()
+	 *
+	 * @return
+	 */
+	@Override
+	public AbstractModelFixture<TransactionalEditingDomain> getFixture() {
+		return fixture;
+	}
+
 	/**
 	 * Test the default EReferenceTableView
 	 */
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/InsertFileTemplateMapperTest.java b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/InsertFileTemplateMapperTest.java
index a05aeaa..d35c0d3 100644
--- a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/InsertFileTemplateMapperTest.java
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/InsertFileTemplateMapperTest.java
@@ -19,9 +19,13 @@
 
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.junit.utils.rules.AbstractModelFixture;
+import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture;
 import org.eclipse.papyrus.junit.utils.rules.PluginResource;
 import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.TextDocumentTemplate;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
 
 /**
@@ -33,6 +37,19 @@
 
 	public static final String EXPECTED_RESOURCE_PATH = PLUGIN_EXPECTED_RESOURCE_PATH + "InsertFileTemplate/expectedOutput/";
 
+	@Rule
+	public AbstractModelFixture<TransactionalEditingDomain> fixture = new ModelSetFixture();
+
+	/**
+	 * @see org.eclipse.papyrus.model2doc.emf.template2structure.tests.AbstractTemplateToStructureTests#getFixture()
+	 *
+	 * @return
+	 */
+	@Override
+	public AbstractModelFixture<TransactionalEditingDomain> getFixture() {
+		return fixture;
+	}
+
 	/**
 	 * Test the default InsertFileTemplate
 	 */
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/TableOfContentsMapperTest.java b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/TableOfContentsMapperTest.java
index 174d658..599ea8f 100644
--- a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/TableOfContentsMapperTest.java
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/TableOfContentsMapperTest.java
@@ -19,9 +19,13 @@
 
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.junit.utils.rules.AbstractModelFixture;
+import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture;
 import org.eclipse.papyrus.junit.utils.rules.PluginResource;
 import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.TextDocumentTemplate;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
 
 /**
@@ -33,6 +37,19 @@
 
 	public static final String EXPECTED_RESOURCE_PATH = PLUGIN_EXPECTED_RESOURCE_PATH + "TableOfContents/expectedOutput/";
 
+	@Rule
+	public AbstractModelFixture<TransactionalEditingDomain> fixture = new ModelSetFixture();
+
+	/**
+	 * @see org.eclipse.papyrus.model2doc.emf.template2structure.tests.AbstractTemplateToStructureTests#getFixture()
+	 *
+	 * @return
+	 */
+	@Override
+	public AbstractModelFixture<TransactionalEditingDomain> getFixture() {
+		return fixture;
+	}
+
 	/**
 	 * Test the default TableOfContents
 	 */
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/TableOfFiguresMapperTest.java b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/TableOfFiguresMapperTest.java
index 2e7afe7..7969ed9 100644
--- a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/TableOfFiguresMapperTest.java
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/TableOfFiguresMapperTest.java
@@ -19,9 +19,13 @@
 
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.junit.utils.rules.AbstractModelFixture;
+import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture;
 import org.eclipse.papyrus.junit.utils.rules.PluginResource;
 import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.TextDocumentTemplate;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
 
 /**
@@ -33,6 +37,19 @@
 
 	public static final String EXPECTED_RESOURCE_PATH = PLUGIN_EXPECTED_RESOURCE_PATH + "TableOfFigures/expectedOutput/";
 
+	@Rule
+	public AbstractModelFixture<TransactionalEditingDomain> fixture = new ModelSetFixture();
+
+	/**
+	 * @see org.eclipse.papyrus.model2doc.emf.template2structure.tests.AbstractTemplateToStructureTests#getFixture()
+	 *
+	 * @return
+	 */
+	@Override
+	public AbstractModelFixture<TransactionalEditingDomain> getFixture() {
+		return fixture;
+	}
+
 	/**
 	 * Test the default TableOfFigures
 	 */
diff --git a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/TreeListViewMapperTest.java b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/TreeListViewMapperTest.java
index e127dde..c94ba6f 100644
--- a/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/TreeListViewMapperTest.java
+++ b/tests/emf/org.eclipse.papyrus.model2doc.emf.template2structure.tests/src/org/eclipse/papyrus/model2doc/emf/template2structure/tests/TreeListViewMapperTest.java
@@ -19,9 +19,13 @@
 
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.junit.utils.rules.AbstractModelFixture;
+import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture;
 import org.eclipse.papyrus.junit.utils.rules.PluginResource;
 import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.TextDocumentTemplate;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
 
 /**
@@ -33,6 +37,19 @@
 
 	public static final String EXPECTED_RESOURCE_PATH = PLUGIN_EXPECTED_RESOURCE_PATH + "TreeListView/expectedOutput/";
 
+	@Rule
+	public AbstractModelFixture<TransactionalEditingDomain> fixture = new ModelSetFixture();
+
+	/**
+	 * @see org.eclipse.papyrus.model2doc.emf.template2structure.tests.AbstractTemplateToStructureTests#getFixture()
+	 *
+	 * @return
+	 */
+	@Override
+	public AbstractModelFixture<TransactionalEditingDomain> getFixture() {
+		return fixture;
+	}
+
 	/**
 	 * Test the default TreeListView
 	 */
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/.classpath b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/.classpath
new file mode 100644
index 0000000..a42a828
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.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/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/.project b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/.project
new file mode 100644
index 0000000..02a89ee
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.papyrus.model2doc.integration.gmf.template2structure.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/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/.settings/org.eclipse.core.resources.prefs b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..896a9a5
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.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/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/.settings/org.eclipse.core.runtime.prefs b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000..5a0ad22
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/.settings/org.eclipse.jdt.core.prefs b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..037f04a
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.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/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..1a3bd02
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.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/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/.settings/org.eclipse.pde.api.tools.prefs b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000..b2260f8
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.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/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/META-INF/MANIFEST.MF b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..8d317b0
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Papyrus-Model2Doc - GMF Template2structure Integration Tests (Incubation)
+Bundle-SymbolicName: org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests
+Bundle-Version: 0.8.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests.Activator
+Bundle-Vendor: Eclipse Modeling Project
+Require-Bundle: org.junit;bundle-version="[4.13.0,5.0.0)",
+ 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.emf.ecore;bundle-version="[2.23.0,3.0.0)",
+ org.eclipse.emf.transaction;bundle-version="[1.9.0,2.0.0)",
+ org.eclipse.papyrus.junit.utils;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.papyrus.infra.core.log;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.model2doc.emf.template2structure.tests;bundle-version="[0.8.0,1.0.0)",
+ org.eclipse.papyrus.model2doc.emf.documentstructuretemplate;bundle-version="[0.8.0,1.0.0)",
+ org.eclipse.papyrus.model2doc.emf.documentstructure;bundle-version="[0.8.0,1.0.0)",
+ org.eclipse.papyrus.model2doc.emf.template2structure;bundle-version="[0.8.0,1.0.0)",
+ org.eclipse.papyrus.model2doc.core.generatorconfiguration;bundle-version="[0.8.0,1.0.0)",
+ org.eclipse.papyrus.model2doc.core.builtintypes;bundle-version="[0.8.0,1.0.0)"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Automatic-Module-Name: org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests
+Bundle-ActivationPolicy: lazy
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/about.html b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/about.html
new file mode 100644
index 0000000..ef2872f
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.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 (&quot;Content&quot;).  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;).  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, &quot;Program&quot; 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 (&quot;Redistributor&quot;) 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/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/build.properties b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/build.properties
new file mode 100644
index 0000000..890a9a1
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               resources/,\
+               about.html
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/pom.xml b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/pom.xml
new file mode 100644
index 0000000..d5c166c
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/pom.xml
@@ -0,0 +1,80 @@
+<?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-integration</groupId>
+		<artifactId>org.eclipse.papyrus.model2doc.tests.integration</artifactId>
+		<version>0.7.0-SNAPSHOT</version>
+	</parent>
+
+	<artifactId>org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests</artifactId>
+    <version>0.8.0-SNAPSHOT</version>
+    <packaging>eclipse-test-plugin</packaging>
+	
+	<build>
+		<plugins>
+			<plugin>
+				<!-- By default, don't do tests -->
+				<groupId>org.eclipse.tycho</groupId>
+				<artifactId>tycho-surefire-plugin</artifactId>
+				<version>${tycho-version}</version>
+			</plugin>
+			<plugin>
+				<groupId>org.eclipse.tycho</groupId>
+				<artifactId>target-platform-configuration</artifactId>
+				<version>${tycho-version}</version>
+				<configuration>
+					<dependency-resolution>
+						<extraRequirements>
+							<!-- required to find all model2doc plugins to check them -->
+
+							<requirement>
+								<type>eclipse-feature</type>
+								<id>org.eclipse.papyrus.model2doc.dev.feature</id>
+								<versionRange>0.0.0</versionRange>
+							</requirement>
+							<requirement>
+								<type>eclipse-feature</type>
+								<id>org.eclipse.papyrus.model2doc.feature</id>
+								<versionRange>0.0.0</versionRange>
+							</requirement>
+							<requirement>
+								<type>eclipse-feature</type>
+								<id>org.eclipse.papyrus.model2doc.gmf.feature</id>
+								<versionRange>0.0.0</versionRange>
+							</requirement>
+							<requirement>
+								<type>eclipse-feature</type>
+								<id>org.eclipse.papyrus.model2doc.integration.feature</id>
+								<versionRange>0.0.0</versionRange>
+							</requirement>
+							<requirement>
+								<type>eclipse-feature</type>
+								<id>org.eclipse.papyrus.model2doc.integration.gmf.documentstructuretemplate.feature</id>
+								<versionRange>0.0.0</versionRange>
+							</requirement>
+							<!-- requirement>
+								<type>eclipse-feature</type>
+								<id>org.eclipse.papyrus.model2doc.integration.ieee.feature</id>
+								<versionRange>0.0.0</versionRange>
+							</requirement-->
+							<!-- requirement>
+								<type>eclipse-feature</type>
+								<id>org.eclipse.papyrus.model2doc.tests.feature</id>
+								<versionRange>0.0.0</versionRange>
+							</requirement-->
+							<requirement>
+								<type>eclipse-feature</type>
+								<id>org.eclipse.papyrus.model2doc.uml.feature</id>
+								<versionRange>0.0.0</versionRange>
+							</requirement>
+						</extraRequirements>
+					</dependency-resolution>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/PapyrusGMFDiagramView.di b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/PapyrusGMFDiagramView.di
new file mode 100644
index 0000000..8c549ee
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/PapyrusGMFDiagramView.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/PapyrusGMFDiagramView.notation b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/PapyrusGMFDiagramView.notation
new file mode 100644
index 0000000..bd3a696
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/PapyrusGMFDiagramView.notation
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+  <notation:Diagram xmi:id="_LPui-ltCEeunP5nEef8ySw" type="PapyrusUMLClassDiagram" name="NewClassDiagram" measurementUnit="Pixel">
+    <children xmi:type="notation:Shape" xmi:id="_Ut6WIGYuEeuu1pDCMnwnvw" type="Class_Shape">
+      <children xmi:type="notation:DecorationNode" xmi:id="_Ut7kQGYuEeuu1pDCMnwnvw" type="Class_NameLabel"/>
+      <children xmi:type="notation:DecorationNode" xmi:id="_Ut7kQWYuEeuu1pDCMnwnvw" type="Class_FloatingNameLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_Ut7kQmYuEeuu1pDCMnwnvw" y="15"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_Ut7kQ2YuEeuu1pDCMnwnvw" type="Class_AttributeCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_Ut7kRGYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:SortingStyle" xmi:id="_Ut7kRWYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:FilteringStyle" xmi:id="_Ut7kRmYuEeuu1pDCMnwnvw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Ut7kR2YuEeuu1pDCMnwnvw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_Ut7kSGYuEeuu1pDCMnwnvw" type="Class_OperationCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_Ut7kSWYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:SortingStyle" xmi:id="_Ut7kSmYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:FilteringStyle" xmi:id="_Ut7kS2YuEeuu1pDCMnwnvw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Ut7kTGYuEeuu1pDCMnwnvw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_Ut7kTWYuEeuu1pDCMnwnvw" type="Class_NestedClassifierCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_Ut7kTmYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:SortingStyle" xmi:id="_Ut7kT2YuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:FilteringStyle" xmi:id="_Ut7kUGYuEeuu1pDCMnwnvw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Ut7kUWYuEeuu1pDCMnwnvw"/>
+      </children>
+      <element xmi:type="uml:Activity" href="PapyrusGMFDiagramView.uml#_vQcr0FvJEeuUuL2aCCt3sw"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Ut6WIWYuEeuu1pDCMnwnvw" x="80" y="80"/>
+    </children>
+    <children xmi:type="notation:Shape" xmi:id="_UulEgGYuEeuu1pDCMnwnvw" type="Class_Shape">
+      <children xmi:type="notation:DecorationNode" xmi:id="_UulEgmYuEeuu1pDCMnwnvw" type="Class_NameLabel"/>
+      <children xmi:type="notation:DecorationNode" xmi:id="_UulEg2YuEeuu1pDCMnwnvw" type="Class_FloatingNameLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_UulEhGYuEeuu1pDCMnwnvw" y="15"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_UulEhWYuEeuu1pDCMnwnvw" type="Class_AttributeCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_UulEhmYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:SortingStyle" xmi:id="_UulEh2YuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:FilteringStyle" xmi:id="_UulEiGYuEeuu1pDCMnwnvw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UulEiWYuEeuu1pDCMnwnvw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_UulEimYuEeuu1pDCMnwnvw" type="Class_OperationCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_UulEi2YuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:SortingStyle" xmi:id="_UulEjGYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:FilteringStyle" xmi:id="_UulEjWYuEeuu1pDCMnwnvw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UulEjmYuEeuu1pDCMnwnvw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_UulrkGYuEeuu1pDCMnwnvw" type="Class_NestedClassifierCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_UulrkWYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:SortingStyle" xmi:id="_UulrkmYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:FilteringStyle" xmi:id="_Uulrk2YuEeuu1pDCMnwnvw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UulrlGYuEeuu1pDCMnwnvw"/>
+      </children>
+      <element xmi:type="uml:StateMachine" href="PapyrusGMFDiagramView.uml#_x3veMFvJEeuUuL2aCCt3sw"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UulEgWYuEeuu1pDCMnwnvw" x="260" y="80"/>
+    </children>
+    <styles xmi:type="notation:StringValueStyle" xmi:id="_LPui-1tCEeunP5nEef8ySw" name="diagram_compatibility_version" stringValue="1.4.0"/>
+    <styles xmi:type="notation:DiagramStyle" xmi:id="_LPui_FtCEeunP5nEef8ySw"/>
+    <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_LPui_VtCEeunP5nEef8ySw" diagramKindId="org.eclipse.papyrus.uml.diagram.class">
+      <owner xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    </styles>
+    <element xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+  </notation:Diagram>
+  <notation:Diagram xmi:id="_vh9SkFvJEeuUuL2aCCt3sw" type="PapyrusUMLActivityDiagram" name="NewActivityDiagram" measurementUnit="Pixel">
+    <children xmi:type="notation:Shape" xmi:id="_vh9SkVvJEeuUuL2aCCt3sw" type="Activity_Shape">
+      <children xmi:type="notation:DecorationNode" xmi:id="_vh9SklvJEeuUuL2aCCt3sw" type="Activity_NameLabel"/>
+      <children xmi:type="notation:DecorationNode" xmi:id="_vh9Sk1vJEeuUuL2aCCt3sw" type="Activity_KeywordLabel"/>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_vh9SlFvJEeuUuL2aCCt3sw" type="Activity_ParameterCompartment">
+        <styles xmi:type="notation:SortingStyle" xmi:id="_vh9SlVvJEeuUuL2aCCt3sw"/>
+        <styles xmi:type="notation:FilteringStyle" xmi:id="_vh9SllvJEeuUuL2aCCt3sw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_vh9Sl1vJEeuUuL2aCCt3sw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_vh9SmFvJEeuUuL2aCCt3sw" type="Activity_PreconditionCompartment">
+        <styles xmi:type="notation:SortingStyle" xmi:id="_vh9SmVvJEeuUuL2aCCt3sw"/>
+        <styles xmi:type="notation:FilteringStyle" xmi:id="_vh9SmlvJEeuUuL2aCCt3sw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_vh9Sm1vJEeuUuL2aCCt3sw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_vh9SnFvJEeuUuL2aCCt3sw" type="Activity_PostconditionCompartment">
+        <styles xmi:type="notation:SortingStyle" xmi:id="_vh9SnVvJEeuUuL2aCCt3sw"/>
+        <styles xmi:type="notation:FilteringStyle" xmi:id="_vh9SnlvJEeuUuL2aCCt3sw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_vh9Sn1vJEeuUuL2aCCt3sw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_vh9SoFvJEeuUuL2aCCt3sw" type="Activity_ActivityNodeCompartment">
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_vh9SoVvJEeuUuL2aCCt3sw"/>
+      </children>
+      <element xmi:type="uml:Activity" href="PapyrusGMFDiagramView.uml#_vQcr0FvJEeuUuL2aCCt3sw"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_vh9SolvJEeuUuL2aCCt3sw"/>
+    </children>
+    <styles xmi:type="notation:StringValueStyle" xmi:id="_vh9So1vJEeuUuL2aCCt3sw" name="diagram_compatibility_version" stringValue="1.4.0"/>
+    <styles xmi:type="notation:DiagramStyle" xmi:id="_vh9SpFvJEeuUuL2aCCt3sw"/>
+    <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_vh9SpVvJEeuUuL2aCCt3sw" diagramKindId="org.eclipse.papyrus.uml.diagram.activity">
+      <owner xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    </styles>
+    <element xmi:type="uml:Activity" href="PapyrusGMFDiagramView.uml#_vQcr0FvJEeuUuL2aCCt3sw"/>
+  </notation:Diagram>
+  <notation:Diagram xmi:id="_yOfxUFvJEeuUuL2aCCt3sw" type="PapyrusUMLStateMachineDiagram" name="NewStateMachineDiagram" measurementUnit="Pixel">
+    <children xmi:type="notation:Shape" xmi:id="_yOfxUVvJEeuUuL2aCCt3sw" type="StateMachine_Shape">
+      <children xmi:type="notation:DecorationNode" xmi:id="_yOfxUlvJEeuUuL2aCCt3sw" type="StateMachine_NameLabel">
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yOfxU1vJEeuUuL2aCCt3sw" width="700" height="20"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_yOfxVFvJEeuUuL2aCCt3sw" type="StateMachine_RegionCompartment">
+        <children xmi:type="notation:Shape" xmi:id="_yOfxVVvJEeuUuL2aCCt3sw" type="Region_Shape">
+          <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_yOfxVlvJEeuUuL2aCCt3sw" source="RegionAnnotationKey">
+            <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yOfxV1vJEeuUuL2aCCt3sw" key="RegionZoneKey" value=""/>
+          </eAnnotations>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_yOfxWFvJEeuUuL2aCCt3sw" type="Region_SubvertexCompartment">
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yOfxWVvJEeuUuL2aCCt3sw"/>
+          </children>
+          <element xmi:type="uml:Region" href="PapyrusGMFDiagramView.uml#_yOfKQFvJEeuUuL2aCCt3sw"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yOfxWlvJEeuUuL2aCCt3sw" width="700" height="280"/>
+        </children>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yOfxW1vJEeuUuL2aCCt3sw" y="20" width="700" height="280"/>
+      </children>
+      <element xmi:type="uml:StateMachine" href="PapyrusGMFDiagramView.uml#_x3veMFvJEeuUuL2aCCt3sw"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yOfxXFvJEeuUuL2aCCt3sw" x="30" y="30" width="700" height="300"/>
+    </children>
+    <styles xmi:type="notation:StringValueStyle" xmi:id="_yOfxXVvJEeuUuL2aCCt3sw" name="diagram_compatibility_version" stringValue="1.4.0"/>
+    <styles xmi:type="notation:DiagramStyle" xmi:id="_yOfxXlvJEeuUuL2aCCt3sw"/>
+    <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_yOfxX1vJEeuUuL2aCCt3sw" diagramKindId="org.eclipse.papyrus.uml.diagram.stateMachine">
+      <owner xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    </styles>
+    <element xmi:type="uml:StateMachine" href="PapyrusGMFDiagramView.uml#_x3veMFvJEeuUuL2aCCt3sw"/>
+  </notation:Diagram>
+  <notation:Diagram xmi:id="_A9BwYFvMEeuUuL2aCCt3sw" type="PapyrusUMLClassDiagram" name="NewPackageDiagram" measurementUnit="Pixel">
+    <children xmi:type="notation:Shape" xmi:id="_WF8gEGYuEeuu1pDCMnwnvw" type="Class_Shape">
+      <children xmi:type="notation:DecorationNode" xmi:id="_WF9HIGYuEeuu1pDCMnwnvw" type="Class_NameLabel"/>
+      <children xmi:type="notation:DecorationNode" xmi:id="_WF9HIWYuEeuu1pDCMnwnvw" type="Class_FloatingNameLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_WF9HImYuEeuu1pDCMnwnvw" y="15"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_WF9HI2YuEeuu1pDCMnwnvw" type="Class_AttributeCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_WF9HJGYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:SortingStyle" xmi:id="_WF9HJWYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:FilteringStyle" xmi:id="_WF9HJmYuEeuu1pDCMnwnvw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WF9HJ2YuEeuu1pDCMnwnvw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_WF9HKGYuEeuu1pDCMnwnvw" type="Class_OperationCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_WF9HKWYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:SortingStyle" xmi:id="_WF9HKmYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:FilteringStyle" xmi:id="_WF9HK2YuEeuu1pDCMnwnvw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WF9HLGYuEeuu1pDCMnwnvw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_WF9HLWYuEeuu1pDCMnwnvw" type="Class_NestedClassifierCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_WF9HLmYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:SortingStyle" xmi:id="_WF9HL2YuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:FilteringStyle" xmi:id="_WF9HMGYuEeuu1pDCMnwnvw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WF9HMWYuEeuu1pDCMnwnvw"/>
+      </children>
+      <element xmi:type="uml:Activity" href="PapyrusGMFDiagramView.uml#_vQcr0FvJEeuUuL2aCCt3sw"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WF8gEWYuEeuu1pDCMnwnvw" x="80" y="80"/>
+    </children>
+    <children xmi:type="notation:Shape" xmi:id="_WGM-wGYuEeuu1pDCMnwnvw" type="Class_Shape">
+      <children xmi:type="notation:DecorationNode" xmi:id="_WGM-wmYuEeuu1pDCMnwnvw" type="Class_NameLabel"/>
+      <children xmi:type="notation:DecorationNode" xmi:id="_WGM-w2YuEeuu1pDCMnwnvw" type="Class_FloatingNameLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_WGM-xGYuEeuu1pDCMnwnvw" y="15"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_WGM-xWYuEeuu1pDCMnwnvw" type="Class_AttributeCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_WGM-xmYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:SortingStyle" xmi:id="_WGM-x2YuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:FilteringStyle" xmi:id="_WGM-yGYuEeuu1pDCMnwnvw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WGM-yWYuEeuu1pDCMnwnvw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_WGM-ymYuEeuu1pDCMnwnvw" type="Class_OperationCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_WGM-y2YuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:SortingStyle" xmi:id="_WGM-zGYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:FilteringStyle" xmi:id="_WGM-zWYuEeuu1pDCMnwnvw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WGM-zmYuEeuu1pDCMnwnvw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_WGM-z2YuEeuu1pDCMnwnvw" type="Class_NestedClassifierCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_WGM-0GYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:SortingStyle" xmi:id="_WGM-0WYuEeuu1pDCMnwnvw"/>
+        <styles xmi:type="notation:FilteringStyle" xmi:id="_WGM-0mYuEeuu1pDCMnwnvw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WGM-02YuEeuu1pDCMnwnvw"/>
+      </children>
+      <element xmi:type="uml:StateMachine" href="PapyrusGMFDiagramView.uml#_x3veMFvJEeuUuL2aCCt3sw"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WGM-wWYuEeuu1pDCMnwnvw" x="260" y="80"/>
+    </children>
+    <styles xmi:type="notation:StringValueStyle" xmi:id="_A9BwYVvMEeuUuL2aCCt3sw" name="diagram_compatibility_version" stringValue="1.4.0"/>
+    <styles xmi:type="notation:DiagramStyle" xmi:id="_A9BwYlvMEeuUuL2aCCt3sw"/>
+    <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_A9BwY1vMEeuUuL2aCCt3sw" diagramKindId="org.eclipse.papyrus.uml.diagram.package">
+      <owner xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    </styles>
+    <element xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+  </notation:Diagram>
+</xmi:XMI>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/PapyrusGMFDiagramView.pdst b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/PapyrusGMFDiagramView.pdst
new file mode 100644
index 0000000..38bf6a3
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/PapyrusGMFDiagramView.pdst
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructuretemplate="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructuretemplate" xmlns:documentstructuretemplate_1="http://www.eclipse.org/papyrus/model2doc/gmf/integration/1.0.0/documentstructuretemplate" xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+  <documentstructuretemplate:TextDocumentTemplate xmi:id="_2ArCcFvJEeuUuL2aCCt3sw" name="semanticContextAllDiagrams" kindId="org.eclipse.papyrus.model2doc.integration.docx.uml.architecture.genericDocument" mainTitle="PapyrusGMFDiagramView">
+    <semanticContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <graphicalContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <documentTemplatePrototype xmi:type="documentstructuretemplate:DocumentTemplatePrototype" href="../../../org.eclipse.papyrus.model2doc.integration.docx.uml.architecture/resources/docx-genericTextDocumentPrototype.pdst#DOCX-GenericUMLDocumentStructureTemplateType"/>
+    <documentStructureGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentStructureGeneratorConfiguration" xmi:id="_2ArCcVvJEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="semanticContextAllDiagrams" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx" structureGeneratorId="TextDocumentStructureGenerator.default" imageFolder="output/images" structureFolder="output"/>
+    <documentPart xmi:type="documentstructuretemplate:Body" xmi:id="_2ArCdFvJEeuUuL2aCCt3sw">
+      <bodyPartTemplate xmi:type="documentstructuretemplate_1:PapyrusGMFDiagramView" xmi:id="_2ArCdlvJEeuUuL2aCCt3sw" generate="true" generateTitle="true" customTitle="" generateIfEmpty="false" defaultTextIfEmpty="N/A" diagramImageMargin="10" imageFormat="png"/>
+    </documentPart>
+  </documentstructuretemplate:TextDocumentTemplate>
+  <documentstructuretemplate:TextDocumentTemplate xmi:id="_QkNykFvKEeuUuL2aCCt3sw" name="graphicalContextAllDiagrams" kindId="org.eclipse.papyrus.model2doc.integration.docx.uml.architecture.emptyDocument" mainTitle="PapyrusGMFDiagramView">
+    <semanticContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <graphicalContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <documentTemplatePrototype xmi:type="documentstructuretemplate:DocumentTemplatePrototype" href="../../../org.eclipse.papyrus.model2doc.integration.docx.uml.architecture/resources/docx-emptyTextDocumentPrototype.pdst#DOCX-EmptyUMLDocumentStructureTemplateType"/>
+    <documentStructureGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentStructureGeneratorConfiguration" xmi:id="_QkNykVvKEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="graphicalContextAllDiagrams" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx" structureGeneratorId="TextDocumentStructureGenerator.default" imageFolder="output/images" structureFolder="output"/>
+    <documentPart xmi:type="documentstructuretemplate:Body" xmi:id="_QkNylFvKEeuUuL2aCCt3sw">
+      <bodyPartTemplate xmi:type="documentstructuretemplate_1:PapyrusGMFDiagramView" xmi:id="_45HZwFvKEeuUuL2aCCt3sw" generate="true" generateTitle="true" customTitle="" generateIfEmpty="false" defaultTextIfEmpty="N/A" contextFilterRule="GRAPHICAL_CONTEXT" diagramImageMargin="10" imageFormat="png"/>
+    </documentPart>
+  </documentstructuretemplate:TextDocumentTemplate>
+  <documentstructuretemplate:TextDocumentTemplate xmi:id="_VXMZYFvKEeuUuL2aCCt3sw" name="bothDiagramContext" kindId="org.eclipse.papyrus.model2doc.integration.docx.uml.architecture.emptyDocument" mainTitle="PapyrusGMFDiagramView">
+    <semanticContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <graphicalContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <documentTemplatePrototype xmi:type="documentstructuretemplate:DocumentTemplatePrototype" href="../../../org.eclipse.papyrus.model2doc.integration.docx.uml.architecture/resources/docx-emptyTextDocumentPrototype.pdst#DOCX-EmptyUMLDocumentStructureTemplateType"/>
+    <documentStructureGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentStructureGeneratorConfiguration" xmi:id="_VXNAcFvKEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="bothDiagramContext" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx" structureGeneratorId="TextDocumentStructureGenerator.default" imageFolder="output/images" structureFolder="output"/>
+    <documentPart xmi:type="documentstructuretemplate:Body" xmi:id="_VXNAc1vKEeuUuL2aCCt3sw">
+      <bodyPartTemplate xmi:type="documentstructuretemplate_1:PapyrusGMFDiagramView" xmi:id="_5AZtgFvKEeuUuL2aCCt3sw" generate="true" generateTitle="true" customTitle="" generateIfEmpty="false" defaultTextIfEmpty="N/A" contextFilterRule="BOTH" diagramImageMargin="10" imageFormat="png"/>
+    </documentPart>
+  </documentstructuretemplate:TextDocumentTemplate>
+  <documentstructuretemplate:TextDocumentTemplate xmi:id="_ZopngFvKEeuUuL2aCCt3sw" name="customTitle" kindId="org.eclipse.papyrus.model2doc.integration.docx.uml.architecture.emptyDocument" mainTitle="PapyrusGMFDiagramView">
+    <semanticContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <graphicalContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <documentTemplatePrototype xmi:type="documentstructuretemplate:DocumentTemplatePrototype" href="../../../org.eclipse.papyrus.model2doc.integration.docx.uml.architecture/resources/docx-emptyTextDocumentPrototype.pdst#DOCX-EmptyUMLDocumentStructureTemplateType"/>
+    <documentStructureGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentStructureGeneratorConfiguration" xmi:id="_ZopngVvKEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="customTitle" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx" structureGeneratorId="TextDocumentStructureGenerator.default" imageFolder="output/images" structureFolder="output"/>
+    <documentPart xmi:type="documentstructuretemplate:Body" xmi:id="_ZopnhFvKEeuUuL2aCCt3sw">
+      <bodyPartTemplate xmi:type="documentstructuretemplate_1:PapyrusGMFDiagramView" xmi:id="_5HcwsFvKEeuUuL2aCCt3sw" generate="true" generateTitle="true" customTitle="My custom title" generateIfEmpty="false" defaultTextIfEmpty="N/A" diagramImageMargin="10" imageFormat="png"/>
+    </documentPart>
+  </documentstructuretemplate:TextDocumentTemplate>
+  <documentstructuretemplate:TextDocumentTemplate xmi:id="_iYaM8FvKEeuUuL2aCCt3sw" name="diagramKindId" kindId="org.eclipse.papyrus.model2doc.integration.docx.uml.architecture.emptyDocument" mainTitle="PapyrusGMFDiagramView">
+    <semanticContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <graphicalContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <documentTemplatePrototype xmi:type="documentstructuretemplate:DocumentTemplatePrototype" href="../../../org.eclipse.papyrus.model2doc.integration.docx.uml.architecture/resources/docx-emptyTextDocumentPrototype.pdst#DOCX-EmptyUMLDocumentStructureTemplateType"/>
+    <documentStructureGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentStructureGeneratorConfiguration" xmi:id="_iYaM8VvKEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="diagramKindId" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx" structureGeneratorId="TextDocumentStructureGenerator.default" imageFolder="output/images" structureFolder="output"/>
+    <documentPart xmi:type="documentstructuretemplate:Body" xmi:id="_iYaM9FvKEeuUuL2aCCt3sw">
+      <bodyPartTemplate xmi:type="documentstructuretemplate_1:PapyrusGMFDiagramView" xmi:id="_5dIs0FvKEeuUuL2aCCt3sw" generate="true" generateTitle="true" customTitle="" generateIfEmpty="false" defaultTextIfEmpty="N/A" diagramKindId="org.eclipse.papyrus.uml.diagram.class" diagramImageMargin="10" imageFormat="png"/>
+    </documentPart>
+  </documentstructuretemplate:TextDocumentTemplate>
+  <documentstructuretemplate:TextDocumentTemplate xmi:id="_kS3ugFvKEeuUuL2aCCt3sw" name="diagramType" kindId="org.eclipse.papyrus.model2doc.integration.docx.uml.architecture.emptyDocument" mainTitle="PapyrusGMFDiagramView">
+    <semanticContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <graphicalContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <documentTemplatePrototype xmi:type="documentstructuretemplate:DocumentTemplatePrototype" href="../../../org.eclipse.papyrus.model2doc.integration.docx.uml.architecture/resources/docx-emptyTextDocumentPrototype.pdst#DOCX-EmptyUMLDocumentStructureTemplateType"/>
+    <documentStructureGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentStructureGeneratorConfiguration" xmi:id="_kS3ugVvKEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="diagramType" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx" structureGeneratorId="TextDocumentStructureGenerator.default" imageFolder="output/images" structureFolder="output"/>
+    <documentPart xmi:type="documentstructuretemplate:Body" xmi:id="_kS3uhFvKEeuUuL2aCCt3sw">
+      <bodyPartTemplate xmi:type="documentstructuretemplate_1:PapyrusGMFDiagramView" xmi:id="_5lglsFvKEeuUuL2aCCt3sw" generate="true" generateTitle="true" customTitle="" generateIfEmpty="false" defaultTextIfEmpty="N/A" diagramType="PapyrusUMLClassDiagram" diagramImageMargin="10" imageFormat="png"/>
+    </documentPart>
+  </documentstructuretemplate:TextDocumentTemplate>
+  <documentstructuretemplate:TextDocumentTemplate xmi:id="_nvY4sFvKEeuUuL2aCCt3sw" name="doNotGenerate" kindId="org.eclipse.papyrus.model2doc.integration.docx.uml.architecture.emptyDocument" mainTitle="PapyrusGMFDiagramView">
+    <semanticContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <graphicalContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <documentTemplatePrototype xmi:type="documentstructuretemplate:DocumentTemplatePrototype" href="../../../org.eclipse.papyrus.model2doc.integration.docx.uml.architecture/resources/docx-emptyTextDocumentPrototype.pdst#DOCX-EmptyUMLDocumentStructureTemplateType"/>
+    <documentStructureGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentStructureGeneratorConfiguration" xmi:id="_nvY4sVvKEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="doNotGenerate" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx" structureGeneratorId="TextDocumentStructureGenerator.default" imageFolder="output/images" structureFolder="output"/>
+    <documentPart xmi:type="documentstructuretemplate:Body" xmi:id="_nvY4tFvKEeuUuL2aCCt3sw">
+      <bodyPartTemplate xmi:type="documentstructuretemplate_1:PapyrusGMFDiagramView" xmi:id="_5sORsFvKEeuUuL2aCCt3sw" generate="false" generateTitle="true" customTitle="" generateIfEmpty="false" defaultTextIfEmpty="N/A" diagramImageMargin="10" imageFormat="png"/>
+    </documentPart>
+  </documentstructuretemplate:TextDocumentTemplate>
+  <documentstructuretemplate:TextDocumentTemplate xmi:id="_p8IdEFvKEeuUuL2aCCt3sw" name="doNotGenerateTitle" kindId="org.eclipse.papyrus.model2doc.integration.docx.uml.architecture.emptyDocument" mainTitle="PapyrusGMFDiagramView">
+    <semanticContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <graphicalContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <documentTemplatePrototype xmi:type="documentstructuretemplate:DocumentTemplatePrototype" href="../../../org.eclipse.papyrus.model2doc.integration.docx.uml.architecture/resources/docx-emptyTextDocumentPrototype.pdst#DOCX-EmptyUMLDocumentStructureTemplateType"/>
+    <documentStructureGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentStructureGeneratorConfiguration" xmi:id="_p8IdEVvKEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="doNotGenerateTitle" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx" structureGeneratorId="TextDocumentStructureGenerator.default" imageFolder="output/images" structureFolder="output"/>
+    <documentPart xmi:type="documentstructuretemplate:Body" xmi:id="_p8IdFFvKEeuUuL2aCCt3sw">
+      <bodyPartTemplate xmi:type="documentstructuretemplate_1:PapyrusGMFDiagramView" xmi:id="_5z7cMFvKEeuUuL2aCCt3sw" generate="true" generateTitle="false" customTitle="" generateIfEmpty="false" defaultTextIfEmpty="N/A" diagramImageMargin="10" imageFormat="png"/>
+    </documentPart>
+  </documentstructuretemplate:TextDocumentTemplate>
+  <documentstructuretemplate:TextDocumentTemplate xmi:id="_sZrdkFvKEeuUuL2aCCt3sw" name="generateIfEmpty" kindId="org.eclipse.papyrus.model2doc.integration.docx.uml.architecture.emptyDocument" mainTitle="PapyrusGMFDiagramView">
+    <semanticContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <graphicalContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <documentTemplatePrototype xmi:type="documentstructuretemplate:DocumentTemplatePrototype" href="../../../org.eclipse.papyrus.model2doc.integration.docx.uml.architecture/resources/docx-emptyTextDocumentPrototype.pdst#DOCX-EmptyUMLDocumentStructureTemplateType"/>
+    <documentStructureGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentStructureGeneratorConfiguration" xmi:id="_sZrdkVvKEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="generateIfEmpty" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx" structureGeneratorId="TextDocumentStructureGenerator.default" imageFolder="output/images" structureFolder="output"/>
+    <documentPart xmi:type="documentstructuretemplate:Body" xmi:id="_sZrdlFvKEeuUuL2aCCt3sw">
+      <bodyPartTemplate xmi:type="documentstructuretemplate_1:PapyrusGMFDiagramView" xmi:id="_57yXsFvKEeuUuL2aCCt3sw" generate="true" generateTitle="true" customTitle="" generateIfEmpty="true" defaultTextIfEmpty="N/A" diagramKindId="org.eclipse.papyrus.uml.diagram.sequence" diagramImageMargin="10" imageFormat="png"/>
+    </documentPart>
+  </documentstructuretemplate:TextDocumentTemplate>
+  <documentstructuretemplate:TextDocumentTemplate xmi:id="_u2JgAFvKEeuUuL2aCCt3sw" name="imageFormat" kindId="org.eclipse.papyrus.model2doc.integration.docx.uml.architecture.emptyDocument" mainTitle="PapyrusGMFDiagramView">
+    <semanticContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <graphicalContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <documentTemplatePrototype xmi:type="documentstructuretemplate:DocumentTemplatePrototype" href="../../../org.eclipse.papyrus.model2doc.integration.docx.uml.architecture/resources/docx-emptyTextDocumentPrototype.pdst#DOCX-EmptyUMLDocumentStructureTemplateType"/>
+    <documentStructureGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentStructureGeneratorConfiguration" xmi:id="_u2JgAVvKEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="imageFormat" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx" structureGeneratorId="TextDocumentStructureGenerator.default" imageFolder="output/images" structureFolder="output"/>
+    <documentPart xmi:type="documentstructuretemplate:Body" xmi:id="_u2JgBFvKEeuUuL2aCCt3sw">
+      <bodyPartTemplate xmi:type="documentstructuretemplate_1:PapyrusGMFDiagramView" xmi:id="_6FLkQFvKEeuUuL2aCCt3sw" generate="true" generateTitle="true" customTitle="" generateIfEmpty="false" defaultTextIfEmpty="N/A" diagramImageMargin="10"/>
+    </documentPart>
+  </documentstructuretemplate:TextDocumentTemplate>
+  <documentstructuretemplate:TextDocumentTemplate xmi:id="__s3osFvOEeuUuL2aCCt3sw" name="empty" kindId="org.eclipse.papyrus.model2doc.integration.docx.uml.architecture.emptyDocument" mainTitle="PapyrusGMFDiagramView">
+    <semanticContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <graphicalContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <documentTemplatePrototype xmi:type="documentstructuretemplate:DocumentTemplatePrototype" href="../../../org.eclipse.papyrus.model2doc.integration.docx.uml.architecture/resources/docx-emptyTextDocumentPrototype.pdst#DOCX-EmptyUMLDocumentStructureTemplateType"/>
+    <documentStructureGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentStructureGeneratorConfiguration" xmi:id="__s3osVvOEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="empty" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx" structureGeneratorId="TextDocumentStructureGenerator.default" imageFolder="output/images" structureFolder="output"/>
+    <documentPart xmi:type="documentstructuretemplate:Body" xmi:id="__s3otFvOEeuUuL2aCCt3sw">
+      <bodyPartTemplate xmi:type="documentstructuretemplate_1:PapyrusGMFDiagramView" xmi:id="_BpFdwFvPEeuUuL2aCCt3sw" generate="true" generateTitle="true" customTitle="" generateIfEmpty="false" defaultTextIfEmpty="N/A" diagramKindId="org.eclipse.papyrus.uml.diagram.sequence" diagramImageMargin="10" imageFormat="png"/>
+    </documentPart>
+  </documentstructuretemplate:TextDocumentTemplate>
+  <documentstructuretemplate:TextDocumentTemplate xmi:id="_FL3YsGoMEeup_N2weqaNEQ" name="withSpacesInPath" kindId="org.eclipse.papyrus.model2doc.integration.docx.uml.architecture.emptyDocument" mainTitle="PapyrusGMFDiagramView">
+    <semanticContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <graphicalContext xmi:type="uml:Model" href="PapyrusGMFDiagramView.uml#_LPIGAFtCEeunP5nEef8ySw"/>
+    <documentTemplatePrototype xmi:type="documentstructuretemplate:DocumentTemplatePrototype" href="../../../org.eclipse.papyrus.model2doc.integration.docx.uml.architecture/resources/docx-emptyTextDocumentPrototype.pdst#DOCX-EmptyUMLDocumentStructureTemplateType"/>
+    <documentStructureGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentStructureGeneratorConfiguration" xmi:id="_FL3_wGoMEeup_N2weqaNEQ" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="withSpacesInPath" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx" structureGeneratorId="TextDocumentStructureGenerator.default" imageFolder="output/path with scapes and âccéènt" structureFolder="output"/>
+    <documentPart xmi:type="documentstructuretemplate:Body" xmi:id="_FL3_w2oMEeup_N2weqaNEQ">
+      <bodyPartTemplate xmi:type="documentstructuretemplate_1:PapyrusGMFDiagramView" xmi:id="_GfyesGoMEeup_N2weqaNEQ" generate="true" generateTitle="true" generateIfEmpty="false" defaultTextIfEmpty="N/A" diagramImageMargin="10"/>
+    </documentPart>
+  </documentstructuretemplate:TextDocumentTemplate>
+</xmi:XMI>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/PapyrusGMFDiagramView.uml b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/PapyrusGMFDiagramView.uml
new file mode 100644
index 0000000..7283477
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/PapyrusGMFDiagramView.uml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_LPIGAFtCEeunP5nEef8ySw" name="PapyrusGMFDiagramView">
+  <packageImport xmi:type="uml:PackageImport" xmi:id="_LQeJ0FtCEeunP5nEef8ySw">
+    <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+  </packageImport>
+  <packagedElement xmi:type="uml:Activity" xmi:id="_vQcr0FvJEeuUuL2aCCt3sw" name="Activity2"/>
+  <packagedElement xmi:type="uml:StateMachine" xmi:id="_x3veMFvJEeuUuL2aCCt3sw" name="StateMachine3">
+    <region xmi:type="uml:Region" xmi:id="_yOfKQFvJEeuUuL2aCCt3sw" name="Region1"/>
+  </packagedElement>
+</uml:Model>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/README.MD b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/README.MD
new file mode 100644
index 0000000..61b8131
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/README.MD
@@ -0,0 +1,7 @@
+WARNING ! 
+
+If you generate with your current install the path of images will be : platform:/resource/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/output/image/< PATH_TO_THE_FILE >
+However in the test environment the path to the generated image is platform:/resource/< TEST_METHOD_NAME >/output/image/< PATH_TO_THE_FILE >
+
+So to make the test works you should replace in the pds file every "platform:/resource/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/" by "platform:/resource/< TEST_METHOD_NAME >/"
+
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/bothDiagramContext.pds b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/bothDiagramContext.pds
new file mode 100644
index 0000000..a021b90
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/bothDiagramContext.pds
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:TextDocument xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration" xmi:id="_tAE0gFyhEeu94_YVwia6Zg" mainTitle="PapyrusGMFDiagramView">
+  <documentGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentGeneratorConfiguration" xmi:id="_tAE0gVyhEeu94_YVwia6Zg" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="bothDiagramContext" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx"/>
+  <textDocumentPart xmi:type="documentstructure:Body" xmi:id="_tAE0glyhEeu94_YVwia6Zg">
+    <bodyPart xmi:type="documentstructure:Title" xmi:id="_tAE0g1yhEeu94_YVwia6Zg" title="All owned diagrams">
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_tAE0hFyhEeu94_YVwia6Zg" filePath="platform:/resource/bothDiagramContextPapyrusGMFDiagramViewMapperTest/output/images/NewClassDiagram__LPui-ltCEeunP5nEef8ySw.png" caption="NewClassDiagram"/>
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_tAE0hVyhEeu94_YVwia6Zg" filePath="platform:/resource/bothDiagramContextPapyrusGMFDiagramViewMapperTest/output/images/NewPackageDiagram__A9BwYFvMEeuUuL2aCCt3sw.png" caption="NewPackageDiagram"/>
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_tAE0h1yhEeu94_YVwia6Zg" filePath="platform:/resource/bothDiagramContextPapyrusGMFDiagramViewMapperTest/output/images/NewActivityDiagram__vh9SkFvJEeuUuL2aCCt3sw.png" caption="NewActivityDiagram"/>
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_tAE0iFyhEeu94_YVwia6Zg" filePath="platform:/resource/bothDiagramContextPapyrusGMFDiagramViewMapperTest/output/images/NewStateMachineDiagram__yOfxUFvJEeuUuL2aCCt3sw.png" caption="NewStateMachineDiagram"/>
+    </bodyPart>
+  </textDocumentPart>
+</documentstructure:TextDocument>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/customTitle.pds b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/customTitle.pds
new file mode 100644
index 0000000..13105f9
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/customTitle.pds
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:TextDocument xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration" xmi:id="_9a1mkFvMEeuUuL2aCCt3sw" mainTitle="PapyrusGMFDiagramView">
+  <documentGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentGeneratorConfiguration" xmi:id="_9a1mkVvMEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="customTitle" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx"/>
+  <textDocumentPart xmi:type="documentstructure:Body" xmi:id="_9a1mklvMEeuUuL2aCCt3sw">
+    <bodyPart xmi:type="documentstructure:Title" xmi:id="_9a1mk1vMEeuUuL2aCCt3sw" title="My custom title">
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_9a1mlFvMEeuUuL2aCCt3sw" filePath="platform:/resource/customTitlePapyrusGMFDiagramViewMapperTest/output/images/NewClassDiagram__LPui-ltCEeunP5nEef8ySw.png" caption="NewClassDiagram"/>
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_9a1mlVvMEeuUuL2aCCt3sw" filePath="platform:/resource/customTitlePapyrusGMFDiagramViewMapperTest/output/images/NewPackageDiagram__A9BwYFvMEeuUuL2aCCt3sw.png" caption="NewPackageDiagram"/>
+    </bodyPart>
+  </textDocumentPart>
+</documentstructure:TextDocument>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/diagramKindId.pds b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/diagramKindId.pds
new file mode 100644
index 0000000..6c0a29a
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/diagramKindId.pds
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:TextDocument xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration" xmi:id="_-aYYAFvMEeuUuL2aCCt3sw" mainTitle="PapyrusGMFDiagramView">
+  <documentGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentGeneratorConfiguration" xmi:id="_-aYYAVvMEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="diagramKindId" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx"/>
+  <textDocumentPart xmi:type="documentstructure:Body" xmi:id="_-aYYAlvMEeuUuL2aCCt3sw">
+    <bodyPart xmi:type="documentstructure:Title" xmi:id="_-aYYA1vMEeuUuL2aCCt3sw" title="Diagrams of type null and kind org.eclipse.papyrus.uml.diagram.class">
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_-aYYBFvMEeuUuL2aCCt3sw" filePath="platform:/resource/diagramKindIdPapyrusGMFDiagramViewMapperTest/output/images/NewClassDiagram__LPui-ltCEeunP5nEef8ySw.png" caption="NewClassDiagram"/>
+    </bodyPart>
+  </textDocumentPart>
+</documentstructure:TextDocument>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/diagramType.pds b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/diagramType.pds
new file mode 100644
index 0000000..80b6d8f
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/diagramType.pds
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:TextDocument xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration" xmi:id="_-_DLUFvMEeuUuL2aCCt3sw" mainTitle="PapyrusGMFDiagramView">
+  <documentGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentGeneratorConfiguration" xmi:id="_-_DLUVvMEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="diagramType" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx"/>
+  <textDocumentPart xmi:type="documentstructure:Body" xmi:id="_-_DLUlvMEeuUuL2aCCt3sw">
+    <bodyPart xmi:type="documentstructure:Title" xmi:id="_-_DLU1vMEeuUuL2aCCt3sw" title="All owned diagrams">
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_-_DLVFvMEeuUuL2aCCt3sw" filePath="platform:/resource/diagramTypePapyrusGMFDiagramViewMapperTest/output/images/NewClassDiagram__LPui-ltCEeunP5nEef8ySw.png" caption="NewClassDiagram"/>
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_-_DLVVvMEeuUuL2aCCt3sw" filePath="platform:/resource/diagramTypePapyrusGMFDiagramViewMapperTest/output/images/NewPackageDiagram__A9BwYFvMEeuUuL2aCCt3sw.png" caption="NewPackageDiagram"/>
+    </bodyPart>
+  </textDocumentPart>
+</documentstructure:TextDocument>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/doNotGenerate.pds b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/doNotGenerate.pds
new file mode 100644
index 0000000..81dfb71
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/doNotGenerate.pds
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:TextDocument xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration" xmi:id="__d6RkFvMEeuUuL2aCCt3sw" mainTitle="PapyrusGMFDiagramView">
+  <documentGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentGeneratorConfiguration" xmi:id="__d6RkVvMEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="doNotGenerate" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx"/>
+  <textDocumentPart xmi:type="documentstructure:Body" xmi:id="__d6RklvMEeuUuL2aCCt3sw"/>
+</documentstructure:TextDocument>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/doNotGenerateTitle.pds b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/doNotGenerateTitle.pds
new file mode 100644
index 0000000..7145bf7
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/doNotGenerateTitle.pds
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:TextDocument xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration" xmi:id="__6nbsFvMEeuUuL2aCCt3sw" mainTitle="PapyrusGMFDiagramView">
+  <documentGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentGeneratorConfiguration" xmi:id="__6nbsVvMEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="doNotGenerateTitle" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx"/>
+  <textDocumentPart xmi:type="documentstructure:Body" xmi:id="__6nbslvMEeuUuL2aCCt3sw">
+    <bodyPart xmi:type="documentstructure:Image" xmi:id="__6nbs1vMEeuUuL2aCCt3sw" filePath="platform:/resource/doNotGenerateTitlePapyrusGMFDiagramViewMapperTest/output/images/NewClassDiagram__LPui-ltCEeunP5nEef8ySw.png" caption="NewClassDiagram"/>
+    <bodyPart xmi:type="documentstructure:Image" xmi:id="__6nbtFvMEeuUuL2aCCt3sw" filePath="platform:/resource/doNotGenerateTitlePapyrusGMFDiagramViewMapperTest/output/images/NewPackageDiagram__A9BwYFvMEeuUuL2aCCt3sw.png" caption="NewPackageDiagram"/>
+  </textDocumentPart>
+</documentstructure:TextDocument>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/empty.pds b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/empty.pds
new file mode 100644
index 0000000..e05d9fd
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/empty.pds
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:TextDocument xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration" xmi:id="_DiSbEFvPEeuUuL2aCCt3sw" mainTitle="PapyrusGMFDiagramView">
+  <documentGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentGeneratorConfiguration" xmi:id="_DiSbEVvPEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="empty" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx"/>
+  <textDocumentPart xmi:type="documentstructure:Body" xmi:id="_DiSbElvPEeuUuL2aCCt3sw"/>
+</documentstructure:TextDocument>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/generateIfEmpty.pds b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/generateIfEmpty.pds
new file mode 100644
index 0000000..23e42ec
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/generateIfEmpty.pds
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:TextDocument xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration" xmi:id="_ZX-m4FvNEeuUuL2aCCt3sw" mainTitle="PapyrusGMFDiagramView">
+  <documentGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentGeneratorConfiguration" xmi:id="_ZX-m4VvNEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="generateIfEmpty" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx"/>
+  <textDocumentPart xmi:type="documentstructure:Body" xmi:id="_ZX-m4lvNEeuUuL2aCCt3sw">
+    <bodyPart xmi:type="documentstructure:Title" xmi:id="_ZX-m41vNEeuUuL2aCCt3sw" title="Diagrams of type null and kind org.eclipse.papyrus.uml.diagram.sequence">
+      <subBodyPart xmi:type="documentstructure:Paragraph" xmi:id="_ZX-m5FvNEeuUuL2aCCt3sw" text="N/A"/>
+    </bodyPart>
+  </textDocumentPart>
+</documentstructure:TextDocument>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/graphicalContextAllDiagrams.pds b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/graphicalContextAllDiagrams.pds
new file mode 100644
index 0000000..c8d277d
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/graphicalContextAllDiagrams.pds
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:TextDocument xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration" xmi:id="_88_0AFvMEeuUuL2aCCt3sw" mainTitle="PapyrusGMFDiagramView">
+  <documentGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentGeneratorConfiguration" xmi:id="_88_0AVvMEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="graphicalContextAllDiagrams" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx"/>
+  <textDocumentPart xmi:type="documentstructure:Body" xmi:id="_88_0AlvMEeuUuL2aCCt3sw">
+    <bodyPart xmi:type="documentstructure:Title" xmi:id="_88_0A1vMEeuUuL2aCCt3sw" title="All owned diagrams">
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_88_0BFvMEeuUuL2aCCt3sw" filePath="platform:/resource/graphicalContextAllDiagramsPapyrusGMFDiagramViewMapperTest/output/images/NewClassDiagram__LPui-ltCEeunP5nEef8ySw.png" caption="NewClassDiagram"/>
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_88_0BVvMEeuUuL2aCCt3sw" filePath="platform:/resource/graphicalContextAllDiagramsPapyrusGMFDiagramViewMapperTest/output/images/NewActivityDiagram__vh9SkFvJEeuUuL2aCCt3sw.png" caption="NewActivityDiagram"/>
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_88_0BlvMEeuUuL2aCCt3sw" filePath="platform:/resource/graphicalContextAllDiagramsPapyrusGMFDiagramViewMapperTest/output/images/NewStateMachineDiagram__yOfxUFvJEeuUuL2aCCt3sw.png" caption="NewStateMachineDiagram"/>
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_88_0B1vMEeuUuL2aCCt3sw" filePath="platform:/resource/graphicalContextAllDiagramsPapyrusGMFDiagramViewMapperTest/output/images/NewPackageDiagram__A9BwYFvMEeuUuL2aCCt3sw.png" caption="NewPackageDiagram"/>
+    </bodyPart>
+  </textDocumentPart>
+</documentstructure:TextDocument>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/imageFormat.pds b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/imageFormat.pds
new file mode 100644
index 0000000..058ef48
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/imageFormat.pds
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:TextDocument xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration" xmi:id="_j7Bu4FvNEeuUuL2aCCt3sw" mainTitle="PapyrusGMFDiagramView">
+  <documentGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentGeneratorConfiguration" xmi:id="_j7Bu4VvNEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="imageFormat" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx"/>
+  <textDocumentPart xmi:type="documentstructure:Body" xmi:id="_j7Bu4lvNEeuUuL2aCCt3sw">
+    <bodyPart xmi:type="documentstructure:Title" xmi:id="_j7Bu41vNEeuUuL2aCCt3sw" title="All owned diagrams">
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_j7Bu5FvNEeuUuL2aCCt3sw" filePath="platform:/resource/imageFormatPapyrusGMFDiagramViewMapperTest/output/images/NewClassDiagram__LPui-ltCEeunP5nEef8ySw.svg" caption="NewClassDiagram"/>
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_j7Bu5VvNEeuUuL2aCCt3sw" filePath="platform:/resource/imageFormatPapyrusGMFDiagramViewMapperTest/output/images/NewPackageDiagram__A9BwYFvMEeuUuL2aCCt3sw.svg" caption="NewPackageDiagram"/>
+    </bodyPart>
+  </textDocumentPart>
+</documentstructure:TextDocument>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/semanticContextAllDiagrams.pds b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/semanticContextAllDiagrams.pds
new file mode 100644
index 0000000..cde2609
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/semanticContextAllDiagrams.pds
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:TextDocument xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration" xmi:id="_61wasFvMEeuUuL2aCCt3sw" mainTitle="PapyrusGMFDiagramView">
+  <documentGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentGeneratorConfiguration" xmi:id="_61wasVvMEeuUuL2aCCt3sw" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="semanticContextAllDiagrams" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx"/>
+  <textDocumentPart xmi:type="documentstructure:Body" xmi:id="_61waslvMEeuUuL2aCCt3sw">
+    <bodyPart xmi:type="documentstructure:Title" xmi:id="_61was1vMEeuUuL2aCCt3sw" title="All owned diagrams">
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_61xBwFvMEeuUuL2aCCt3sw" filePath="platform:/resource/semanticContextAllDiagramsPapyrusGMFDiagramViewMapperTest/output/images/NewClassDiagram__LPui-ltCEeunP5nEef8ySw.png" caption="NewClassDiagram"/>
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_61xBwVvMEeuUuL2aCCt3sw" filePath="platform:/resource/semanticContextAllDiagramsPapyrusGMFDiagramViewMapperTest/output/images/NewPackageDiagram__A9BwYFvMEeuUuL2aCCt3sw.png" caption="NewPackageDiagram"/>
+    </bodyPart>
+  </textDocumentPart>
+</documentstructure:TextDocument>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/withSpacesInPath.pds b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/withSpacesInPath.pds
new file mode 100644
index 0000000..9ac8acb
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/resources/PapyrusGMFDiagramView/expectedOutput/withSpacesInPath.pds
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<documentstructure:TextDocument xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:documentstructure="http://www.eclipse.org/papyrus/model2doc/emf/1.0.0/documentstructure" xmlns:generatorconfiguration="http://www.eclipse.org/papyrus/model2doc/1.0.0/generatorconfiguration" xmi:id="_PES2YGoMEeup_N2weqaNEQ" mainTitle="PapyrusGMFDiagramView">
+  <documentGeneratorConfiguration xmi:type="generatorconfiguration:DefaultDocumentGeneratorConfiguration" xmi:id="_PES2YWoMEeup_N2weqaNEQ" saveDocumentStructure="true" saveImages="true" templateFile="platform:/plugin/org.eclipse.papyrus.model2doc.docx/templates/PapyrusTemplate.dotx" documentName="withSpacesInPath" documentFolder="output" documentGeneratorId="org.eclipse.papyrus.model2doc.document.generator.docx"/>
+  <textDocumentPart xmi:type="documentstructure:Body" xmi:id="_PES2YmoMEeup_N2weqaNEQ">
+    <bodyPart xmi:type="documentstructure:Title" xmi:id="_PES2Y2oMEeup_N2weqaNEQ" title="All owned diagrams">
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_PES2ZGoMEeup_N2weqaNEQ" filePath="platform:/resource/withSpacesInPathPapyrusGMFDiagramViewMapperTest/output/path with scapes and âccéènt/NewClassDiagram__LPui-ltCEeunP5nEef8ySw.svg" caption="NewClassDiagram"/>
+      <subBodyPart xmi:type="documentstructure:Image" xmi:id="_PES2ZWoMEeup_N2weqaNEQ" filePath="platform:/resource/withSpacesInPathPapyrusGMFDiagramViewMapperTest/output/path with scapes and âccéènt/NewPackageDiagram__A9BwYFvMEeuUuL2aCCt3sw.svg" caption="NewPackageDiagram"/>
+    </bodyPart>
+  </textDocumentPart>
+</documentstructure:TextDocument>
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/tests/AbstractDiagramViewMapperTests.java b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/tests/AbstractDiagramViewMapperTests.java
new file mode 100644
index 0000000..83e3cdf
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/tests/AbstractDiagramViewMapperTests.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2021 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:
+ *   Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests;
+
+import java.io.File;
+import java.net.URL;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.Image;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.TextDocument;
+import org.eclipse.papyrus.model2doc.emf.template2structure.tests.AbstractTemplateToStructureTests;
+import org.junit.Assert;
+
+/**
+ *
+ */
+@SuppressWarnings("nls")
+public abstract class AbstractDiagramViewMapperTests extends AbstractTemplateToStructureTests {
+
+	/**
+	 * @param generatedTextDocument
+	 */
+	protected void checkGeneratedImages(TextDocument generatedTextDocument, String expectedFileExtension) {
+		final String projectToRefresh = generatedTextDocument.getDocumentGeneratorConfiguration().createDocumentOutputAccessor().getProjectName();
+		if (projectToRefresh != null && !projectToRefresh.isEmpty()) {
+			final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectToRefresh);
+			try {
+				project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+			} catch (CoreException e) {
+				Assert.fail("Can not refresh project");
+			}
+		} else {
+			Assert.fail("The project does not exist");
+		}
+
+		TreeIterator<EObject> treeIter = generatedTextDocument.eAllContents();
+		while (treeIter.hasNext()) {
+			EObject eObject = treeIter.next();
+			if (eObject instanceof Image) {
+				Image image = (Image) eObject;
+				URL url = image.getFileAccessor().createInputFileURL();
+				String myPath = image.getFileAccessor().urlToPathString(url, true);
+				File file3 = new File(myPath);
+				Assert.assertTrue(NLS.bind("The generated image {0} should exist", myPath), file3.exists());
+			}
+		}
+	}
+
+	private static void displayRes(IResource resource, String prefix) {
+		if (resource instanceof IContainer) {
+			IContainer folder = (IContainer) resource;
+			System.out.println(prefix + "folder name: " + folder.getName());
+			try {
+				for (int i = 0; i < folder.members().length; i++) {
+					displayRes(folder.members()[i], prefix + "*");
+				}
+			} catch (CoreException e) {
+				Activator.log.error(e);
+			}
+		} else if (resource instanceof IFile) {
+			System.out.println(prefix + "file name: " + ((IFile) resource).getName());
+		}
+	}
+
+}
diff --git a/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/tests/Activator.java b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/tests/Activator.java
new file mode 100644
index 0000000..e6f94fc
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/tests/Activator.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2021 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:
+ *   Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.model2doc.integration.gmf.template2structure.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.integration.gmf.template2structure.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();
+	}
+
+	@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/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/tests/PapyrusGMFDiagramViewMapperTest.java b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/tests/PapyrusGMFDiagramViewMapperTest.java
new file mode 100644
index 0000000..cb4b4fd
--- /dev/null
+++ b/tests/integration/org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests/src/org/eclipse/papyrus/model2doc/integration/gmf/template2structure/tests/PapyrusGMFDiagramViewMapperTest.java
@@ -0,0 +1,294 @@
+/*****************************************************************************
+ * Copyright (c) 2021 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:
+ *   Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.junit.utils.rules.AbstractModelFixture;
+import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
+import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.TextDocument;
+import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.TextDocumentTemplate;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Test for PapyrusGMFDiagramViewMapper
+ *
+ * WARNING expected generated files should be modified to be sure that the path is the same as in the test environment
+ */
+@SuppressWarnings("nls")
+@PluginResource({ "resources/PapyrusGMFDiagramView/PapyrusGMFDiagramView.di", "resources/PapyrusGMFDiagramView/PapyrusGMFDiagramView.pdst" })
+@ActiveDiagram("NewClassDiagram")
+public class PapyrusGMFDiagramViewMapperTest extends AbstractDiagramViewMapperTests {
+
+	public static final String EXPECTED_RESOURCE_PATH = Activator.PLUGIN_ID + "/resources/PapyrusGMFDiagramView/expectedOutput/";
+
+	/**
+	 * The editor fixture
+	 */
+	@Rule
+	public PapyrusEditorFixture fixture = new PapyrusEditorFixture(true, Collections.singletonList("pdst"));
+
+	/**
+	 * @see org.eclipse.papyrus.model2doc.emf.template2structure.tests.AbstractTemplateToStructureTests#getFixture()
+	 *
+	 * @return
+	 */
+	@Override
+	public AbstractModelFixture<TransactionalEditingDomain> getFixture() {
+		return fixture;
+	}
+
+	/**
+	 * Test the default PapyrusGMFDiagramView
+	 */
+	@Test
+	public void semanticContextAllDiagramsPapyrusGMFDiagramViewMapperTest() {
+		TextDocumentTemplate textDocumentTemplate = getTextDocumentTemplate("semanticContextAllDiagrams");
+		Collection<?> commandResult = generateDocumentStructure(textDocumentTemplate);
+
+		// Test the generated file is the same as the expected one
+		Assert.assertTrue("The generated object should be a TextDocument", commandResult.iterator().next() instanceof TextDocument);
+		TextDocument generatedTextDocument = (TextDocument) commandResult.iterator().next();
+		EObject expectedTextDocument = loadExpectedDocumentStructureResource(EXPECTED_RESOURCE_PATH + "semanticContextAllDiagrams.pds");
+		Assert.assertTrue("The generated DocumentStructure does not match with the expected one"
+				+ debugDisplay("output/semanticContextAllDiagrams.pds"),
+				EcoreUtil.equals(expectedTextDocument, (EObject) commandResult.iterator().next()));
+
+		// Check generated image
+		checkGeneratedImages(generatedTextDocument, "png");
+	}
+
+	/**
+	 * Test the default PapyrusGMFDiagramView with a custom title
+	 */
+	@Test
+	public void customTitlePapyrusGMFDiagramViewMapperTest() {
+		TextDocumentTemplate textDocumentTemplate = getTextDocumentTemplate("customTitle");
+		Collection<?> commandResult = generateDocumentStructure(textDocumentTemplate);
+
+		// Test the generated file is the same as the expected one
+		EObject expectedTextDocument = loadExpectedDocumentStructureResource(EXPECTED_RESOURCE_PATH + "customTitle.pds");
+		Assert.assertTrue("The generated DocumentStructure does not match with the expected one"
+				+ debugDisplay("output/customTitle.pds"),
+				EcoreUtil.equals(expectedTextDocument, (EObject) commandResult.iterator().next()));
+
+		// Check generated image
+		assertTrue("The result should be a TextDocument", expectedTextDocument instanceof TextDocument);
+		checkGeneratedImages((TextDocument) commandResult.iterator().next(), "png");
+	}
+
+	/**
+	 * Test the default PapyrusGMFDiagramView with the kindId property set
+	 */
+	@Test
+	public void diagramKindIdPapyrusGMFDiagramViewMapperTest() {
+		TextDocumentTemplate textDocumentTemplate = getTextDocumentTemplate("diagramKindId");
+		Collection<?> commandResult = generateDocumentStructure(textDocumentTemplate);
+
+		// Test the generated file is the same as the expected one
+		EObject expectedTextDocument = loadExpectedDocumentStructureResource(EXPECTED_RESOURCE_PATH + "diagramKindId.pds");
+		Assert.assertTrue("The generated DocumentStructure does not match with the expected one"
+				+ debugDisplay("output/diagramKindId.pds"),
+				EcoreUtil.equals(expectedTextDocument, (EObject) commandResult.iterator().next()));
+
+		// Check generated image
+		assertTrue("The result should be a TextDocument", expectedTextDocument instanceof TextDocument);
+		checkGeneratedImages((TextDocument) commandResult.iterator().next(), "png");
+	}
+
+	/**
+	 * Test the default PapyrusGMFDiagramView with the type property set
+	 */
+	@Test
+	public void diagramTypePapyrusGMFDiagramViewMapperTest() {
+		TextDocumentTemplate textDocumentTemplate = getTextDocumentTemplate("diagramType");
+		Collection<?> commandResult = generateDocumentStructure(textDocumentTemplate);
+
+		// Test the generated file is the same as the expected one
+		EObject expectedTextDocument = loadExpectedDocumentStructureResource(EXPECTED_RESOURCE_PATH + "diagramType.pds");
+		Assert.assertTrue("The generated DocumentStructure does not match with the expected one"
+				+ debugDisplay("output/diagramType.pds"),
+				EcoreUtil.equals(expectedTextDocument, (EObject) commandResult.iterator().next()));
+
+		// Check generated image
+		assertTrue("The result should be a TextDocument", expectedTextDocument instanceof TextDocument);
+		checkGeneratedImages((TextDocument) commandResult.iterator().next(), "png");
+	}
+
+	/**
+	 * Test the default PapyrusGMFDiagramView with the generate property set to false
+	 */
+	@Test
+	public void doNotGeneratePapyrusGMFDiagramViewMapperTest() {
+		TextDocumentTemplate textDocumentTemplate = getTextDocumentTemplate("doNotGenerate");
+		Collection<?> commandResult = generateDocumentStructure(textDocumentTemplate);
+
+		// Test the generated file is the same as the expected one
+		EObject expectedTextDocument = loadExpectedDocumentStructureResource(EXPECTED_RESOURCE_PATH + "doNotGenerate.pds");
+		Assert.assertTrue("The generated DocumentStructure does not match with the expected one"
+				+ debugDisplay("output/doNotGenerate.pds"),
+				EcoreUtil.equals(expectedTextDocument, (EObject) commandResult.iterator().next()));
+
+		// Check generated image
+		assertTrue("The result should be a TextDocument", expectedTextDocument instanceof TextDocument);
+		checkGeneratedImages((TextDocument) commandResult.iterator().next(), "png");
+	}
+
+	/**
+	 * Test the default PapyrusGMFDiagramView with the generateTitle property set to false
+	 */
+	@Test
+	public void doNotGenerateTitlePapyrusGMFDiagramViewMapperTest() {
+		TextDocumentTemplate textDocumentTemplate = getTextDocumentTemplate("doNotGenerateTitle");
+		Collection<?> commandResult = generateDocumentStructure(textDocumentTemplate);
+
+		// Test the generated file is the same as the expected one
+		EObject expectedTextDocument = loadExpectedDocumentStructureResource(EXPECTED_RESOURCE_PATH + "doNotGenerateTitle.pds");
+		Assert.assertTrue("The generated DocumentStructure does not match with the expected one"
+				+ debugDisplay("output/doNotGenerateTitle.pds"),
+				EcoreUtil.equals(expectedTextDocument, (EObject) commandResult.iterator().next()));
+
+		// Check generated image
+		assertTrue("The result should be a TextDocument", expectedTextDocument instanceof TextDocument);
+		checkGeneratedImages((TextDocument) commandResult.iterator().next(), "png");
+	}
+
+	/**
+	 * Test the default PapyrusGMFDiagramView with an empty result
+	 */
+	@Test
+	public void emptyPapyrusGMFDiagramViewMapperTest() {
+		TextDocumentTemplate textDocumentTemplate = getTextDocumentTemplate("empty");
+		Collection<?> commandResult = generateDocumentStructure(textDocumentTemplate);
+
+		// Test the generated file is the same as the expected one
+		EObject expectedTextDocument = loadExpectedDocumentStructureResource(EXPECTED_RESOURCE_PATH + "empty.pds");
+		Assert.assertTrue("The generated DocumentStructure does not match with the expected one"
+				+ debugDisplay("output/empty.pds"),
+				EcoreUtil.equals(expectedTextDocument, (EObject) commandResult.iterator().next()));
+
+		// Check generated image
+		assertTrue("The result should be a TextDocument", expectedTextDocument instanceof TextDocument);
+		checkGeneratedImages((TextDocument) commandResult.iterator().next(), "png");
+	}
+
+	/**
+	 * Test the default PapyrusGMFDiagramView with an empty result and the property generateIfEmpty set to true
+	 */
+	@Test
+	public void generateIfEmptyPapyrusGMFDiagramViewMapperTest() {
+		TextDocumentTemplate textDocumentTemplate = getTextDocumentTemplate("generateIfEmpty");
+		Collection<?> commandResult = generateDocumentStructure(textDocumentTemplate);
+
+		// Test the generated file is the same as the expected one
+		EObject expectedTextDocument = loadExpectedDocumentStructureResource(EXPECTED_RESOURCE_PATH + "generateIfEmpty.pds");
+		Assert.assertTrue("The generated DocumentStructure does not match with the expected one"
+				+ debugDisplay("output/generateIfEmpty.pds"),
+				EcoreUtil.equals(expectedTextDocument, (EObject) commandResult.iterator().next()));
+
+		// Check generated image
+		assertTrue("The result should be a TextDocument", expectedTextDocument instanceof TextDocument);
+		checkGeneratedImages((TextDocument) commandResult.iterator().next(), "png");
+	}
+
+	/**
+	 * Test the default PapyrusGMFDiagramView with ContextFilterRule set to GRAPHICAL_CONTEXT
+	 */
+	@Test
+	public void graphicalContextAllDiagramsPapyrusGMFDiagramViewMapperTest() {
+		TextDocumentTemplate textDocumentTemplate = getTextDocumentTemplate("graphicalContextAllDiagrams");
+		Collection<?> commandResult = generateDocumentStructure(textDocumentTemplate);
+
+		// Test the generated file is the same as the expected one
+		EObject expectedTextDocument = loadExpectedDocumentStructureResource(EXPECTED_RESOURCE_PATH + "graphicalContextAllDiagrams.pds");
+		Assert.assertTrue("The generated DocumentStructure does not match with the expected one"
+				+ debugDisplay("output/graphicalContextAllDiagrams.pds"),
+				EcoreUtil.equals(expectedTextDocument, (EObject) commandResult.iterator().next()));
+
+		// Check generated image
+		assertTrue("The result should be a TextDocument", expectedTextDocument instanceof TextDocument);
+		checkGeneratedImages((TextDocument) commandResult.iterator().next(), "png");
+	}
+
+	/**
+	 * Test the default PapyrusGMFDiagramView with ContextFilterRule set to GRAPHICAL_CONTEXT
+	 */
+	@Test
+	public void bothDiagramContextPapyrusGMFDiagramViewMapperTest() {
+		TextDocumentTemplate textDocumentTemplate = getTextDocumentTemplate("bothDiagramContext");
+		Collection<?> commandResult = generateDocumentStructure(textDocumentTemplate);
+
+		// Test the generated file is the same as the expected one
+		EObject expectedTextDocument = loadExpectedDocumentStructureResource(EXPECTED_RESOURCE_PATH + "bothDiagramContext.pds");
+		Assert.assertTrue("The generated DocumentStructure does not match with the expected one"
+				+ debugDisplay("output/bothDiagramContext.pds"),
+				EcoreUtil.equals(expectedTextDocument, (EObject) commandResult.iterator().next()));
+
+		// Check generated image
+		assertTrue("The result should be a TextDocument", expectedTextDocument instanceof TextDocument);
+		checkGeneratedImages((TextDocument) commandResult.iterator().next(), "png");
+	}
+
+	/**
+	 * Test the default PapyrusGMFDiagramView with the imageFormat set to SVG
+	 */
+	@Test
+	public void imageFormatPapyrusGMFDiagramViewMapperTest() {
+		TextDocumentTemplate textDocumentTemplate = getTextDocumentTemplate("imageFormat");
+		Collection<?> commandResult = generateDocumentStructure(textDocumentTemplate);
+
+		// Test the generated file is the same as the expected one
+		EObject expectedTextDocument = loadExpectedDocumentStructureResource(EXPECTED_RESOURCE_PATH + "imageFormat.pds");
+		Assert.assertTrue("The generated DocumentStructure does not match with the expected one"
+				+ debugDisplay("output/imageFormat.pds"),
+				EcoreUtil.equals(expectedTextDocument, (EObject) commandResult.iterator().next()));
+
+		// Check generated image
+		assertTrue("The result should be a TextDocument", expectedTextDocument instanceof TextDocument);
+		checkGeneratedImages((TextDocument) commandResult.iterator().next(), "svg");
+
+		// FIXME should test the mime type
+	}
+
+	/**
+	 * Test the default PapyrusGMFDiagramView with output folder path with space and accent
+	 */
+	@Test
+	public void withSpacesInPathPapyrusGMFDiagramViewMapperTest() {
+		TextDocumentTemplate textDocumentTemplate = getTextDocumentTemplate("withSpacesInPath");
+		Collection<?> commandResult = generateDocumentStructure(textDocumentTemplate);
+
+		// Test the generated file is the same as the expected one
+		EObject expectedTextDocument = loadExpectedDocumentStructureResource(EXPECTED_RESOURCE_PATH + "withSpacesInPath.pds");
+		Assert.assertTrue("The generated DocumentStructure does not match with the expected one"
+				+ debugDisplay("output/withSpacesInPath.pds"),
+				EcoreUtil.equals(expectedTextDocument, (EObject) commandResult.iterator().next()));
+
+		// Check generated image
+		assertTrue("The result should be a TextDocument", expectedTextDocument instanceof TextDocument);
+		checkGeneratedImages((TextDocument) commandResult.iterator().next(), "png");
+	}
+}
diff --git a/tests/integration/pom.xml b/tests/integration/pom.xml
index 35b75b3..006c7b2 100755
--- a/tests/integration/pom.xml
+++ b/tests/integration/pom.xml
@@ -19,5 +19,6 @@
 
 	<modules>
 		<module>org.eclipse.papyrus.model2doc.integration.uml.architecture.tests</module>
+		<module>org.eclipse.papyrus.model2doc.integration.gmf.template2structure.tests</module>
 	</modules>
 </project>
diff --git a/tests/uml/org.eclipse.papyrus.model2doc.uml.template2structure.tests/.project b/tests/uml/org.eclipse.papyrus.model2doc.uml.template2structure.tests/.project
new file mode 100644
index 0000000..414571b
--- /dev/null
+++ b/tests/uml/org.eclipse.papyrus.model2doc.uml.template2structure.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.papyrus.model2doc.uml.template2structure.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>