Hello Everyone,
I have created and modified the add-in from
http://blog.sparxsystems.eu/2015/06/do-you-miss-something-in-ea's-code-generator/ in order to solve the problem when calling an operation of a class which is outside the current package.
The message from the code template is "Associated behavior not found within the package!!" , I am sure you have already seen it

If I move this package to the same package than my calling class, it works perfectly.

So basically, I have reversed engineer the mscorlib.dll from microsoft inside a package called "framework" , so that I can access the .net framework inside EA.
I have another package called "system" with a class and an operation defined by a behaviour which interact with the class system.console from .net framework.
I want to call the operation WriteLine("") , but it complains that it can not find it within the package. If I nest the "framework" package under "system", everything is perfect it ends up with Console.WriteLine("Hello");
So what I have done so far: I have modified the C# code template "Action Call" and replace the section:
%if $sBehName == ""%
/*Warning: $sActionName - Associated behavior not found within the package!!*/
%endTemplate%
with
%if $sBehName == ""%
$sBehName = %EXEC_ADD_IN("EA_DCGB_ADDIN", "MyEASL_GET", "element", $GUID, "Name")%
%endIf%
Using visual studio and the debugger, I succeeded to find a matching object with same GUID, it is an object of type "Connector". The problem is now that I can not find any way to reach its operation to return its name.... and I am not even sure I should do this.
By using
Bellekens Enterprise Architect Toolpack at
https://bellekens.com/product/bellekens-enterprise-architect-toolpack/ , when I perform a search by GUID it finds the connector and the matching operation. But I don't succeed.
If someone has found how to do it I would really appreciate to receive a hint or a solution because I am a bit confused with the SDK, how the EA objects are constructed and how the behaviours are interpreted by the code generator.
Many Thanks,