Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gendoc » Behavior diagrams missing in generated document
Behavior diagrams missing in generated document [message #1777890] Tue, 05 December 2017 16:09 Go to next message
Ursula Kirchgaessner is currently offline Ursula KirchgaessnerFriend
Messages: 18
Registered: July 2017
Junior Member
Hi,

I'm using the docx-template from the GenDocSampleProject
https://wiki.eclipse.org/Gendoc/samples/genericTemplate
to generate documents for my SysML models.

Document generation works fine, except that it does not include all diagrams present in the model: activity, sequence, and state machine diagrams are simply ignored.

I tried it on several models (all SysML) and also with the sample project. In the sample project, I added an activity diagram in one of the packages, and it does not appear in the generated document. I attached a zip-file with the extended sample project and the generated file.

I tried to find a solution using the Acceleo interpreter in Papyrus, but some commands such as "getPapyrusDiagrams" are not recognised.

Could someone help me fix the problem?
Re: Behavior diagrams missing in generated document [message #1777919 is a reply to message #1777890] Wed, 06 December 2017 07:36 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
Hello the generic template generates the diagrams for each package and the diagram of each element visible in a diagram

The code about this is in the last fragment of the generic template : <fragment name='diagrams' importedBundles='gmf;papyrus' importedFragments='title;displayComment'>

to do some tests you can try to replace
[for (eobject : uml::Element | d.getElementsInDiagram()->filter(uml::Element)->select(not oclIsKindOf(uml::Package)))] <drop/>
by
[for (eobject : uml::Element | e.eContents()->filter(uml::Element)->select(not oclIsKindOf(uml::Package)))] <drop/>




Re: Behavior diagrams missing in generated document [message #1777924 is a reply to message #1777919] Wed, 06 December 2017 09:28 Go to previous messageGo to next message
Antonio Campesino is currently offline Antonio CampesinoFriend
Messages: 56
Registered: August 2016
Member
Hello!

The issue is that all the behavior diagrams are owned by the behavior classifier. The activity diagram is won by the activity and so on.

In the template you can modify the fragment diagrams from:
---------- Original ----------------
<fragment name='diagrams' importedBundles='gmf;papyrus' importedFragments='title;displayComment'> <drop/>
<arg name='e' type='uml::Element'/> <drop/>
<arg name='val' type='Integer'/> <drop/>
[for (d : notation::Diagram | e.getPapyrusDiagrams())] <drop/>
------------ Change ---------------
<fragment name='diagrams' importedBundles='gmf;papyrus' importedFragments='title;displayComment'> <drop/>
<arg name='e' type='uml::Element'/> <drop/>
<arg name='val' type='Integer'/> <drop/>
[for (d : notation::Diagram | e->asOrderedSet()->addAll(e.eContents()->filter(uml::Element)->select(not oclIsKindOf(uml::Package))).getPapyrusDiagrams())] <drop/>
With that change any diagram own by a classifier should be shown in the generated document together with what ever diagram in the package.

Regards,
Antonio
Re: Behavior diagrams missing in generated document [message #1777989 is a reply to message #1777924] Thu, 07 December 2017 11:16 Go to previous message
Ursula Kirchgaessner is currently offline Ursula KirchgaessnerFriend
Messages: 18
Registered: July 2017
Junior Member
Thank you very much for the quick answers. I split the parsing of elements from the parsing of diagrams, to return also the classifier's diagrams. Now I get all the diagrams I want.
Previous Topic:Command line
Next Topic:Problem with gendoc for Papyrus
Goto Forum:
  


Current Time: Sat Nov 09 02:10:25 GMT 2024

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

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

Back to the top