Enterprise Architect project programming language
Asked Answered
M

3

7

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?

Minivet answered 12/7, 2012 at 17:13 Comment(2)
Of course, code generation doesn't work on instances, so an instance doesn't really need a code generation language.Cosmos
Right, I agree in most cases. Every once and a while though it could be nice to be able to tell what the implementation language of an object is (like in a project that encompasses several pieces written in different languages, and you are sorting through use cases)Minivet
H
22

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."

Hillier answered 13/7, 2012 at 15:2 Comment(1)
Ok, that's what I figured. I was just hoping it wasn't the case... :)Minivet
V
10

In Enterprise Architect 12.1 I found it here:

PROJECT - Settings - Project Options - Source Code Engineering - Default Language for Code Generation

Vanmeter answered 8/1, 2016 at 10:15 Comment(0)
G
2

In Enterprise Architect 13.0 I found it here:

Start - Window - Show Toolbar - Code Engineering

In toolbar its first option. Second is default database. Database option is also in:

Start - Workspace - Preferences - Source Code Engineering - Code Editors

but there is not programming language.

Grass answered 8/2, 2017 at 12:52 Comment(1)
Thank you. EA make this option round-robin in UI :)Isogonic

© 2022 - 2024 — McMap. All rights reserved.