Merge "Bug 526483: Diagrams doesn't show in the generate document if the papyrus model file with blanks in the URI."
diff --git a/plugins/org.eclipse.gendoc.bundle.acceleo.papyrus/src/org/eclipse/gendoc/bundle/acceleo/papyrus/service/PapyrusContextService.java b/plugins/org.eclipse.gendoc.bundle.acceleo.papyrus/src/org/eclipse/gendoc/bundle/acceleo/papyrus/service/PapyrusContextService.java
index a0ff20b..3d63be3 100644
--- a/plugins/org.eclipse.gendoc.bundle.acceleo.papyrus/src/org/eclipse/gendoc/bundle/acceleo/papyrus/service/PapyrusContextService.java
+++ b/plugins/org.eclipse.gendoc.bundle.acceleo.papyrus/src/org/eclipse/gendoc/bundle/acceleo/papyrus/service/PapyrusContextService.java
@@ -9,6 +9,8 @@
*
* Contributors:
* Vincent Hemery (Atos Origin) - Initial API and implementation
+ * Antonio Campesino (Ericsson) - Bug 526483: Diagrams doesn't show in the
+ * generate document if the papyrus model file with blanks in the URI.
*
*****************************************************************************/
package org.eclipse.gendoc.bundle.acceleo.papyrus.service;
@@ -40,6 +42,7 @@
@Override
public void setModel(String modelPath) throws ModelNotFoundException
{
+
if (isPapyrusModel(modelPath))
{
EMFModelLoaderService loader = GendocServices.getDefault().getService(IEMFModelLoaderService.class);
@@ -50,6 +53,7 @@
GendocServices.getDefault().setService(IEMFModelLoaderService.class, emfService);
}
}
+ modelPath = URI.createURI(modelPath, true).toString();
super.setModel(modelPath);
}