[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] Re: export ecore model to an image
|
- From: physicspatschi@xxxxxx (Sebastian )
- Date: Sat, 21 Feb 2009 19:21:51 +0000 (UTC)
- Newsgroups: eclipse.modeling.gmf
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
To get to Diagram object I tried to use the EcoreTools Plugin.
Resource resource =
EcoreDiagramEditorUtil.createDiagram(diagramURI,
modelURI, new SilentProgressMonitor());
Diagram diagram = (Diagram) resource.getContents().get(0);
With this I get a Diagram, but the export to an SVG-Imgae results only in
a SVG-Document with no graphical elements in it.
DiagramEditPart diagramEditPart = OffscreenEditPartFactory
.getInstance().createDiagramEditPart(diagram, new Shell());
CopyToImageUtil copyToImageUtil = new CopyToImageUtil();
copyToImageUtil.copyToImage(diagramEditPart, destination,
ImageFileFormat.SVG, new SilentProgressMonitor());
Where could be a mistake?
regards
Sebastian