Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gendoc » Problems when generating images from Papyrus diagrams
Problems when generating images from Papyrus diagrams [message #1729922] Wed, 20 April 2016 09:34 Go to next message
saadia dhouib is currently offline saadia dhouibFriend
Messages: 11
Registered: April 2016
Junior Member
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 258 times)
Re: Problems when generating images from Papyrus diagrams [message #1729989 is a reply to message #1729922] Wed, 20 April 2016 16:52 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 425
Registered: July 2009
Senior Member
Hello
it looks like you use a recent version of Word. What is the version you are using ? The problem is maybe that.

Can you attach the docx template (or a non confidential and non working one) ?




Re: Problems when generating images from Papyrus diagrams [message #1730048 is a reply to message #1729989] Thu, 21 April 2016 07:37 Go to previous messageGo to next message
saadia dhouib is currently offline saadia dhouibFriend
Messages: 11
Registered: April 2016
Junior Member
Hi,
I am using Office 2013. The template is attached.

Best,
saadia
  • Attachment: template.docx
    (Size: 20.80KB, Downloaded 127 times)
Re: Problems when generating images from Papyrus diagrams [message #1730214 is a reply to message #1730048] Fri, 22 April 2016 11:49 Go to previous messageGo to next message
saadia dhouib is currently offline saadia dhouibFriend
Messages: 11
Registered: April 2016
Junior Member
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 #1730215 is a reply to message #1730214] Fri, 22 April 2016 11:53 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 425
Registered: July 2009
Senior Member
Hello
can you give us the code of RequirementsGendoc2Runner ?

Normally you are connected to the right extension point




Re: Problems when generating images from Papyrus diagrams [message #1730216 is a reply to message #1730215] Fri, 22 April 2016 11:57 Go to previous messageGo to next message
saadia dhouib is currently offline saadia dhouibFriend
Messages: 11
Registered: April 2016
Junior Member
Attached the code.
Re: Problems when generating images from Papyrus diagrams [message #1730219 is a reply to message #1730216] Fri, 22 April 2016 12:07 Go to previous messageGo to next message
saadia dhouib is currently offline saadia dhouibFriend
Messages: 11
Registered: April 2016
Junior Member
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)
Re: Problems when generating images from Papyrus diagrams [message #1730253 is a reply to message #1730215] Fri, 22 April 2016 16:20 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 425
Registered: July 2009
Senior Member
Concerning the empty frames I have opened a bug and submit a fix
https://bugs.eclipse.org/bugs/show_bug.cgi?id=492264

Can you try to download the nightly build of gendoc and see if it works for you ? (maybe you should uninstall gendoc first or restart from a fresh papyrus) :
https://hudson.eclipse.org/gendoc/job/Gendoc/ws/releng/org.eclipse.gendoc.update-site/target/repository/




Re: Problems when generating images from Papyrus diagrams [message #1730344 is a reply to message #1730253] Mon, 25 April 2016 08:27 Go to previous messageGo to next message
saadia dhouib is currently offline saadia dhouibFriend
Messages: 11
Registered: April 2016
Junior Member
Hi Tristan,
I have juste tested after uptading gendoc from the nightly build.
The diagrams generation works with my template. Thanks for your help !

[Updated on: Mon, 25 April 2016 08:27]

Report message to a moderator

Re: Problems when generating images from Papyrus diagrams [message #1730346 is a reply to message #1730344] Mon, 25 April 2016 08:34 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 425
Registered: July 2009
Senior Member
Very Nice !

Thank you very much for your feedback !




Re: Problems when generating images from Papyrus diagrams [message #1730349 is a reply to message #1730346] Mon, 25 April 2016 08:47 Go to previous messageGo to next message
saadia dhouib is currently offline saadia dhouibFriend
Messages: 11
Registered: April 2016
Junior Member
I still have a problem when generating a document from a template installed through an update site. I will send you the update site by mail.
Re: Problems when generating images from Papyrus diagrams [message #1730386 is a reply to message #1730349] Mon, 25 April 2016 11:32 Go to previous message
saadia dhouib is currently offline saadia dhouibFriend
Messages: 11
Registered: April 2016
Junior Member
I finally resolved the problem by including the .emtl files to the update site build.
Previous Topic:Retrieving Stereotype Information
Next Topic:Dynamic context setting?
Goto Forum:
  


Current Time: Thu Sep 20 00:12:33 GMT 2018

Powered by FUDForum. Page generated in 0.02711 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top