Skip to main content



      Home
Home » Modeling » MoDisco » Return in methods
Return in methods [message #1750078] Thu, 15 December 2016 15:00 Go to next message
Eclipse UserFriend
Hello,

When I do reverse engineering of a method that returns something, (for example getters) the KDM model generated does not represent it.

For instance:

	public int getPollingRate() {
		return pollingRate;
	}


In the block unit section of the method appears the following:


 <codeElement xsi:type="action:ActionElement" name="return" kind="return">
                <source language="java">
                  <region file="/0/@model.2/@inventoryElement.1" language="java"/>
                </source>
  </codeElement>



There is missing an action relation. For instance, in our example, the model generator must create this line inside of the action element.

       
   <actionRelation xsi:type="action:Reads" to="(storableunit pollingRate)" from="action element name return"/>

  ...

    <codeElement xsi:type="action:ActionElement" name="return" kind="return">
                <source language="java">
                  <region file="/0/@model.2/@inventoryElement.1" language="java"/>
                </source>
      <actionRelation  xsi:type="action:Reads" to="(storableunit pollingRate)" from="the container of this actionRelation"/>
  </codeElement>


Is it a bug?.

Regards,

Daniel.
Re: Return in methods [message #1750114 is a reply to message #1750078] Fri, 16 December 2016 04:21 Go to previous message
Eclipse UserFriend
Hello,

Thanks a lot for using MoDisco components.
The Java Model Discoverer provides a complete Java model out of the input Java code.
However the Java-to-KDM model transformation is not 100% complete (and there is not necessarily an equivalent in the KDM metamodel which is more generic and thus simpler).
You may take a look to the Bugzilla to see if other users already add the same issue (cf. these bugs for instance), or raise a bug if you feel the need for this.

Best regards,
Previous Topic:How to perform an OCL query with Facet?
Next Topic:Discovery
Goto Forum:
  


Current Time: Fri May 16 18:13:15 EDT 2025

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

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

Back to the top