Book a Demo

Author Topic: Profiles, case sensitivity, and stereotypes  (Read 4347 times)

fwoolz

  • EA User
  • **
  • Posts: 435
  • Karma: +0/-0
  • We have met the enemy, and he is us.<Pogo, 1970>
    • View Profile
Profiles, case sensitivity, and stereotypes
« on: October 03, 2006, 09:12:55 am »
All,

I encountered an odd glitch when doing direct database manipulation of stereotypes in an EAP file. I changed the stereotype field for custom Requirement elements from 'Requirement' to 'requirement' to match the SysML usage. The update was successful. I then revised the corresponding profile, renaming the 'Requirement' stereoype element (extending the existing 'Requirement' metaclass) to 'requirement'. Profile created & imported successfully. I then took a look at the diagrams containing the elements, and their images had reverted to the native shape for the 'Requirement' element. I then checked the element properties in EA and saw that the stereotype was still 'Requirement' (capital 'R') even though direct examination of the database (EAP file) showed the stereotype as 'requirement' (lower-case 'r'). It required a manual edit of the sterotype field from 'Requirement' to 'requirement' to get the image to change to the associated stereotype ShapeScript image defined in the profile.

This points to a problem somewhere with case sensitivity, it appears.

Cheers,
Fred Woolsey
Interfleet Technology Inc.

Always be ready to laugh at yourself; that way, you beat everyone else to the punch.


«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Profiles, case sensitivity, and stereotypes
« Reply #1 on: October 03, 2006, 10:00:38 am »
Yes, and you should report this as a bug. If possible provide Sparx with an EAP file (zipped) that has both the original (buggy) behavior and one you've repaired by hand.
No, you can't have it!

fwoolz

  • EA User
  • **
  • Posts: 435
  • Karma: +0/-0
  • We have met the enemy, and he is us.<Pogo, 1970>
    • View Profile
Re: Profiles, case sensitivity, and stereotypes
« Reply #2 on: October 03, 2006, 10:24:32 am »
I think I found the culprit:

I added two new elements with the stereotype "requirement", and these showed no signs of the earlier problem. I then did some database snooping and found another table, t_xref, that stores tag & stereotype info. THIS table retained the old 'Requirement' stereotype. Changing the embedded string in the 'Description' field to 'requirement' corrected the problem for all elements.

Apparently this table tracks links between tags and stereotypes to something else in the model, but I'm not yet sure what. However, I would expect this table to update whenever the stereotype for an element is changed. Could this update check be where the case-insensitivity arises?

Cheers,
Fred Woolsey
Interfleet Technology Inc.

Always be ready to laugh at yourself; that way, you beat everyone else to the punch.


fwoolz

  • EA User
  • **
  • Posts: 435
  • Karma: +0/-0
  • We have met the enemy, and he is us.<Pogo, 1970>
    • View Profile
Re: Profiles, case sensitivity, and stereotypes
« Reply #3 on: October 03, 2006, 10:35:51 am »
Bug reported...
Fred Woolsey
Interfleet Technology Inc.

Always be ready to laugh at yourself; that way, you beat everyone else to the punch.