Author Topic: Model search and multiple stereotypes  (Read 1600 times)

fwoolz

  • EA User
  • **
  • Posts: 435
  • Karma: +0/-0
  • We have met the enemy, and he is us.<Pogo, 1970>
    • View Profile
Model search and multiple stereotypes
« 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
Fred Woolsey
Interfleet Technology Inc.

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


Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6799
  • Karma: +142/-103
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Model search and multiple stereotypes
« Reply #1 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
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 9377
  • Karma: +258/-27
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Model search and multiple stereotypes
« Reply #2 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

fwoolz

  • EA User
  • **
  • Posts: 435
  • Karma: +0/-0
  • We have met the enemy, and he is us.&lt;Pogo, 1970&gt;
    • View Profile
Re: Model search and multiple stereotypes
« Reply #3 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").
Fred Woolsey
Interfleet Technology Inc.

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