Through a jdt2famix parsed model of an application I'm trying to follow the
usage of a (FAMIX)Parameter. How can this be done?
From a method parameter I can access its enclosing
method and from there on
find invocations within that method for example. The
problem is that there
does not seem to be a direct way to retrieve the fact that a parameter is
part of a method invocation (both direct or as part of an expression). It
seems I have to parse a piece of the source code (the invocation signature
to be precise). This does not feel okay. Can anyone give some pointers on
how to find parameter usage without resorting to parsing the source code (if
such a solution exists)?
(Googling didn't help so far, or I'm not using the right search parameters
;-)
Example Java source code, for which I want to follow the 'x' parameter:
void startPoint(String x, int y) {
// Here is first 'simple' parameter usage
this.doSomething(x, y);
// Here parameter is part of an expression
this.that.doAnother("[" + x + "]");
// Parameter is part of expression again (twice)
this.doLast(x.substring(0, y) + x.substring(y + 8));
}
Cheers,
Erik
--
Sent from:
http://forum.world.st/Moose-f1310756.html