Sparx Systems Forum

Enterprise Architect => Suggestions and Requests => Topic started by: fwoolz on October 27, 2009, 01:10:16 pm

Title: Model search and multiple stereotypes
Post by: fwoolz on October 27, 2009, 01:10:16 pm
The Model View and Model Search features are powerful tools for organizing... well, model views, but one feature that seems to be lacking is the ability to search on stereotypes beyond the first one on the list in cases where multiple stereotypes have been assigned. This appears to be the case for SQL query searches as well; the "Stereotype" property can be accessed, but not "StereotypeEx". Since I often use stereotypes with SysML <<valueType>> elements to organize data elements (and thus have at least 2 stereotypes for each element), the ability to search on any or all stereotypes would be a big plus.

Cheers,
Fred Woolsey
Title: Re: Model search and multiple stereotypes
Post by: Paolo F Cantoni on October 27, 2009, 01:55:27 pm
Seconded!

Though I do think we we need to be able to distinguish between the primary stereotype (only) and the whole set - since it would appear that "all stereotypes are created equal but some are more equal than others..."

Perhaps "stereotype = value" & "value IN stereotypes"?

Paolo
Title: Re: Model search and multiple stereotypes
Post by: Geert Bellekens on October 27, 2009, 07:54:11 pm
Fred,

I agree with your request, but if you really need this option quick you can always create an SQL search. That will allow you to search on any field in the database, so also the multiple stereotypes.

Geert
Title: Re: Model search and multiple stereotypes
Post by: fwoolz on October 28, 2009, 01:43:53 pm
Cheers Geert,

I tried using SQL search, but you need to set up a join btw. t_object and t_xref on t_object.ea_guid = t_xref.Client (or whatever the precise field name is), AFAIK, in order to access all the stereotypes. In addition, once you have the string defining the stereotypes from t_xref, you need to parse it since it's encoded using SOML (Sparx Own Markup Language!), to wit, @STEREO; Name=valueType; @ENDSTEREO or some such. A script can handle this nicely (as can an add-in, albeit with a bit more work) , but the Model Search feature is so darn convenient that it would be great to have a straightforward search capability ala' Paolo's suggestion (Stereotype = "stereotype", "stereotype" IN StereotypeEx/ SterotypeEx CONTAINS "stereotype").