Export diagram without workspace [message #1753667] |
Wed, 08 February 2017 11:19  |
Eclipse User |
|
|
|
Hi,
I'm currently trying to export my diagram as SVG without workspace (running on a server).
First of all, is it possible ? If so, how to create a Sirius Session in order to use an ExportAction for example ?
Thanks in advance !
Cheers,
Bastien.
|
|
|
|
|
|
Re: Export diagram without workspace [message #1790814 is a reply to message #1753667] |
Mon, 18 June 2018 08:49  |
Eclipse User |
|
|
|
Hi Maxime,
I try to export diagram from java application with Marianna.
When I use the following code :
org.eclipse.sirius.business.api.session.SessionManager.INSTANCE.openSession(airdURI, new NullProgressMonitor(), SiriusEditPlugin.getPlugin().getUiCallback());
The application returns the following exception : "Workspace is closed ".
When I want to create a Session with the following code :
Session session = SessionFactory.INSTANCE.createSession(airdURI, new NullProgressMonitor());
session.open(new NullProgressMonitor());
The application returns the following exception :
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.eclipse.sirius.business.internal.session.SessionFactoryImpl.loadSessionModelResource(SessionFactoryImpl.java:116)
at org.eclipse.sirius.business.internal.session.SessionFactoryImpl.createSession(SessionFactoryImpl.java:102)
at thales.thav.dsi.em.factory.gen.irsGenedocGeneration.IrsGenedocGenerate.<init>(IrsGenedocGenerate.java:115)
at thales.thav.dsi.em.factory.gen.irsGenedocGeneration.IrsGenedocGenerate.main(IrsGenedocGenerate.java:184)
Caused by: java.lang.NullPointerException
at org.eclipse.core.internal.runtime.ResourceTranslator.hasRuntime21(ResourceTranslator.java:92)
at org.eclipse.core.internal.runtime.ResourceTranslator.getResourceBundle(ResourceTranslator.java:66)
at org.eclipse.core.internal.runtime.ResourceTranslator.getResourceBundle(ResourceTranslator.java:62)
at org.eclipse.core.internal.runtime.InternalPlatform.getResourceBundle(InternalPlatform.java:487)
at org.eclipse.core.runtime.Platform.getResourceBundle(Platform.java:999)
at org.eclipse.emf.common.EMFPlugin$InternalHelper.getString(EMFPlugin.java:391)
at org.eclipse.emf.common.EMFPlugin$EclipsePlugin.getString(EMFPlugin.java:304)
at org.eclipse.emf.common.util.DelegatingResourceLocator.getString(DelegatingResourceLocator.java:380)
at org.eclipse.emf.common.util.DelegatingResourceLocator.getString(DelegatingResourceLocator.java:359)
at org.eclipse.sirius.ext.base.I18N.initialize(I18N.java:91)
at org.eclipse.sirius.ext.base.I18N.load(I18N.java:78)
at org.eclipse.sirius.ext.base.I18N.initializeMessages(I18N.java:64)
at org.eclipse.sirius.viewpoint.Messages.<clinit>(Messages.java:25)
... 4 more
How can I export diagram from a java application by using Sirius API ?
|
|
|
Powered by
FUDForum. Page generated in 0.05731 seconds