Author Topic: Types of classes attributes  (Read 2671 times)

elr

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Types of classes attributes
« 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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13283
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Types of classes attributes
« Reply #1 on: May 21, 2024, 09:38:42 pm »
Depends on the code generation language you set.

See Properties | Project | Language

Geert

elr

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Types of classes attributes
« Reply #2 on: May 21, 2024, 09:53:37 pm »
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
« Last Edit: May 21, 2024, 09:58:12 pm by elr »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13283
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Types of classes attributes
« Reply #3 on: May 21, 2024, 10:09:27 pm »
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

elr

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Types of classes attributes
« Reply #4 on: May 21, 2024, 10:16:23 pm »
Thank's again !
 ;)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13283
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Types of classes attributes
« Reply #5 on: May 21, 2024, 10:28:40 pm »
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

Quote
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

elr

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Types of classes attributes
« Reply #6 on: September 07, 2024, 08:34:46 am »
Impressed by AI's kind of knowledge...
I'll think about it, in the future

Thank's Geert.