In Enterprise Architect when I model a class and specify the implementation language of the class, then use an instance of the class in a use case, the implementation language of the instance in the use case is not the implementation language of the class, but is the default. Is there a way to make Enterprise Architect use the set implementation language of the class for the implementation language of all instances of that class?
In Enterprise Architect when I model a class and specify the implementation language of
Share
There isn’t an option to make instances follow the class language (but that’s a good suggestion to send to Sparx), but you can set the default language for all new elements. From your question, I take it you already know how but I’ll include it for other readers.
Tools – Options – Source Code Engineering – Default Language for Code Generation is the one you’re after. This option is somewhat incorrectly named; it actually sets the default language for created elements.
As long as you’re modelling things for one implementation language at a time this works very well. If you’re modelling for different languages and realize that you’ve got the wrong one in a large part of your model, you can right-click the package in the project browser and select “Code Engineering – Reset Options for this Package.”
Select “Where language is” – Any, and “Convert to” the language you want. Make sure to tick “Process Child Packages.”