Skip to content

Fix error for name of newly created feature model#1714

Merged
dbinkele merged 5 commits intomaintenance/mps20241from
bugfix/avoid_error_for_name_of_new_featuremodel_1713
Apr 13, 2026
Merged

Fix error for name of newly created feature model#1714
dbinkele merged 5 commits intomaintenance/mps20241from
bugfix/avoid_error_for_name_of_new_featuremodel_1713

Conversation

@kbirken
Copy link
Copy Markdown
Member

@kbirken kbirken commented Mar 23, 2026

The root feature of a newly created feature model deliberately lacks a name, thus an error is shown. This is correct.

However, the name of the feature model itself is derived from the root feature's name via a get-property constraint. As both the feature model concept and the root feature concept are implementing IValidNamedConcept, the non-existent name of a new root feature will cause a second error for the name of the feature model. This second error will not vanish automatically after some valid name is entered, only after F5 is pressed additionally.

This PR fixes the problem by assigning a specific NO_NAME name to feature models without root feature or with root features with an invalid name.

This solves #1713.

@kbirken kbirken requested a review from dbinkele March 23, 2026 15:07
@kbirken kbirken self-assigned this Mar 23, 2026
@kbirken kbirken force-pushed the bugfix/avoid_error_for_name_of_new_featuremodel_1713 branch from 88e6df0 to d4498ff Compare March 23, 2026 15:57
@kbirken
Copy link
Copy Markdown
Member Author

kbirken commented Apr 13, 2026

Regarding @dbinkele 's offline question about using StringUtils.isEmpty vs. StringUtils.isBlank: The condition should apply specifically when the feature model is created. As soon as the user enters one or more spaces themselves, it is their responsibility, and the error message may then be displayed at the feature model. So we should use isEmpty rather than isBlank.

dbinkele
dbinkele previously approved these changes Apr 13, 2026
@dbinkele dbinkele merged commit 9740a11 into maintenance/mps20241 Apr 13, 2026
2 checks passed
@dbinkele dbinkele deleted the bugfix/avoid_error_for_name_of_new_featuremodel_1713 branch April 13, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants