Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: elr on May 21, 2024, 09:31:02 pm
-
Hi all,
Does someone knows why types of attributes differs between two classes. For one , I get int, boolean, byte, char... and for another I get String, Boolean, Integer, Real...
is there any reason or meaning ?
Thx
Eric
-
Depends on the code generation language you set.
See Properties | Project | Language
Geert
-
Thank you Geert. You're right.
However, I don't know why some classes Language are set to java or some others to none.. ?!
Can it be (re)set once at all somewhere ? The Properties | Project | Language option is greyed...
Eric
-
Yes, you can set that at once, but I don't remember how exactly.
The manual, or a search on the forum should help you find the solution.
Geert
-
Thank's again !
;)
-
Well, you can also ask your friendly neighborhood AI
I this case I tried Gemini, and the answer was pretty much OK.
It's not entirely correct, but that is due to the fact that Spax renames all of it's menu options every 2 releases.
in v16 look at Develop | Source Code | Options | Reset Source Language
There are two ways to set the code generation language for all elements in a package within Enterprise Architect:
Method 1: Reset Options for Package
This method is ideal for situations where you've already created elements within the package and want to change their assigned language.
In the Project Browser, navigate to the package containing the elements.
Right-click on the package name.
Select "Code Engineering" > "Reset Options for this Package".
A dialog box will appear. Choose "Where language is" set to "Any" (to target all elements).
Under "Convert to," select the desired code generation language.
Click "OK" to apply the changes.
Method 2: Set Default Language (Affects New Elements)
This approach is useful when you're starting fresh with a new package and want all newly created elements to have a specific code generation language.
Go to "Tools" > "Options" (or navigate through the menu depending on your Enterprise Architect version).
Within the Options window, locate "Source Code Engineering."
Under "Source Code Engineering," find the setting labeled "Default Language for Code Generation" or similar wording (refer to your specific version's UI).
Select the desired code generation language from the dropdown menu.
Click "OK" to save the changes.
Additional Notes:
Remember, using the default language setting only impacts newly created elements within that package. Existing elements won't be affected unless you use the "Reset Options for this Package" method.
For more information on code generation in Enterprise Architect, you can refer to the official user guide https://sparxsystems.com/enterprise_architect_user_guide/16.1/modeling_domains/ge
Geert
-
Impressed by AI's kind of knowledge...
I'll think about it, in the future
Thank's Geert.