Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefaultComponentName annotation is not respected case sensitively #10862

Closed
abuntrock opened this issue Jun 19, 2023 · 1 comment · Fixed by #10873
Closed

DefaultComponentName annotation is not respected case sensitively #10862

abuntrock opened this issue Jun 19, 2023 · 1 comment · Fixed by #10873
Assignees
Labels
bug COMP/GUI/OMEdit Issue and pull request related to OMEdit
Milestone

Comments

@abuntrock
Copy link

Description

A defaultComponentName model name annotation is not respected case sensitively. The default instance name is rather the one from the annotation converted to only lower case.

Steps to Reproduce

  1. Consider the following MWE
model DefaultComponentName
annotation(defaultComponentName="ALLCAPS");
end DefaultComponentName;
  1. Create a new class and instantiate the model DefaultComponentName.
  2. The pop-up dialog for the instance name has allcaps instead of ALLCAPS as its default.

Expected Behavior

If a defaultComponentName annotation exists it should be used case sensitive when a new instance of this class is created.

Side Note: We think that the to-lower-case behavior is good when no defaultComponentName annotation exists.
Side Note2: This issue is important for us because we want the instance name to resemble the real product names of our digital twins, which include upper case letters.

Version and OS

  • OpenModelica Version: v1.22.0-dev-178-gabbf3e40b3 (64-bit) with instance API (nightly from last week)
  • OS: Windows 10, 64 bit

Thanks for looking into it
Aaron Buntrock - Bosch Rexroth

@adeas31 adeas31 self-assigned this Jun 19, 2023
@adeas31 adeas31 added bug COMP/GUI/OMEdit Issue and pull request related to OMEdit labels Jun 19, 2023
adeas31 added a commit to adeas31/OpenModelica that referenced this issue Jun 20, 2023
Fixes OpenModelica#10862
Do not convert the defaultComponentName to camel case
adeas31 added a commit that referenced this issue Jun 20, 2023
Fixes #10862
Do not convert the defaultComponentName to camel case
@casella casella added this to the 1.22.0 milestone Jun 20, 2023
@abuntrock
Copy link
Author

Thanks for the quick fix. It looks as expected with today's nightly

@adeas31 adeas31 added this to Done in Improvements for BR Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug COMP/GUI/OMEdit Issue and pull request related to OMEdit
Projects
Development

Successfully merging a pull request may close this issue.

3 participants