Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gendoc » Calling fragment inside a fragment
Calling fragment inside a fragment [message #1709946] Fri, 02 October 2015 07:49 Go to next message
Marc FLAUW is currently offline Marc FLAUWFriend
Messages: 151
Registered: July 2009
Senior Member
Hi,

I am trying to call a fragment inside a fragment.

I have defined:
<fragment name='displayComments' importedBundles='commons;gmf;papyrus'> 
<arg name='element' type='uml::Element'/><drop/>
 [for (co:uml::Comment | element. ownedComment)]<drop/>
Documentation: <dropEmpty>[co._body.clean()/]</dropEmpty>
 [/for]<drop/>
</fragment>


then later in my gendoc template, I define:
<fragment name='displayInfo' importedBundles='commons;gmf;papyrus'> 
<arg name='element' type='uml::Element'/><drop/>
[element.displayComments()/]<drop/>
</fragment>


The error message is
The execution of a script failed: Error during generation of Gendoc script :Cannot find operation (displayComments()) for the type (Element)

I had the impression it was possible to call another fragment from within a fragment, but I don't see what I have done wrong.

Best regards,

Marc
Re: Calling fragment inside a fragment [message #1709954 is a reply to message #1709946] Fri, 02 October 2015 08:36 Go to previous message
Charlotte Rambaud is currently offline Charlotte RambaudFriend
Messages: 4
Registered: May 2015
Junior Member
Hi,

To call a transaction from another fragment, the tag <importedFragments> is required.
You can find this information in gendoc tutorial, page 19 : https://www.eclipse.org/gendoc/documentation/Gendoc_v0.5_tutorial.pdf

In your "displayInfo" fragment, add importedFragments.

<fragment name='displayInfo' importedBundles='commons;gmf;papyrus' importedFragments='displayComments'>

Regards,
Charlotte Rambaud
Previous Topic:Adding comments i ntemplate file
Next Topic:Displaying all attributes of a class
Goto Forum:
  


Current Time: Thu Apr 18 21:38:29 GMT 2024

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

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

Back to the top