diff options
| author | atischenko | 2015-09-14 22:46:28 +0000 |
|---|---|---|
| committer | Gerrit Code Review @ Eclipse.org | 2015-09-18 08:51:55 +0000 |
| commit | 97fc57c4467177a83f1ad907079e88b43ec5b54a (patch) | |
| tree | 8ab5c4df5fdc2f1018034b1d6ed9f2afde4c1948 | |
| parent | 2809ab62079f89faa8024f269543a038448754f5 (diff) | |
| download | org.eclipse.papyrus-97fc57c4467177a83f1ad907079e88b43ec5b54a.tar.gz org.eclipse.papyrus-97fc57c4467177a83f1ad907079e88b43ec5b54a.tar.xz org.eclipse.papyrus-97fc57c4467177a83f1ad907079e88b43ec5b54a.zip | |
Bug 473803 - Papyrus 1.1.0 fails to exports diagrams as image (Eclipse
Mars)
Change-Id: I62350e9709b6a2491ba8be0377963a48c7895464
Signed-off-by: atischenko <tischenko@montages.com>
| -rw-r--r-- | plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/actions/ExportAllDiagramsAction.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/actions/ExportAllDiagramsAction.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/actions/ExportAllDiagramsAction.java index 0fa2f6712a8..35268885c47 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/actions/ExportAllDiagramsAction.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export/src/org/eclipse/papyrus/infra/gmfdiag/export/actions/ExportAllDiagramsAction.java @@ -106,8 +106,14 @@ public class ExportAllDiagramsAction extends AbstractHandler { URI uriFile = null; if (file != null) { IContainer parentResource = file.getParent(); - parentResource = ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(parentResource.getLocation()); - uriFile = URI.createPlatformResourceURI(parentResource.getLocation().toString(), true); + IContainer containerForParentLocation = ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(parentResource.getLocation()); + if (containerForParentLocation != null) { + parentResource = containerForParentLocation; + uriFile = URI.createPlatformResourceURI(parentResource.getLocation().toString(), true); + } else { + //linked resource + uriFile = URI.createPlatformResourceURI(parentResource.getFullPath().toString(), true); + } } |
