Bug 509340 - Reverse engineering does not create return actionRelation in java2KDM
Summary: Reverse engineering does not create return actionRelation in java2KDM
Status: NEW
Alias: None
Product: MoDisco
Classification: Modeling
Component: UseCases (show other bugs)
Version: 0.13.0   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-16 06:35 EST by Daniel San Martín CLA
Modified: 2016-12-16 06:35 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel San Martín CLA 2016-12-16 06:35:04 EST
When I do reverse engineering of a method that returns something, (for example getters) the KDM model generated does not represent it.

For instance the following method:

public int getPollingRate() {
    return pollingRate;
}

Is represented by,

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

But It is not represented the returned storableunit. There is missing an action relation.

The correct model construction must be:

<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="(path to storableunit)" from="path to the container of this actionRelation"/>
</codeElement>