itemisCREATE / statecharts

YAKINDU Statechart Tools (http://www.statecharts.org)
Eclipse Public License 1.0
174 stars 84 forks source link

DefaultNamingService implementation should be revised (strategies should be encapsulated) #233

Closed nyssen closed 5 years ago

nyssen commented 8 years ago

Rather then passing an enum constant into the elementName() dispatch operations and have a switch/case in each of the implementing dispatch functions, we should introduce an interface and separate the different strategy into own implementation classes. The REMOVE_VOWELS strategy could for instance be simply realized as a wrapper to the SIMPLE_NAME strategy (as it only would have to apply some post-processing). The current implementation is error-prone and hard to maintain (e.g. within the REMOVE_VOWELS case a different behavior for unnamed elements is often missing).

andreasmuelder commented 5 years ago

The naming service was reworked with https://github.com/Yakindu/statecharts/pull/1912