Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gendoc » Accessing images
icon5.gif  Accessing images [message #1728897] Fri, 08 April 2016 10:45 Go to next message
Benajmin Schoenholzer is currently offline Benajmin SchoenholzerFriend
Messages: 33
Registered: March 2016
Member
I try to generate a documenation with gendoc. If i use the default generator over the wizard i have diagrams in the document (docx). If i create a own template i can not put diagrams in the document. I have the impression, that the link to the notation file is missing. I also tried to load the notation. If i run the following file i should get a list of all diagram names. But this section is empty (also the 1 is missing Smile). Does somebody have some ideas what i can do?

Quote:

<config>
<output path='C:\Users\Benny\PapyrusWorkspace\DevelopmentEnvironment\doc\document.docx'/>
</config>
<context model='C:\Users\Benny\PapyrusWorkspace\DevelopmentEnvironment\DevelopmentEnvironment.uml' element='{0}' importedBudles='gmf;papyrus;commons' searchMetamodels='true'/>

<gendoc>
Diagrams:
p.load('notation')
[for (d : notation::Diagram |notation::Diagram.allInstances()->sortedBy(name))]<drop/>
[d.name/]1
[/for]
[for(p1:Package |self.ownedElement->filter(Package))]
[p1.name/]
[for(c:Class |p1.ownedElement->filter(Class))]
[c.name/]
[/for]
[for(p2:Package |p1.ownedElement->filter(Package))]
[p2.name/]
[for(p3:Package |p2.ownedElement->filter(Package))]
[p3.name/]
[for(p4:Package |p3.ownedElement->filter(Package))]
[p4.name/]
[/for]
[/for]
[/for]
[/for]
</gendoc>

Re: Accessing images [message #1728901 is a reply to message #1728897] Fri, 08 April 2016 12:06 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
Hello
do you have some errors ?
I suggest you to :

1. remove p.load('notation')
2. replace [for (d : notation::Diagram |notation::Diagram.allInstances()->sortedBy(name))]<drop/>
by :
[for (d : notation::Diagram | uml::Element.allInstances().getPapyrusDiagrams()->sortedBy(name))]


it is not the optimal way to get the diagrams but it should detect if there are some errors




Re: Accessing images [message #1728910 is a reply to message #1728901] Fri, 08 April 2016 12:39 Go to previous messageGo to next message
Benajmin Schoenholzer is currently offline Benajmin SchoenholzerFriend
Messages: 33
Registered: March 2016
Member
Hi Tristan

Thank you for the quick answer. Now i received a error:
Quote:
See details.
The execution of a script failed: Error during generation of Gendoc script :Cannot find operation (getPapyrusDiagrams()) for the type (Element)


I think you should know, that i am working with sysml diagrams.

Best regards
Re: Accessing images [message #1728913 is a reply to message #1728910] Fri, 08 April 2016 12:45 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
strange do you have still importedBudles='gmf;papyrus;commons' ?



Re: Accessing images [message #1728916 is a reply to message #1728913] Fri, 08 April 2016 12:49 Go to previous messageGo to next message
Benajmin Schoenholzer is currently offline Benajmin SchoenholzerFriend
Messages: 33
Registered: March 2016
Member
Yes. I had this error before on every element. My first idea was to address the image over the package object.

Quote:

<config>
<output path='C:\Users\Benny\PapyrusWorkspace\DevelopmentEnvironment\doc\document.docx'/>
</config>
<context model='C:\Users\Benny\PapyrusWorkspace\DevelopmentEnvironment\DevelopmentEnvironment.uml' element='{0}' importedBudles='gmf;papyrus;commons' searchMetamodels='true'/>

<gendoc>
Diagrams:
[for (d : notation::Diagram |uml::Element.allInstances().getPapyrusDiagrams()->sortedBy(name))]
[d.name/]1
[/for]
[for(p1:Package |self.ownedElement->filter(Package))]
[p1.name/]
[for(c:Class |p1.ownedElement->filter(Class))]
[c.name/]
[/for]
[for(p2:Package |p1.ownedElement->filter(Package))]
[p2.name/]
[for(p3:Package |p2.ownedElement->filter(Package))]
[p3.name/]
[for(p4:Package |p3.ownedElement->filter(Package))]
[p4.name/]
[/for]
[/for]
[/for]
[/for]
</gendoc>











Re: Accessing images [message #1728918 is a reply to message #1728916] Fri, 08 April 2016 12:58 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
please fix the typo :
importedBundles='gmf;papyrus;commons'
instead of :
importedBudles='gmf;papyrus;commons'




Re: Accessing images [message #1728920 is a reply to message #1728918] Fri, 08 April 2016 13:07 Go to previous message
Benajmin Schoenholzer is currently offline Benajmin SchoenholzerFriend
Messages: 33
Registered: March 2016
Member
Thanks! It is a embarassing fault.....

Greetings
Previous Topic:package org.apache.commons.io 1.3.1
Next Topic:Retrieving Stereotype Information
Goto Forum:
  


Current Time: Fri Apr 19 09:04:23 GMT 2024

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

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

Back to the top