Problems when generating images from Papyrus diagrams [message #1729922] |
Wed, 20 April 2016 09:34  |
Eclipse User |
|
|
|
Hi All,
I am working on a gendoc template for msoffice document generation from UML Papyrus diagrams.
I have used this code:
[if (indP1.getPapyrusDiagrams()->size()>0)]<drop/>
[for (diag : Diagram | indP1.getPapyrusDiagrams())]<drop/>
<image object='[diag.getDiagram()/]' maxW='true' keepH='false'><drop/>
</image><drop/>
Figure 1 [clean(diag.name)/]
[/for]<drop/>
[/if]<drop/>
Gendoc generates the frame for the image and the legend of the image, but the frame is empty, i.e. the diagram image is not generated, only the name of the diagram is generated. Attached a screen shot of the generated document.
Any idea?
Thanks
Saadia
Attachment: Capture.JPG
(Size: 37.83KB, Downloaded 464 times)
|
|
|
|
|
Re: Problems when generating images from Papyrus diagrams [message #1730214 is a reply to message #1730048] |
Fri, 22 April 2016 11:49   |
Eclipse User |
|
|
|
Hi Triastan,
To launch the gendoc wizard with my template, I am contributing to this extension point:
<extension
point="org.eclipse.gendoc.wizard.runner">
<GendocElement
Instance="com.cea.papyrus.gendoc.custom.template.RequirementsGendoc2Runner">
</GendocElement>
</extension>
When launching gendoc from papyrus model explorer, the wizard says That the template has to be in MS office 2010 version.
The default gendoc wizard does not display this message.
Is it possible that I am contributing to the wrong extension point?
Thanks
Saadia
|
|
|
|
|
Re: Problems when generating images from Papyrus diagrams [message #1730219 is a reply to message #1730216] |
Fri, 22 April 2016 12:07   |
Eclipse User |
|
|
|
And when installing my template through an update site, then trying to generate documentation for the same model that I tested when I was in eclipse runtime, I have this error:
Image with id '[diag.getDiagram()/]' cannot be found. TIP: Check script used inside the attribute 'object' of <image> tags. Brackets may be missing.
org.eclipse.gendoc.services.exception.AdditionalResourceException: Image with id '[diag.getDiagram()/]' cannot be found.
at org.eclipse.gendoc.services.docx.DOCXAdditionalResourceService.addRunnableResourceToDocument(DOCXAdditionalResourceService.java:242)
at org.eclipse.gendoc.documents.AbstractImageService.getFilePath(AbstractImageService.java:36)
at org.eclipse.gendoc.tags.handlers.impl.scripts.ImageTagHandler.doRun(ImageTagHandler.java:62)
at org.eclipse.gendoc.tags.handlers.AbstractPrePostTagHandler.run(AbstractPrePostTagHandler.java:55)
at org.eclipse.gendoc.tags.handlers.AbstractTagHandler.runChildren(AbstractTagHandler.java:225)
at org.eclipse.gendoc.tags.handlers.AbstractTagHandler.run(AbstractTagHandler.java:130)
at org.eclipse.gendoc.tags.handlers.AbstractPrePostTagHandler.doRun(AbstractPrePostTagHandler.java:114)
at org.eclipse.gendoc.tags.handlers.AbstractPrePostTagHandler.run(AbstractPrePostTagHandler.java:55)
at org.eclipse.gendoc.tags.handlers.process.TagAnalyserProcess.executeOneTag(TagAnalyserProcess.java:226)
at org.eclipse.gendoc.tags.handlers.process.TagAnalyserProcess.executeTags(TagAnalyserProcess.java:204)
at org.eclipse.gendoc.tags.handlers.process.TagAnalyserProcess.executeAndInjectTags(TagAnalyserProcess.java:147)
at org.eclipse.gendoc.tags.handlers.process.TagAnalyserProcess.step(TagAnalyserProcess.java:138)
at org.eclipse.gendoc.process.AbstractStepProcess.doRun(AbstractStepProcess.java:51)
at org.eclipse.gendoc.process.AbstractProcess.run(AbstractProcess.java:72)
at org.eclipse.gendoc.GendocProcess.runProcess(GendocProcess.java:81)
at org.eclipse.gendoc.GendocProcess.runProcess(GendocProcess.java:152)
at org.eclipse.gendoc.wizard.GendocWizard$2.run(GendocWizard.java:136)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:463)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:371)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1002)
at org.eclipse.gendoc.wizard.GendocWizard.performFinish(GendocWizard.java:118)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:799)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:429)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
at org.eclipse.jface.window.Window.open(Window.java:803)
at org.eclipse.gendoc.wizard.papyrus.popup.actions.GenerateDocumentationModelExplorerHandler.execute(GenerateDocumentationModelExplorerHandler.java:59)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:252)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:234)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:493)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:486)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:799)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:675)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:659)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:592)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:694)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04557 seconds