Book a Demo

Author Topic: Operations of interface realized by class  (Read 6755 times)

Dieter Goetz

  • EA User
  • **
  • Posts: 43
  • Karma: +0/-1
    • View Profile
Operations of interface realized by class
« on: July 12, 2016, 09:48:55 pm »
When connecting a class to an interface with a realization EA asks which operations shall be implemented by the class.
EA adds all implemented operations to the class as a copy. Is there a possibility to link the class operations to the interface?
I am looking for something like inherited features between classes.

Dieter

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Operations of interface realized by class
« Reply #1 on: July 12, 2016, 10:07:29 pm »
No. UML does not provide language support for that. If you override operations you can only recognize that by their name (now, there is some visual marker in the new specs, but can't recall the details)1.

q.

1I think that I've seen that with some Mickeysoft UMLish "tool".
« Last Edit: July 12, 2016, 10:15:06 pm by qwerty »

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Operations of interface realized by class
« Reply #2 on: July 12, 2016, 11:39:14 pm »
Hi Dieter,

EA supports the feature:
  • Link to Element Feature
With this you may model a dependency between class operation and interface or class operation and interface operation.

You find the function on the context menu of the dependency between your interface and your class. After that you see the relationship and you can use it by Script, Query or Addin to maintain it without relying on names.

The steps are:
- Draw dependency between Class and Interface
- Link to Element Feature at source (click nearer to the side you want to connect to the operation, context, Link to Element Feature,..)
- Link to Element Feature at target (click nearer to the side you want to connect to the operation, context, Link to Element Feature,..)

By the way:
K6 has used this feature.

Kind regards,
Helmut

Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Dieter Goetz

  • EA User
  • **
  • Posts: 43
  • Karma: +0/-1
    • View Profile
Re: Operations of interface realized by class
« Reply #3 on: July 19, 2016, 05:03:13 pm »
Hi Helmut,

nice to hear from you. Link to element feature is not exactly what I want. Basically I will the class to show all realized operations. I am missing this feature in EA.

Dieter

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Operations of interface realized by class
« Reply #4 on: July 19, 2016, 05:28:27 pm »
It's not in EA since there is no language support for it in UML. But there are always ways around it. One is to do what Helmut suggests. Another one is to stereotype the overridden operations with <<override>>. This can be supported by a script (which checks for Realize connectors and equal signatures in both classes).

q.