Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » Return in methods
Return in methods [message #1750078] Thu, 15 December 2016 20:00 Go to next message
Daniel San Martín is currently offline Daniel San MartínFriend
Messages: 45
Registered: October 2012
Member
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 09:21 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
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,


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Previous Topic:How to perform an OCL query with Facet?
Next Topic:Discovery
Goto Forum:
  


Current Time: Fri Mar 29 12:37:07 GMT 2024

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

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

Back to the top