Book a Demo

Author Topic: Component name( display) missing  (Read 4483 times)

Miracleworker

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Component name( display) missing
« on: June 24, 2008, 07:17:21 pm »
Hi;

Using EA 7.0.815 (build815)

We created personnel configurated components using UML profiles which were working fine till I found out recently that when using an existing component in a diagram as instance, the component name is missing in the properties, is not displayed in component in a diagram, but still remains correctly shown in the browser. Using the link possibility the name stays. Seems that when using our personnel created components, they are loosing there display when using the instance type since general components act normal.
Do you have a direction where to look to solve this problem?

Greetings;

Eric

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Component name( display) missing
« Reply #1 on: June 25, 2008, 08:20:01 am »
The project browser and diagram both show the classifier of instances.  (You should notice a ': ' before the name in the browser.)

Instances can also have a name set, which is why there is no name showing in the dialog.  No name has been set.

Miracleworker

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Component name( display) missing
« Reply #2 on: June 25, 2008, 04:55:15 pm »
Thanks Simon, we're getting closer.

What happens with our 'coded component' is that for example
Component "PNI" as an instance is displayed as "Instance: " and not as "Instance: PNI" as aspected.
We think we need to code this also somewhere, cfr "println", but we fail to find where?

Hope you see where we get lost?

This is our code:
shape main{

//Initialisation attributes
h_align = "center";
v_align = "center";

// Component for Access Network
if (HasTag("Domain","Access Network"))
      {
      setpencolor(0,0,0);
      }

// Component for Billing
if (HasTag("Domain","Billing"))
      {
      setpencolor(0,128,255);
    }


// Component for Business Intelligence
if (HasTag("Domain","Business Intelligence"))
      {
      setpencolor(255,128,0);
    }


// Component for Core Network
if (HasTag("Domain","Core Network"))
      {
      setpencolor(255,128,255);
    }


// Component for External Partners
if (HasTag("Domain","External Partners"))
      {
      setpencolor(255,0,0);
    }


// Component for Financial Management
if (HasTag("Domain","Financial Management"))
      {
      setpencolor(0,128,128);
    }


// Component for IT Integration
if (HasTag("Domain","IT Integration"))
      {
      setpencolor(128,0,255);
    }


// Component for OSS
if (HasTag("Domain","OSS"))
      {
      setpencolor(128,0,0);
    }


// Component for Proximus Support Systems
if (HasTag("Domain","Proximus Support Systems"))
      {
      setpencolor(255,255,0);
    }

// Component for Relationship Management
if (HasTag("Domain","Relationship Management"))
      {
      setpencolor(0,255,128);
    }


// Component for Service Delivery
if (HasTag("Domain","Service Delivery"))
      {
      setpencolor(192,192,192);
    }

// Component for Other domain
if (HasTag("Domain","Other"))
      {
      setpencolor(0,0,0);
      }


// Draw component diagram
setpenwidth(2);
rectangle(0,0,120,90);
image ("__BMB_Logo.bmp",0,0,20,18);

startpath();
moveto(105,5);
lineto(115,5);
lineto(115,30);
lineto(105,30);
endpath();
fillandstrokepath();

startpath();
moveto(100,10);
lineto(110,10);
lineto(110,15);
lineto(100,15);
endpath();
fillandstrokepath();

startpath();
moveto(100,20);
lineto(110,20);
lineto(110,25);
lineto(100,25);
endpath();
fillandstrokepath();

// Print name and status in the component element
println("#stereotype#");
println("#name#");
}




Greetings,

Eric
« Last Edit: June 25, 2008, 05:07:06 pm by Miracleworker »

Miracleworker

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Component name( display) missing
« Reply #3 on: June 25, 2008, 05:13:53 pm »
And looking for "PNI" doesn't give any result.
Searching for "Instance" does.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Component name( display) missing
« Reply #4 on: June 26, 2008, 08:58:59 am »
I didn't realise you were using shape scripts.

You'll need something like this.

Code: [Select]
if(HasProperty("classifier.name"))
    println("#name# : #classifier.name#");
else
    println("#name#");

Miracleworker

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Component name( display) missing
« Reply #5 on: June 26, 2008, 09:23:35 pm »
Ha great, Simon; ;D

This does it.
An if statement was logic, but wecouldn't find out what the exact format was.
Works fine.

Thanks;

Eric ;)