diff --git a/plugins/contracts/org.polarsys.chess.contracts.verificationService/plugin.xml b/plugins/contracts/org.polarsys.chess.contracts.verificationService/plugin.xml
index 20a014c01d61c615f0049de1ed2698f7640a279e..dd1f4a4e43c80c4bb3b1bc76a2a4a8912c0878b1 100644
--- a/plugins/contracts/org.polarsys.chess.contracts.verificationService/plugin.xml
+++ b/plugins/contracts/org.polarsys.chess.contracts.verificationService/plugin.xml
@@ -196,7 +196,7 @@
        <command
             defaultHandler="org.polarsys.chess.verificationService.commands.debug.ContractImplementationOnFileCommand"
             			id="org.polarsys.chess.verificationService.commands.debug.ContractImplementationOnFileCommand"
-            name="Check Contract Implementation on .oss and .fmv files">
+            name="Check Contract Implementation on .oss and .smv files">
       </command>
       <command
             defaultHandler="org.polarsys.chess.verificationService.commands.ExportModelToFileCommand"
diff --git a/plugins/contracts/org.polarsys.chess.contracts.verificationService/src/org/polarsys/chess/verificationService/commands/CheckValidationPropertyCommand.java b/plugins/contracts/org.polarsys.chess.contracts.verificationService/src/org/polarsys/chess/verificationService/commands/CheckValidationPropertyCommand.java
index bc6565d5e9dd312ba638d8fb77400ee6dc39b0fd..b78224117e293a8a4bb706e8ddd1860b5902fb66 100644
--- a/plugins/contracts/org.polarsys.chess.contracts.verificationService/src/org/polarsys/chess/verificationService/commands/CheckValidationPropertyCommand.java
+++ b/plugins/contracts/org.polarsys.chess.contracts.verificationService/src/org/polarsys/chess/verificationService/commands/CheckValidationPropertyCommand.java
@@ -57,6 +57,7 @@ public class CheckValidationPropertyCommand extends AbstractJobCommand {
 		 showPopups = false;
 		 ossFilepath = ocraDirectoryUtil.getOSSFilePath();
 		  resultFilePath = ocraDirectoryUtil.getCommandCheckPropertyResultPath(umlSelectedComponent.getName());
+		  
 	}
 
 
diff --git a/plugins/contracts/org.polarsys.chess.contracts.verificationService/src/org/polarsys/chess/verificationService/commands/ExportModelToFileCommand.java b/plugins/contracts/org.polarsys.chess.contracts.verificationService/src/org/polarsys/chess/verificationService/commands/ExportModelToFileCommand.java
index d619dabd70e5907e0252a25927351dc1265493fc..60e2cdd2637335658c0c747043c5687611010f1c 100644
--- a/plugins/contracts/org.polarsys.chess.contracts.verificationService/src/org/polarsys/chess/verificationService/commands/ExportModelToFileCommand.java
+++ b/plugins/contracts/org.polarsys.chess.contracts.verificationService/src/org/polarsys/chess/verificationService/commands/ExportModelToFileCommand.java
@@ -53,7 +53,7 @@ public class ExportModelToFileCommand extends AbstractJobCommand {
 		 umlSelectedComponent = selectionUtil.getUmlComponentFromSelectedObject(event);
 		 umlSelectedResource = umlSelectedComponent.eResource();
 		 isDiscreteTime = MessageTimeModelDialog.openQuestion();
-		  ossFilepath = ocraDirectoryUtil.getOSSFilePath();				
+		 ossFilepath = ocraDirectoryUtil.getOSSFilePath();				
 		 showPopups = true;
 	}
 
diff --git a/plugins/contracts/org.polarsys.chess.contracts.verificationService/src/org/polarsys/chess/verificationService/model/ChessSystemModel.java b/plugins/contracts/org.polarsys.chess.contracts.verificationService/src/org/polarsys/chess/verificationService/model/ChessSystemModel.java
index 9265eef0a451a39841ac513f8455508a9ba3df66..d6d234130ca5530420b79ed495c71c69e797942a 100644
--- a/plugins/contracts/org.polarsys.chess.contracts.verificationService/src/org/polarsys/chess/verificationService/model/ChessSystemModel.java
+++ b/plugins/contracts/org.polarsys.chess.contracts.verificationService/src/org/polarsys/chess/verificationService/model/ChessSystemModel.java
@@ -64,6 +64,7 @@ public class ChessSystemModel implements AbstractSystemModel {
 
 	@Override
 	public String getComponentTypeName(Object component) {
+
 		if(entityUtil.isBlock((Element) component)) {
 			return entityUtil.getComponentName(component);
 		}
diff --git a/plugins/org.polarsys.chess.diagram.ui/src/org/polarsys/chess/diagram/ui/commands/GenerateDocumentCommand.java b/plugins/org.polarsys.chess.diagram.ui/src/org/polarsys/chess/diagram/ui/commands/GenerateDocumentCommand.java
index 0bde90e8f7759f01871b28b4c22c6c789d0a0f43..4a9cb36f36bbbd530f78c05a53b9597a0cf404b3 100644
--- a/plugins/org.polarsys.chess.diagram.ui/src/org/polarsys/chess/diagram/ui/commands/GenerateDocumentCommand.java
+++ b/plugins/org.polarsys.chess.diagram.ui/src/org/polarsys/chess/diagram/ui/commands/GenerateDocumentCommand.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (C) 2017 Fondazione Bruno Kessler.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Alberto Debiasi - initial API and implementation
+ ******************************************************************************/
 package org.polarsys.chess.diagram.ui.commands;
 
 import java.util.Collection;
@@ -54,7 +64,10 @@ public class GenerateDocumentCommand extends AbstractJobCommand {
 	private String outputDirectoryName;
 	private String currentProjectName;
 	private Collection<Diagram> chessDiagrams;
-
+	private String imageExtension;
+	private String docFormat;
+	
+	
 	@Override
 	public void execGUIOperations(ExecutionEvent event,IProgressMonitor monitor) throws Exception {
 		umlSelectedComponent = selectionUtil.getUmlComponentFromSelectedObject(event);
@@ -63,6 +76,30 @@ public class GenerateDocumentCommand extends AbstractJobCommand {
 		currentProjectName = directoryUtils.getCurrentProjectName();
 		chessDiagrams = chessDiagramsGeneratorService.getDiagrams();
 
+		//Display defaultDisplay = Display.getDefault();
+		//defaultDisplay.syncExec(new Runnable() {
+		//	@Override
+		//	public void run() {
+				parameterDialog = exportDialogUtils.getCompiledModelToDocumentDialog();
+				parameterDialog.open();
+		//	}
+		//});
+
+		if (!parameterDialog.goAhead()) {
+			return;
+		}
+
+		docFormat = parameterDialog.getDocumentFormat();
+		imageExtension = ".svg";
+		if (docFormat.equals("tex")) {
+			imageExtension = ".png";
+		}
+
+		if ((outputDirectoryName == null) || outputDirectoryName.isEmpty()) {
+			return;
+		}
+
+		
 	}
 
 	@Override
@@ -71,7 +108,7 @@ public class GenerateDocumentCommand extends AbstractJobCommand {
 		OSS ossModel = ocraTranslatorService.getOssModel(umlSelectedComponent, isDiscreteTime, monitor);
 
 		Display defaultDisplay = Display.getDefault();
-		defaultDisplay.syncExec(new Runnable() {
+		/*defaultDisplay.syncExec(new Runnable() {
 			@Override
 			public void run() {
 				parameterDialog = exportDialogUtils.getCompiledModelToDocumentDialog();
@@ -92,7 +129,7 @@ public class GenerateDocumentCommand extends AbstractJobCommand {
 		if ((outputDirectoryName == null) || outputDirectoryName.isEmpty()) {
 			return;
 		}
-
+*/
 		documentGeneratorService = new DocumentGeneratorServiceFromOssModel(ossModel);
 		documentGeneratorService.setParametersBeforeDocumentGeneration(outputDirectoryName, imageExtension,
 				parameterDialog.getShowLeafComponents());
diff --git a/plugins/org.polarsys.chess.diagram.ui/src/org/polarsys/chess/diagram/ui/docGenerators/CHESSBlockDefinitionDiagramModel.java b/plugins/org.polarsys.chess.diagram.ui/src/org/polarsys/chess/diagram/ui/docGenerators/CHESSBlockDefinitionDiagramModel.java
index 2a42ad8535d4dc2c27466093ffc8e8785bf62964..f4aeaaffc051e18d98b78e716286ec93d5b289b1 100644
--- a/plugins/org.polarsys.chess.diagram.ui/src/org/polarsys/chess/diagram/ui/docGenerators/CHESSBlockDefinitionDiagramModel.java
+++ b/plugins/org.polarsys.chess.diagram.ui/src/org/polarsys/chess/diagram/ui/docGenerators/CHESSBlockDefinitionDiagramModel.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (C) 2017 Fondazione Bruno Kessler.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Alberto Debiasi - initial API and implementation
+ ******************************************************************************/
 package org.polarsys.chess.diagram.ui.docGenerators;
 
 import java.awt.Dimension;
diff --git a/plugins/org.polarsys.chess.diagram.ui/src/org/polarsys/chess/diagram/ui/services/CHESSDiagramsGeneratorService.java b/plugins/org.polarsys.chess.diagram.ui/src/org/polarsys/chess/diagram/ui/services/CHESSDiagramsGeneratorService.java
index 4a427825cd8bf5ebbecb5d109826165d10383d76..c51cdbae95f422362321d5dfa3caef0f9639eb64 100644
--- a/plugins/org.polarsys.chess.diagram.ui/src/org/polarsys/chess/diagram/ui/services/CHESSDiagramsGeneratorService.java
+++ b/plugins/org.polarsys.chess.diagram.ui/src/org/polarsys/chess/diagram/ui/services/CHESSDiagramsGeneratorService.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (C) 2017 Fondazione Bruno Kessler.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Alberto Debiasi - initial API and implementation
+ ******************************************************************************/
 package org.polarsys.chess.diagram.ui.services;
 
 import java.io.File;
diff --git a/plugins/org.polarsys.chess.diagram.ui/src/org/polarsys/chess/diagram/ui/utils/ExportDialogUtils.java b/plugins/org.polarsys.chess.diagram.ui/src/org/polarsys/chess/diagram/ui/utils/ExportDialogUtils.java
index 0416b2ba9541a637d7ef37ff1c640d5b0d3650c6..90c4165264927bc893582c4f4a09807a51fc697e 100644
--- a/plugins/org.polarsys.chess.diagram.ui/src/org/polarsys/chess/diagram/ui/utils/ExportDialogUtils.java
+++ b/plugins/org.polarsys.chess.diagram.ui/src/org/polarsys/chess/diagram/ui/utils/ExportDialogUtils.java
@@ -1,6 +1,13 @@
-/**
+/*******************************************************************************
+ * Copyright (C) 2017 Fondazione Bruno Kessler.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
  * 
- */
+ * Contributors:
+ *     Alberto Debiasi - initial API and implementation
+ ******************************************************************************/
 package org.polarsys.chess.diagram.ui.utils;
 
 import org.eclipse.jface.dialogs.MessageDialog;