}
// add new invocation
if (source != null) {
ExecutionUtils.run(javaInfo, new RunnableEx() {
public void run() throws Exception {
StatementTarget target = getTarget();
Point location = getLocation(javaInfo);
String argumentsSource =
TemplateUtils.format("{0}, {1}, {2}", location.y, location.x, source);
// add invocation
JavaInfo formatter = getFormatter(javaInfo);
MethodInvocation invocation =
formatter.addMethodInvocation(target, m_methodSignature, argumentsSource);
// remember values because they will be asked later because of
// GenericPropertyImpl.rememberValueIntoExpression(Object)
// TODO ask Mitin and may be remove "remember"
{
List<Expression> arguments = DomGenerics.arguments(invocation);
JavaInfoEvaluationHelper.setValue(arguments.get(0), location.y);
JavaInfoEvaluationHelper.setValue(arguments.get(1), location.x);
}
}
private StatementTarget getTarget() {
Statement targetStatement = javaInfo.getAssociation().getStatement();
return new StatementTarget(targetStatement, false);
}
});
return true;
}
// no changes