Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gendoc » Simple loop in EMF File - cannot find operation
Simple loop in EMF File - cannot find operation [message #1781019] Wed, 31 January 2018 15:47 Go to next message
Jim 20100 is currently offline Jim 20100Friend
Messages: 69
Registered: June 2016
Member
I have my very simple EMF File (see attachment).

The script below says this error:
See details.
The execution of a script failed: Error during generation of Gendoc script :Cannot find operation (getOutputHasChapters()) for the type (Output)

<context element='{0}' /><drop/>
<gendoc><drop/>
[self.name/]
[for (chapter: Chapter| self.getOutputHasChapters())]<drop/>
[chapter.name/]
[/for] <drop/>
</gendoc><drop/>

Here is my interface of the Output object:

public interface Output extends GenDocSection {

/**
* Returns the value of the '<em><b>Output Has Chapters</b></em>' containment reference list.
* The list contents are of type {@link biz.astron.output.Chapter}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Output Has Chapters</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Output Has Chapters</em>' containment reference list.
* @see biz.astron.output.OutputPackage#getOutput_OutputHasChapters()
* @model containment="true"
* @generated
*/
EList<Chapter> getOutputHasChapters();

Re: Simple loop in EMF File - cannot find operation [message #1781027 is a reply to message #1781019] Wed, 31 January 2018 16:25 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 425
Registered: July 2009
Senior Member
I think you should use the property name from your metamodel (ecore file) and not the api generated.

I assume you should write : self.outputHasChapters or self.OutputHasChapters (depending on the name of the eAttribute or eReference)




Re: Simple loop in EMF File - cannot find operation [message #1781039 is a reply to message #1781027] Wed, 31 January 2018 17:30 Go to previous message
Jim 20100 is currently offline Jim 20100Friend
Messages: 69
Registered: June 2016
Member
Hi,

I checked the ecore and tested "outputHasChapters".

It works Thx a lot

Jim
Previous Topic:Reporting of types from imported package not possible
Next Topic:Use gendoc with external eObject references
Goto Forum:
  


Current Time: Sun Sep 23 06:41:23 GMT 2018

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

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

Back to the top