Book a Demo

Author Topic: Stereotype bug? using same name stereotypes  (Read 4563 times)

kepNCI

  • EA User
  • **
  • Posts: 127
  • Karma: +1/-0
    • View Profile
Stereotype bug? using same name stereotypes
« on: December 06, 2012, 03:07:26 am »
Can I define a stereotype with the same name as an EA defined stereotype?  For example, EA has a node stereotype for "router".  In my MDG I have a node stereotype called "Router".  I think EA is getting them confused (see detail below).

If the answer is that there can only be one stereotype of the same name, case insensitive, then can I somehow selectively disable the EA stereotypes causing the confliction?  
(Note that some MDGs delivered with EA also duplicate stereotype names and thus may have the same issues. For example, server and unit).

DETAIL OF PROBLEM:  
  (using EA 935)

MDG PROFILE SETUP:
I have a node metaclass and extended from it, several network device stereotypes defined, including:

Name: Server
   StereoType: stereotype
   Attributes include:
        _metatype  string  Server
        _image   string  <Image type="EAShapeScript 1.0" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64">UEsDBB...
        icon   string   C:\...\Icons\Server_16.png
   Default Appearance has background color of blue.
Name Router
   StereoType: stereotype
   Attributes include:
        _metatype  string  Router
        _image   string  <Image type="EAShapeScript 1.0" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64">UEsDBBQA...
        icon   string   C:\...\Icons\Router_16.png
   Default Appearance has background color of green.

Both are referenced in a toolbox profile in identical format and appear in the toolbox with their associated icon.

All seems well within the MDG.

PROJECT USING THE MDG:
As you can see the definition of the stereotypes are nearly identical, yet EA is treating them differently when creating elements in a project.

When I drag the Server element from MDG toolbox onto a diagram, EA draws the rectangle with the correct blue fill color, displays the server icon and the displayed name includes the "<<Server>>" stereotype. The element in the project browser has the correct icon. Likewise when I drag the Router from toolbox onto a diagram, EA draws the rectangle with the correct green fill color, displays the server icon and the displayed name includes the "<<Router>>" stereotype.  Both look as expected.

I now create an instance of a Server by dragging the Server element created above from the project browser onto a diagram and selecting to create an instance. Likewise I create a Router instance. This is where EA treats them different.

For the Server, EA draws the rectancle with the correct fill color, icon, but does not display the stereotype name above the name. In the project browser the stereotype is "<<server>>", not "<<Server>>". (note the small case on "server" as if it is picking up the EA defined stereotype.

For the Router, EA draws the rectancle with the correct fill color, but does NOT display the icon,  but does display the stereotype name above the name, but its value is "<<router>>, not "<<Router>>". In the project browser the stereotype is also "<<router>>".

I am guessing that when EA looksup the stereotype for an element, some logic is getting confused between its own defined stereotype "<<router>>" and my MDG defined stereotype "<<Router>>" when they have the same name (with exception of the case).

This speculation is further supported when one tries to change the stereoype of an element in the project browser (for either the inital element or an instance). Although I see my MDG defined stereotypes in the dropdown selection (as determined by the Title case used),  if I select my "Router" strereotype, it always deploys the EA "router" stereotype name and no icon. Even if I use the ... lookup and uncheck "router" and then select the "Router" under my MDG, EA deploys the "router" stereotype.

Karl

kepNCI

  • EA User
  • **
  • Posts: 127
  • Karma: +1/-0
    • View Profile
Re: Stereotype bug? using same name stereotypes
« Reply #1 on: December 06, 2012, 03:35:25 am »
Likely important point I forgot to mention in the detail above:
The tagged values created from the stereotype's attributes always reflect my MDG attributes (fro initial element and any instances), so apparantly EA is not getting confused at that point.

kepNCI

  • EA User
  • **
  • Posts: 127
  • Karma: +1/-0
    • View Profile
Re: Stereotype bug? using same name stereotypes
« Reply #2 on: December 06, 2012, 05:16:32 am »
This apparently is a bug.  The 10.RC1 release partially fixes it in that the creation of the instance from the project browser is creating both the Router and Server instance with the correct stereotype name and icons.

Where the issue still is not working is when one tries to change the stereotype of the element via its properties. Now when I select "Server" which should be my MDG's stereotype, it appears to be picking the stereotype name and display defaults/icons of the Web Modeling profile's "server" stereotype.

kepNCI

  • EA User
  • **
  • Posts: 127
  • Karma: +1/-0
    • View Profile
Re: Stereotype bug? using same name stereotypes
« Reply #3 on: December 13, 2012, 05:05:02 am »
More Info: (leading me to believe it is a database issue)
I have a project on a SQL Server. I transfer the project to an EAP database on local PC.  

In both database projects, I create an instance on a diagram from dragging an element from the project browser that has a stereotype of "Switch" as defined in my MDG.

In both cases the instances inherits the tagged values of the classifier, however...
in the SQL project the instance does NOT pick up the stereotype name (Switch), or the icons defined in the MDG stereotype profile.
in the EAP project the instance does have the correct stereotype name and icons.