|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!
|Re: Export diagram as image on Save action [message #1385080 is a reply to message #1384986]
||Wed, 04 June 2014 08:55
| Pierre-Charles David
Registered: July 2009
Le 03/06/2014 15:28, Mate Attila a écrit :|
> 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
We used to have a "Developer" section in the documentation (before the
product was open sourced as Sirius), but it was inconsistent and
sometimes completely obsolete. We did not have enough time to rewrite it
for Sirius 1.0, so it has been removed to avoid confusion.
We certainly want to have such a documentation in the future. Feel free
to comment on https://bugs.eclipse.org/bugs/show_bug.cgi?id=426583 to
tell us what kind of information you expect in priority for such a
document (for us who have been working on Sirius for years, it is not
always obvious what a newcomer needs).
Powered by FUDForum
. Page generated in 0.02712 seconds