Author Topic: Transform Interface  (Read 2881 times)

Emilio

  • EA User
  • **
  • Posts: 78
  • Karma: +0/-0
    • View Profile
Transform Interface
« on: August 05, 2009, 07:07:18 pm »
Earlier this year I posted about some of the unfortunate differences (with regards to the Project Browser) between droping an object on the canvas as an Interface or dropping a Class object and then stereotyping it as an Interface.

There the primary difference was that even though the later is an interface (by stereotype) the icon on the project browser shows it as a class.

Another drawback is that a standard Interface does not have the Details tab where you can add Tempated Parameters. This you can do with a Class object.

So if you need a parameterirzed (generic) interface you can only use a Class stereotyped as Interface. But if for some reason you use the standard Interface object and later you want to "upgrade" it to a Parameterized Interface, then there is no way to transform the element. The only possibility seems to type all over again :(

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Transform Interface
« Reply #1 on: August 05, 2009, 08:49:52 pm »
Actually, there is a way to change the type of the object from Class to Interface and vice-versa.
Select the element and then select the menu option
Element/Advanced/Change Type.
This dialog will allow you to change the type of the element.

By the way, I think the difference between the element of type Interface and the element of type Class is correct.
A class does not become an interface just because you change the stereotype. In UML these two are also considered seperate types.
It is just the visual representation of an interface that looks the same as a class with the "interface" stereotype. (if you choose the rectangular representation).
In fact this is similar to for example an Actor. If you give a class the stereotype "actor" it doesn't automatically change the type of the element to Actor, although the visual representation for actors using the rectangular shape is the same as a class with the stereotype "Actor".

The fact that an interface is missing the templated parameters can be considered a bug (or a missing feature)

Geert