Book a Demo

Author Topic: Childelement / Compartment from an Interface not visible in "realised" class  (Read 3942 times)

Tschana

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Hello all,

I got an Interface called "TestInterface". This interface has a stereotyped operation like myOpTest. Furthermore I've added some Signals as child elements to the interface. To be able to see these Signals in the diagram I've used the shape editor with following code:
Code: [Select]
//Add compartments for Child elements.
shape ChildElement
{
//Check if a child element has the property stereotype, if so set
//the compartment name to Properties.
if(HasProperty("stereotype", "test"))
{
SetCompartmentName("Signal");
}
AppendCompartmentText("+");
//Add the child elements name to the child compartment.
AppendCompartmentText("#NAME#");
}

So far so good. Moreover I have a class called "TestClass". If I now use a Realize-Connector from TestClass to TestInterface the normal "Overrides & Implementations" window appears, so that I can select all operations which shall be implemented from the TestClass.
The result looks like:  https://imgur.com/a/6ZNFXlo

My question now is: Is there any way of also insert the signals automatically when using the Realize-Connector to the class TestClass? The Class needs to know all signals which are assigned in the Interface because I need to create some methods during PIM to PSM transformation for the Class based on the signal names.

If someone has any idea of solving my problem, i'm grateful to hear about it.

Thanks in advance,
Tschana

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Not my area, but if I get you right, there are Signals as child elements in your general class. But a realization will only offer attributes, operations and active class behavior for overriding  (see p. 15 of UML 2.5.1).

q.