Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Elpis on January 24, 2024, 01:27:07 am
-
While model addins are great idea, I seek for possibility to place some utility/library code into kind of <<Javascript>> class (as operations) and not into <<JavascriptAddin>> class itself.
That way a could develop some utility function set to be used in many model addins (shared code base).
The utility-class derived javascript object could be declared in model as addin class atrribute of specific type (i.e. utility class) and than accessed in the code with expression like: this.Utility1.FunctionA() .
PS. There is somehow related proposal to be able to re-use javascripts from Scripting view, in a model addins ( https://sparxsystems.com/forums/smf/index.php/topic,43908.0.html , https://sparxsystems.com/forums/smf/index.php/topic,43400.0.html ). However, for model-addin developers placing addins' re-usable code in a model element, is IMHO more natural and consistent.
-
The question seems to be resolved in https://sparxsystems.com/forums/smf/index.php/topic,48277.msg280361.html#msg280361
(A: a Dependency from <<JavascriptAddin>> Class to utility code Class)