|Re: Export diagram as image on Save action [message #1384805 is a reply to message #1384696]
||Mon, 02 June 2014 08:24
| Maxime Porhel
Registered: July 2009
Le 30/05/2014 19:54, Mate Attila a écrit :|
> I'd like to export diagrams as image when model is saved by user, and I
> need some help on how to do it. Should I use
> org.eclipse.sirius.sessionManagerListener extension and listen to
> specific notifications?
I think you could try to use a SessionManagerListener and react to
How can I export diagrams via API?
You could call:
session, filePath, exportFormat,progressMonitor);
or adapt the following snippet:
// Use the
use the figure validation infinite loop safe SiriusDiagramGraphicalViewer.
final CopyToImageUtil imageUtility = new DiagramEditPartService();
See also org.eclipse.sirius.ui.tools.api.actions.export.ExportAction
> Thanks in advance!
|Re: Export diagram as image on Save action [message #1384986 is a reply to message #1384805]
||Tue, 03 June 2014 13:28
| Mate Attila
Registered: May 2014
Thanks, I've managed to get it working. Is it possible to customize image quality? I mean exported image is less 'fancy' then it is in Sirius editor (no color gradients, etc.). It's also the case when I export diagrams manually, but I'm wondering if it's possible to change export image quality in code.
Another question about API: is there any documentation about Sirius API? I found diagram editors documentation, but is there a documentation where for example I can read about Sirus Session management, how to create diagrams from code, how to extend/contribute to Sirius Model Explorer?
Btw Sirius is a really great product, thanks for contributing it!
Powered by FUDForum
. Page generated in 0.02370 seconds