[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

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